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
Home Stock Screener Forex Screener Crypto Screener Economic Calendar Shows How It Works Chart Features Pricing House Rules Moderators Website & Broker Solutions Widgets Charting Solutions Lightweight Charting Library Help Center Refer a friend Feature Request Blog & News FAQ Wiki Twitter
Profile Profile Settings Account and Billing Refer a friend My Support Tickets Help Center Ideas Published Followers Following Private Messages Chat Sign Out