Login / Register
Add a review
Log in
Sign UP

The Moving Average Convergence/Divergence(MACD) indicator, built on a tick price chart.

At startup, it is necessary to wait for the arrival of the required amount of tick data for calculations.


  • Fast EMA period – fast averaging period.
  • Slow EMA period – slow averaging period.
  • Signal SMA period – the period of averaging of the signal line.
  • calculated bar – the number of bars on the chart for calculating the indicator.

Then follow the parameters that regulate the weights of the signals of the MACD oscillator (from 0 to 100). Their description can be found in the MQL5 Reference in the section Signals of the MACD oscillator.

  • The oscillator has required direction – the value of the oscillator on the analyzed bar is growing/falling.
  • Reverse of the oscillator to required direction – reversal of the oscillator.
  • Crossing of main and signal line – the intersection of the main and signal lines.
  • Crossing of the main line and the zero level – the intersection of the zero level.
  • Divergence of the oscillator and price-divergence.
  • Double divergence of the oscillator and price – double divergence.

Buffer numbers: 0 – MACD_LINE, 1 – SIGNALLINE, 4- SIGNAL_UP, 5- SIGNAL_DOWN.

Add review
Reviews ( 0 ):