MQL4: Major bug in CiMACD code in Oscilators.mqh

 

Hi,

This is notice that if you try to use CiMACD in MQL4 you will not always get the correct result.

The reason is that in class method GetData you have the following line:

return(iMACD(m_symbol,m_period,m_fast_ema_period,m_slow_ema_period,m_signal_period,buffer_num,m_applied,index));

Look at the places of the buffer_num and m_applied  ---> they exchanged places, should be:

return(iMACD(m_symbol,m_period,m_fast_ema_period,m_slow_ema_period,m_signal_period,m_applied,buffer_num,index));

So, if you use methods Main and Signal, you will also not get the correct results because they call GetData.

Reason: