OPEN-SOURCE SCRIPT

MTF Trend Example

134
//version=6
indicator("MTF Trend Example", overlay=true)

emaFast = ta.ema(close, 20)
emaSlow = ta.ema(close, 50)

trendUp = emaFast > emaSlow
trendDown = emaFast < emaSlow

plot(emaFast)
plot(emaSlow)
barcolor(trendUp ? color.green : trendDown ? color.red : na)

免责声明

这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。