Download MetaTrader 5

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

To add comments, please log in or register
How to earn at MQL5.community? Come and find out!
Trader98234
26
Trader98234 2015.03.29 12:07 

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
Stuart Browne
5817
Stuart Browne 2015.03.29 12:51  
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
Trader98234
26
Trader98234 2015.03.29 13:01  
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.

Stuart Browne
5817
Stuart Browne 2015.03.29 23:26  
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!
Trader98234
26
Trader98234 2015.03.30 18:09  
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
Stuart Browne
5817
Stuart Browne 2015.04.03 10:50  
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
To add comments, please log in or register