You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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.