MACD Indicator Value in Backtest

 
I am experiencing a issue with the MACD indicator in backtest. When debugging my expert advisor, I am printing the MACD value to the Strategy Tester journal. The printed MACD value is not matching the value shown in the chart for the tested time frame.

For example, although the MACD value is showing up as a positive value in the journal log, it is clearly a negative value on the chart for the same time frame.

double MacdCurrent;
MacdCurrent=iMACD(NULL,PERIOD_D1,MACD_Fast_EMA,MACD_Slow_EMA,MACD_Signal_Period,PRICE_CLOSE,MODE_MAIN,1); //Current value of MACD histogram 48,104,36
Print ("MACD = " + MacdCurrent);

Is this an issue with the Strategy Tester or am I missing something about MACD?
 
Whatever people at Metaquotes will probably deny what i am writing, Strategy Tester is unreliable, even with the simple comparaison like this one :

1) have a strategy that is waiting the end of the bar and is making the decision of the opening in a new bar, run this strategy in every tick mode

2) have the same strategy running at opening bar only

it should be the same, but it is not, Bid value are not showing the same value, weird, maybe a math rounding issue, maybe something else, just the developer can tell where is the bug because they have access to the source code.... but conclusion is that tester is not precise and cannot give you the certitude that you are looking for....
 
See articles in the Tester section - https://www.mql5.com/en/articles/mt4
Reason: