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)
simple but useful, thanks!
Reply
United States
United Kingdom
India
España
France
Italia
Polska
Brasil
Россия
Türkiye
Indonesia
Malaysia
日本
한국
Home Stock Screener Forex Signal Finder 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
Profile Profile Settings Account and Billing Priority Support Ideas Published Followers Following Private Messages Chat Sign Out