Questions from a "dummy" - page 203

 

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.

double h[1000],l[1000];

if(CopyHigh("EURUSD",PERIOD_D1,1,1000,h)<1000 || CopyLow("EURUSD",PERIOD_D1,1,1000,l)<1000) return;

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).

 
Yedelkin:

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 will not work
 
stringo: It won't 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.
 
stringo:
It's not going to work.
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...
 
Yedelkin:
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...
The first time you access the history, the tester will start downloading (like this)
 

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.

 
notused: The first time you access the history, the tester will start resuming the download (I think so).
But, in fact, the history downloading script does the same thing, namely it accesses the history (and if it fails, it accesses it more than once).
 
Karlson: If we want a 520 day average, we could try to specify the beginning of the test as 01.01.2011.

In this case the data will come from 2010 and at the beginning of 2012 a 520 day average will be available.

So my first suggestion about increasing the test interval is the only possible solution? :/
Reason: