Problem Back-Testing

 

hello,

I have a problem in receiving data when beacktesting in MT4.


I was trying to run the simple EA:

void OnTick()
  {
   double low[];
   Print(CopyLow(_Symbol,PERIOD_M1,3000,30,low));
  }

When I run it on back test I always get -1 (error), but when I run it at live I get 30 (success).

So I was guessing that there is a problem with the history data.

I imported months of 1M candle data, and yet, the problem continues at back testing.


What is causing the problem ?


Thanks.

 
Tester starts with only 1000 bars of history.
 
Keith Watford:
Tester starts with only 1000 bars of history.
Well, Thats explanes my problem, thank you.


Is there a way to change it?

 
On MT4: Unless the current chart is that specific symbol(s)/TF(s) referenced, you must handle 4066/4073 errors before accessing candle/indicator values.
          Download history in MQL4 EA - Forex Calendar - MQL4 programming forum - Page 3 #26 № 4
 
William Roeder:
On MT4: Unless the current chart is that specific symbol(s)/TF(s) referenced, you must handle 4066/4073 errors before accessing candle/indicator values.
          Download history in MQL4 EA - Forex Calendar - MQL4 programming forum - Page 3 #26 № 4
Thank you.
Reason: