Please consider which section is most appropriate — https://www.mql5.com/en/forum/172166/page6#comment_49114893

- www.mql5.com
The error message "unmatched data error" is not related to your code. It is related to the mismatch of historical data being provided to the MT4 Strategy Tester.
In other words, there is a mismatch of the data between the different time-frames.
The possible reason is that you are mixing broker provided data and data downloaded via the History Center (which downloads from MetaQuotes and not the broker).
To fix the issue, you will need to rebuild the data with the PeriodConverter program so that all the time-frames are consistent.
Please run a search in the forum to find more information about the issue and the steps to accomplish this.
The error message "unmatched data error" is not related to your code. It is related to the mismatch of historical data being provided to the MT4 Strategy Tester.
In other words, there is a mismatch of the data between the different time-frames.
The possible reason is that you are mixing Broker provided data and data downloaded via the History Center (which downloads from MetaQuotes and not the broker).
To fix the issue, you will need to rebuild the data with the PeriodConverter program so that all the time-frames are consistent.
Please run a search in the forum to find more information about the issue and the steps to accomplish this.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
In the demo accounts and real accounts it works well but at the moment of placing in the strategy tester the program gets these errors I have no idea which part of my code may be causing this I ask for your help to review the code in an extensive and precise manner because I am really very desperate since it is not the data nor the meta trader that is causing the error I am sure what the error is in the code
Tralingstop works fine but in the strategy tester cause of your errors any help is welcome thank you I will read all the comments
@William Roeder