ZigZag indicator gives wrong value in Strategy Tester (only for period: 2015.01.05 - 2015.01.06)

 

Hello,

 I use the indicator ZigZag in my Expert Advisor and I noticed that this indicator gives me a wrong value in Strategy Tester for the period 2015.01.05 - 2015.01.06 (EURUSD - H1).

 Everything works fine until 2015.01.09 at 06:00 (see screenshot 1), but then the last high changes to a low (see screenshot 2).

 

When I use the indicator on the chart, the calculations are correct. Furthermore, the indicator ZigzagColor gives also correct results (see screenshot 3).

 

Any idea why this happens?

Files:
1.png  74 kb
2.png  78 kb
3.png  71 kb
 
Trader98234:

Hello,

 I use the indicator ZigZag in my Expert Advisor and I noticed that this indicator gives me a wrong value in Strategy Tester for the period 2015.01.05 - 2015.01.06 (EURUSD - H1).

 Everything works fine until 2015.01.09 at 06:00 (see screenshot 1), but then the last high changes to a low (see screenshot 2).

 

When I use the indicator on the chart, the calculations are correct. Furthermore, the indicator ZigzagColor gives also correct results (see screenshot 3).

 

Any idea why this happens?

The ZigZag indicator is a famous repainter and there is a risk of it "seeing the future" when used in a backtest
 
Filter:
The ZigZag indicator is a famous repainter and there is a risk of it "seeing the future" when used in a backtest

Thank you for your help.

Well, I know that it repaints, but this is not the problem. The problem is that the calculations are wrong. Per definition it is impossible to have a high next to another high.

 
Trader98234:

Thank you for your help.

Well, I know that it repaints, but this is not the problem. The problem is that the calculations are wrong. Per definition it is impossible to have a high next to another high.

Actually I didn't look at your pics before I posted last time - that is odd!
 
Filter:
Actually I didn't look at your pics before I posted last time - that is odd!

Exactly! Unfortunately, this issue is not limited on a certain pair. I discovered the same behaviour today on GBPUSD.

 I really need to fix this as soon as possible, any ideas how I can debug this?

 

EDIT: Here is another screenshot.

Files:
4.png  117 kb
 
Further testing between myself and Trader98234 confirms this appears to be a bug in either MT5 or the MT5 version of this indicator. It will be reported to Service Desk by Trader98234