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
EN English
EN English (UK)
EN English (IN)
DE Deutsch
FR Français
ES Español
IT Italiano
PL Polski
SV Svenska
TR Türkçe
RU Русский
PT Português
ID Bahasa Indonesia
MS Bahasa Melayu
TH ภาษาไทย
VI Tiếng Việt
JA 日本語
KO 한국어
ZH 简体中文
ZH 繁體中文
AR العربية
Home Stock Screener Forex Screener Crypto Screener Economic Calendar How It Works Chart Features House Rules Moderators Website & Broker Solutions Widgets Stock Charting Library Feature Request Blog & News FAQ Help & Wiki Twitter
Profile Profile Settings Account and Billing My Support Tickets Contact Support Ideas Published Followers Following Private Messages Chat Sign Out