Skip to main content

Low and High Ema for Amibroker (AFL)

Copy & Paste Friendly
Highs = EMA(High, 5);

Lows = EMA(Low, 5);



UpTrend = C > Highs;

DnTrend = C < Lows ;

Colors = IIf(UpTrend, colorGreen, IIf(DnTrend, colorRed, colorBlack));



Plot(Close, "Price", Colors, styleBar | styleThick);