Huy EMA21

15
//version=4
study("EMA21 Contrarian Indicator", shorttitle="EMA21Contrarian", overlay=true)

// Tính toán EMA21
ema21 = ema(close, 21)

// Tính toán sự chênh lệch giữa giá và EMA21
price_vs_ema21 = close - ema21

// Xác định điều kiện cho sự tranh chấp
is_contrarian = price_vs_ema21 > 0 ? true : false

// Vẽ biểu đồ cho chỉ báo
plotshape(series=is_contrarian, title="Contrarian Signal", location=location.belowbar, color=color.green, style=shape.triangleup, size=size.small)

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.