You cannot get rates with wrong timeframe in Open Prices mode
Previous error is "EURUSD,M15 wrong timeframe ...." because your testing timeframe is H4 on EURUSD
- www.mql5.com
The Open Prices mode of testing was changed in the build 619 (#12 in the list of changes):
MetaTester: Changed the operation of the testing method "on open prices". As before, OnTick of an Expert Advisor runs only at the opening of the bar, but instead of M1 OHLC ticks, high, low and close states the tested bar are used. Due to this, stops and pending orders may trigger at a price different from the stated one. This has led to a multiple acceleration of tests.
Peculiarities of using this mode are described in the Tick Generation section of the user guide:
Open Prices Only
In this mode, OHLC prices of bars of the timeframe selected for testing are generated. The Expert Advisor function OnTick() runs only at the beginning of the bar (at the Open price). Due to this feature, Stop Levels and pending orders may trigger at a price different from the specified one (especially when testing at higher timeframes). But this allows you to quickly run an evaluation test of an Expert Advisor.
The exceptions are periods W1 and MN1, for which bars are generated once a day instead of once a week or a month respectively. |
There are some limitations on the "Open Prices Only" mode:
- You cannot use the Random Delay execution mode.
- In the tested Expert Advisor, you cannot access data of the timeframe lower than that used for testing/optimization. For example, if your run testing/optimization on the H1 period, you can access data of H2, H3, H4 etc., but not M30, M20, M10 etc. In addition, the higher timeframes that are accessed must be multiple of the testing timeframe. For example, if you run testing in M20, you cannot access data of M30, but it is possible to access H1. These limitations are connected with the impossibility to obtain data of lower or non-multiple timeframes out of the bars generated during testing/optimization.
- Limitations on accessing data of other timeframes also apply to other symbols whose data are used by the Expert Advisor. In this case the limitation for each symbol depends on the first timeframe accessed during testing/optimization. Suppose, during testing on EURUSD H1, an Expert Advisor accesses data of GBPUSD M20. In this case the Expert Advisor will be able to further use data of EURUSD H1, H2, etc., as well as GBPUSD M20, H1, H2 etc.
The mode of all ticks generation is the most accurate, but the slowest one. For quick, but rough testing/optimization, use the "Open prices only" mode.
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Dear Experts,
could you pls support on this one? After updating to the newest build I´m receiving the above mentioned error message when starting the Strategy Tester. Could you pls advice what this error message says - or better - what I have to do? Thank you so much!
Best,
Thomas