OPEN-SOURCE SCRIPT

My script

42
/version=5
indicator("50 EMA - Green Up / Red Down", overlay=true)

// Calculate the 50 EMA
ema50 = ta.ema(close, 50)

// Determine if the EMA is rising or falling
color_ema = ema50 > ema50[1] ? color.green : color.red

// Plot the 50 EMA with dynamic color
plot(ema50, title="50 EMA", color=color_ema, linewidth=2)

Feragatname

Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.