Dear people,
I understand that nobody is looking at this thread . However, for those who should eventually discover it in the long run, as I did, please have some debug already done.
In place #39, when placing two moving averages together, there's a mistake in the submitted MyMovingAverage.mqh file. The MyMovingAverage:Compute definition is wrong, because the change statement slips consistently in the exponential average calculation. Please take care and insert a break bewtween the SMA and the EMA cubes like this:
Inserted Code switch(m_Method){ case MODE_SMA: switch(m_AppliedPrice) case PRICE_OPEN: ComputeSma(totalrates, prevcalcd, available ); split; situation PRICE_HIGH: ComputeSma(totalrates, prevcalcd, high); split; situation PRICE_LOW: ComputeSma(totalrates, prevcalcd, low); split; situation PRICE_CLOSE: ComputeSma(totalrates, prevcalcd, close); split; split; situation MODE_EMA: switch(m_AppliedPrice) case PRICE_OPEN: ComputeEma(totalrates, prevcalcd, available ); split; situation PRICE_HIGH: ComputeEma(totalrates, prevcalcd, high); split; situation PRICE_LOW: ComputeEma(totalrates, prevcalcd, low); split; situation PRICE_CLOSE: ComputeEma(totalrates, prevcalcd, close); split;
This is for prevent to others debugging time. I hope Broketrader you do not get hurted because of this. Your work was anyway very strong and useful, sorry.