N

nTrend Filter v0.1

N  
Determines long term trend bias on the conditions below:
If price is above the 200sma and 50sma = Green Candles = Bullish
If price is below the 200sma and 50sma = Red Candles = Bearish
Remove from Favorite Scripts Add to Favorite Scripts
// nTrend v0.1
// Made by Nicholas Luca Ricciardi - nricciardi.co.uk
// Determines long term trend bias
// If price is above the 200sma and 50sma = Green Candles = Bullish
// If price is below the 200sma and 50sma = Red Candles = Bearish

study(title = "nTrend v0.1", shorttitle="nTrend v1",overlay=true)

sma1 = (50)
usedEma = sma(close, sma1)

emaUpColor() => hlc3 >= usedEma
emaDownColor() => hlc3  < usedEma

col = hlc3  >= usedEma ? lime : hlc3  < usedEma ? red : black

barcolor(emaUpColor() ? lime: emaDownColor() ? red : na)
plot(usedEma ? usedEma : na, title="EMA", style= (line) , linewidth=(2), color=white)

BiasSMA = (200)
usedSMA = sma(close, BiasSMA)

plot(usedSMA ? usedSMA : na, title="EMA", style= (line) , linewidth=(3), color=black)
dperendez
2 months ago
simple but useful, thanks!
Reply
Ideas Scripts Chart
United States
United Kingdom
India
España
Italia
Brasil
Россия
Türkiye
日本
한국
Home Stock Screener Economic Calendar How It Works Chart Features House Rules Moderators For the WEB Widgets Stock Charting Library Priority Support Feature Request Blog & News FAQ Help & Wiki Twitter
Private Messages Chat Ideas Published Followers Following Priority Support Public Profile Profile Settings Billing Sign Out