The error occurs or doesn't ocuur randomly, as I see it.
I don't have any problem. Are all the symbols used by your IndexXXX indicators selected in Market Watch ?
I run it with Metaquotes-demo server.
OK, let's make it even more simple - down to single function.
EURUSD is selected in MarketWatch. I run it on USDCHF, M1, Normal, Open prices only.
- www.mql5.com
Tested it in 3 different terminals with the same result.
There is evidently a bug in functions for copying rates from other symbols in "Open prices only" mode.
- www.mql5.com
Tested it in 3 different terminals with the same result.
There is evidently a bug in functions for copying rates from other symbols in "Open prices only" mode.
Ok, I got it. The error is only with "Open prices only" mode. Also if I run a "1 minutes OHLC" first, and then "Open prices only" I don't get errors.
I don't know about your original code, but the code you posted here don't have error processing, I strongly suggest you to include error processing everywhere. For example with this code :
if(CopyOpen("EURUSD",Inp_timeframe,0,1,buffer_1)!=1) Print("CopyOpen Error : ",_LastError);
I got error 4401 which is "Requested history not found", each time you see "wrong timeframe request..." in the Strategy Tester logs.
Anyway, that seems weird to have this error with the Strategy Tester, if your wrote to ServiceDesk to report this, please let us know their answer.
I have this same error appear..... and I have resolved it by switching as you indicated......
I can send to the service desk a letter, however, I di not write the ea that I am using so I am unable to add any code to it.
i have the same problem with "error wrong timeframe in open prices testing mode"
Ok, I got it. The error is only with "Open prices only" mode. Also if I run a "1 minutes OHLC" first, and then "Open prices only" I don't get errors.
I don't know about your original code, but the code you posted here don't have error processing, I strongly suggest you to include error processing everywhere. For example with this code :
I got error 4401 which is "Requested history not found", each time you see "wrong timeframe request..." in the Strategy Tester logs.
Anyway, that seems weird to have this error with the Strategy Tester, if your wrote to ServiceDesk to report this, please let us know their answer.
"Open Prices Only"
...
In the tested Expert Advisor, you cannot access data of the timeframe lower than that used for testing/optimization. For example, if you 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.
- www.mql5.com
- 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 developers!
I continue to get the error "wrong timeframe request in Open Prices testing mode". All the testing is provided in "Open prices only" mode EXCLUSIVELY on M1 timeframe. I actually test the EA, in which timeframe of the loaded custom indicator is set as an input parameter. Because I use M1 as main timeframe, I expect to be able to load indicators from all other timeframes (according to this https://www.mql5.com/en/forum/6494 ), and that goes smoothly with all my other indicators. However, I get this error even when the indicator timeframe is set to M1.
Moreover, the error condition is unstable, e.g. sometimes I get it and sometimes not. For example. I start the slow optimisation and about half of the passes return this error, while others do not. When I run the same optimisation with same inputs ranges without recompiling any EAs or indicators, I get other confings, which return error (and sometimes all the testing goes smoothly). When I try to make a single run of a config. which returned the error, it sometimes goes smoothly too. Usually, the restart of the terminal changes the situation.
I pin the code of the indicator, which causes the error (line 60 mainly).