problem backtesting an EA, few bars loaded.

[Deleted]  

hi

i'm writing an EA that makes calculations based on past market swings.

in the init function i make the ea load the past data with the following instructions :

ArrayCopyRates(stream,"EURUSD", PERIOD_H4);

ArrayCopy(bar1,stream, 0, 0);

ArraySetAsSeries(bar1, False);

but the EA loads a maximum of 1000 bars, and to calculate a reliable statistic i need much more data than 1000 bars.

I already checked that the full 4H history is loaded, and the size of the array stream[][] and bar1[][] is much bigger than 1000.

anyone has an idea of why the EA doesn't want to read any bar older than 1000 ?

 

How many 4hr bars in your history?

[Deleted]  
phy wrote >>

How many 4hr bars in your history?

like more than 15000

 
flyer_77:

hi

i'm writing an EA that makes calculations based on past market swings.

in the init function i make the ea load the past data with the following instructions :

ArrayCopyRates(stream,"EURUSD", PERIOD_H4);

ArrayCopy(bar1,stream, 0, 0);

ArraySetAsSeries(bar1, False);

but the EA loads a maximum of 1000 bars, and to calculate a reliable statistic i need much more data than 1000 bars.

I already checked that the full 4H history is loaded, and the size of the array stream[][] and bar1[][] is much bigger than 1000.

anyone has an idea of why the EA doesn't want to read any bar older than 1000 ?

options -> charts -> max bars in chart?

also setAsSeries=false before the copy

[Deleted]  
WHRoeder wrote >>

options -> charts -> max bars in chart?

also setAsSeries=false before the copy

done, but it still wont loads exactly 1000 bars. even if i change starting period in the tester box "from", it keeps loading the last 1000.

have you ever experienced such a problem on your EAs?

 

I remember something about the Tester loading 1000 bars.... looking...

..but not finding.

My little test EA has 100 bars in the array to start...

[Deleted]  

ok, by the way thank you for your help