Thanks for the answers! Moved the start of the testing period with a margin and included a check for copying data into the array in the Expert Advisor. If there is not enough data the Expert Advisor just doesn't work.
Although, frankly speaking, this way of solving the problem is quite unexpected - the chart in the terminal seems to have bars (everything has already been downloaded from the trade server with a huge stock) but the tester does not have access to them.
It would be useful to somehow write this case in the documentation directly as an example under the heading "How to bypass the tester's restrictions at the beginning of the testing period".
solandr: Although, frankly speaking, this way of solving the problem is quite unexpected - the chart in the client terminal seems to have bars (everything has already been downloaded from the trading server with a huge stock), but the tester does not have access to them.
Have a look at the section in the Handbook on testing. In my opinion, there is an idea that the terminal acts as a server and the tester acts as a terminal in the "terminal - tester" combination. That is, if the terminal has all the available history, it's not enough for the same amount of history in the tester. The tester downloads the history on its own, based on the settings for testing, and it may happen that the volume of this history is insufficient for the logic of the program being tested.
I haven't worked with loading the history for testing large timeframes myself, but instead of increasing the testing interval, try to insert the so-called "script for loading the history" into the code. In idea, this script should provide the necessary depth of history for testing (especially since you have already reproduced the logic of its work).
I have not worked with downloading history for testing large timeframes myself, but instead of increasing the testing interval, try to insert the so-called "script for downloading history" into the code. By idea, this script should provide the necessary depth of history for testing (especially since you have already reproduced the logic of its work).
I see. So, I was lucky to use a similar script to download the history for several instruments on M1 (the depth of the request did not exceed two or three weeks). The history was there, but as a result of what exactly it appeared, I did not think about it.
It really didn't work. The tester firmly downloads the history by its own rules and the script for downloading the history, which is built into the Expert Advisor, cannot download anything additional.
solandr: It really didn't work. The tester firmly downloads the history by its own rules and the script for downloading the history, which is built into the Expert Advisor, cannot download anything additional.
Then this point is unclear: what should I do if I want to test only the last month, but the program requires for analysis the data from 3 years ago D1...
This case was identified a long time ago. On the D1 the history is connected with +1 year.
Therefore, if you specify the start of the test 01.01.2012, then the Expert Advisor immediately began trading the average period should be less than 260.
That is, it will calculate it at the beginning of the test period with the data of 2011.
If we need, say, 520-day average, then we can try to indicate the beginning of the test period 01.01.2011 .
In this case, the data will start with 2010 and 520-day average will be available at the beginning of 2012.
The Expert Advisor should not trade without the data.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Thanks for the answers! Moved the start of the testing period with a margin and included a check for copying data into the array in the Expert Advisor. If there is not enough data the Expert Advisor just doesn't work.
Although, frankly speaking, this way of solving the problem is quite unexpected - the chart in the terminal seems to have bars (everything has already been downloaded from the trade server with a huge stock) but the tester does not have access to them.
It would be useful to somehow write this case in the documentation directly as an example under the heading "How to bypass the tester's restrictions at the beginning of the testing period".
Have a look at the section in the Handbook on testing. In my opinion, there is an idea that the terminal acts as a server and the tester acts as a terminal in the "terminal - tester" combination. That is, if the terminal has all the available history, it's not enough for the same amount of history in the tester. The tester downloads the history on its own, based on the settings for testing, and it may happen that the volume of this history is insufficient for the logic of the program being tested.
I haven't worked with loading the history for testing large timeframes myself, but instead of increasing the testing interval, try to insert the so-called "script for loading the history" into the code. In idea, this script should provide the necessary depth of history for testing (especially since you have already reproduced the logic of its work).
I have not worked with downloading history for testing large timeframes myself, but instead of increasing the testing interval, try to insert the so-called "script for downloading history" into the code. By idea, this script should provide the necessary depth of history for testing (especially since you have already reproduced the logic of its work).
It's not going to work.
Then this point is unclear: what if you want to test only the last month, but the program requires 3 years of D1 data for analysis...
This case was identified a long time ago. On the D1 the history is connected with +1 year.
Therefore, if you specify the start of the test 01.01.2012, then the Expert Advisor immediately began trading the average period should be less than 260.
That is, it will calculate it at the beginning of the test period with the data of 2011.
If we need, say, 520-day average, then we can try to indicate the beginning of the test period 01.01.2011 .
In this case, the data will start with 2010 and 520-day average will be available at the beginning of 2012.
The Expert Advisor should not trade without the data.
In this case the data will come from 2010 and at the beginning of 2012 a 520 day average will be available.