What is going on here??

 

I am busy writing an EA which is largely based on the custom indicator NonLagMA.

When I run the EA in Visual Mode I notice that the transactions are placed and closed in the wrong places on the chart. On further investigation I discovered that the values given in the arrays of the indicator shown on the chart/Data Window are different than those reported in the Journal!

I am not speaking of just a difference of a few pips in the price - I am speaking also about the fact that at times the Data Window will give a non-zero value for a particular array and the Journal will give a zero value at the same time.

Does anybody know what is going on here? Why do the Data Window/Chart and the Strategy Tester Journal values differ so much from each other??

 

The journal doesn't give any values. It is your EA that is printing those.

Most likely your EA's iCustom parameters do not match your indicator's. Detailed explanation of iCustom - MQL4 forum

Alternatively, use my Polyline code to print the lines on the chart and compare them.

 
WHRoeder:

The journal doesn't give any values. It is your EA that is printing those.

Most likely your EA's iCustom parameters do not match your indicator's. Detailed explanation of iCustom - MQL4 forum

Alternatively, use my Polyline code to print the lines on the chart and compare them.


Thank you! I will check my code and see if I access the correct arrays.
 
ernest02:
Thank you! I will check my code and see if I access the correct arrays.


This indicator is repainting means the color is changing aftertimes, In that way you can't place the trades as you see on chart
Reason: