Monday – Friday : 9:00 AM – 6:30 PM

MACD Track Line

Incorporating a track line into the MACD indicator through Amibroker AFL offers enhanced visualization of the indicator’s movements. The track line, overlaid on the MACD histogram, assists traders in better understanding and interpreting the indicator’s behavior. Amibroker’s robust data feed capabilities enable real-time tracking and analysis, empowering traders to make informed decisions based on the MACD track line’s interaction with signal lines or histogram shifts.

SetChartBkColor( colorBlack ) ;
f = Param("fast ema",12,1,50,1);
s = Param("Slow ema",26,2,100,1); 
t = Param ("signal",9,1,50,1);
a2 = EMA(a1,t);
Hist = a1-a2;
em = EMA(Hist,9);
col_hist= IIf(Hist > BBandTop( Hist, 5, 0.5 ),colorDarkGreen,IIf(Hist < BBandBot( Hist, 5, 0.5 ),colorDarkRed,colorYellow));
Plot (Hist,"Histogram",IIf(hist > Ref(hist,-1),colorBrightGreen,colorRed), styleLine+styleThick);
Plot (Hist,"",col_hist, styleHistogram+styleNoLabel);
Plot (EMA(Hist,3),"",colorBlue,styleDashed+styleNoLabel);
Plot (EMA(Hist,5),"",colorBlue,styleDashed+styleNoLabel);
Plot (EMA(Hist,8),"",colorBlue,styleDashed+styleNoLabel);
Plot (EMA(Hist,10),"",colorBlue,styleDashed+styleNoLabel);

Open chat
Hi, how can I help you?