Accessing more than 1000 data

 
Apparently, when you have history data with more than 1000 data available (let's say 10000 5mn data bar), it seems that you cannot access Open[x],Close[x] etc... with an index more than 1000 when the backtest starts, then, while the strategy is keeping moving to a new bar, you can access more and more data... Is there a way to make all history available at start of the backtest (assuming that you have enough past data based on your start time) ?
 
Read article Tester in the Terminal MetaTrader 4: It Should Be Known (https://www.mql5.com/en/articles/1490):

In this approach we always have the information only about the past, and no information about the future, like in real trading. With each new tick (price change) in the tester we move in the present, the current-time triangle moves to the right onto the new known time and receives new prices. Each new tick creates the Present, increases the information about the Past and still has dark unknown Future before it. In this case the tester has no the possibility of seeing a future inherently, irrespective of mistakes, a trader could commit when writing a strategy.
 
This i know, you did not understand the question, i am not picking into the futur, i am asking past price at the start date of the teste 2000 bars ago, here are the steps :

1) you have 10 000 bar in your history from now to 2 month ago

2) you start the strategy at the today's date in the tester , ask for Close[2000] , the function returns 0, if i aks for Close[999] it does work, why ?

PS: it seems to work in "live" mode thought....
 
You can set up more interval than you need for the strategy tester and explicitly write into EA the start date for open first order.
 
Can you please point me the MQL4 part stating that we have a limitation to access no more than 1000 bars in the tester, because it really sounds like a bug to me.... , Close[2000] returns 0 even if you have 10 000 bars in your history, i think you should fix your bug.
 
Why you want to have more than 1000 bars while testing starts? Why do mix number of bars in testing start and whole bars? If you really did read articles in the Tester section you must now this difference.
 
You are funny, you DO mix up bars, not me, you have hard time to really understand the question or maybe you do in purpose, anyway, let me phrase it again, you simply CANNOT access historical data even if it should be available at the time where the EA is running in the tester :

1) I have data from year 2004 to year 2008
2) I start the EA at July 2006 in the tester, running the EA in 15mn bars, i am asking close[2000], it returns 0, it should not since i have data from year 2004 and asking for those data are not "picking" into future.

Like it or not, that's a bug in your software unless it is a feature to limit the access to past data to a thousand bar in the tester, btw, the question is not "why do i need to access 1000 bars or more" but "why i cannot".

can you please stay focus on the question and give a serious answer please ?
 
You can start testing from 2004 year and do request to Last from 2006 year. What's a trouble?
If you really want then you can to.
 
Rosh :
You can start testing from 2004 year and do request to Last from 2006 year. What's a trouble?
If you really want then you can to.

Do this issue have a solution now ?

If someone does not understand the problem, here is a small code to run in the backtester:

int init()
{

   Print("iBars M1: ", iBars(NULL, PERIOD_M1));
   Print("iBars M5: ", iBars(NULL, PERIOD_M5)); 
   Print("iBars M15: ", iBars(NULL, PERIOD_M15)); 
   Print("iBars M30: ", iBars(NULL, PERIOD_M30)); 
   Print("iBars H1: ", iBars(NULL, PERIOD_H1)); 
   Print("iBars H4: ", iBars(NULL, PERIOD_H4)); 
   Print("iBars D1: ", iBars(NULL, PERIOD_D1)); 
   Print("iBars W1: ", iBars(NULL, PERIOD_W1)); 
   Print("iBars Mn1: ", iBars(NULL, PERIOD_MN1));

   return(0);
}
The result is :
17:06:24 Check_iBars: loaded successfully
17:06:24 Check_iBars started for testing
17:06:24 2008.09.15 00:00  Check_iBars EURUSD,M5: iBars M1: 1001
17:06:24 2008.09.15 00:00  Check_iBars EURUSD,M5: iBars M5: 1001
17:06:24 2008.09.15 00:00  Check_iBars EURUSD,M5: iBars M15: 1001
17:06:24 2008.09.15 00:00  Check_iBars EURUSD,M5: iBars M30: 1001
17:06:24 2008.09.15 00:00  Check_iBars EURUSD,M5: iBars H1: 1001
17:06:24 2008.09.15 00:00  Check_iBars EURUSD,M5: iBars H4: 1001
17:06:24 2008.09.15 00:00  Check_iBars EURUSD,M5: iBars D1: 1001
17:06:24 2008.09.15 00:00  Check_iBars EURUSD,M5: iBars W1: 0
17:06:24 2008.09.15 00:00  Check_iBars EURUSD,M5: iBars Mn1: 0

At the testing time (2008.09.15) I have more than 1000 bars on all timeframes, included W1 and MN1 (300 bars).

All iFunctions trying to access datas with a "shift" higher than 1000 returns 0, and no one bar from W1 and MN1 is accessible.

From where those limitations are coming from ? and how to bypass them ???

Thank you for your reply !

 

See article Testing Features and Limits in MetaTrader 4.

Weekly, monthly, and irregular timeframes are not tested

 
Rosh :

See article Testing Features and Limits in MetaTrader 4.

Weekly, monthly, and irregular timeframes are not tested

Rosh,

Thank you for your reply. I understand that W1 and Mn1 cannot be the main timeframe of the tester, and they are not as option in the drop down box to choose the timeframe.

But those bars, their OHLC, without modelling, should be accessible from a lower timeframe by all iFunc().

Also this didn't answer to the 1000 bars limitations on all the other regular timeframes.

The problem is that after few backtests, all seems to come back in order:

The Mn1 bars are ok and few minutes later many more bars are "found"; the W1 bars are also found (still with 1002 limitation)

2009.01.16 22:02:07 2008.09.15 23:59  ActivePivot EURUSD,M5: iBars Mn1: 234
2009.01.16 22:02:07 2008.09.15 23:59  ActivePivot EURUSD,M5: iBars W1: 0
2009.01.16 22:02:07 2008.09.15 23:59  ActivePivot EURUSD,M5: iBars D1: 1001
2009.01.16 22:02:07 2008.09.15 23:59  ActivePivot EURUSD,M5: iBars H4: 1006
2009.01.16 22:02:07 2008.09.15 23:59  ActivePivot EURUSD,M5: iBars H1: 1024
2009.01.16 22:02:07 2008.09.15 23:59  ActivePivot EURUSD,M5: iBars M30: 1048
2009.01.16 22:02:07 2008.09.15 23:59  ActivePivot EURUSD,M5: iBars M15: 1096
2009.01.16 22:02:07 2008.09.15 23:59  ActivePivot EURUSD,M5: iBars M5: 1288
2009.01.16 22:02:07 2008.09.15 23:59  ActivePivot EURUSD,M5: iBars M1: 2418
2009.01.16 22:19:35 2008.09.15 23:59  ActivePivot EURUSD,M5: iBars Mn1: 234
2009.01.16 22:19:35 2008.09.15 23:59  ActivePivot EURUSD,M5: iBars W1: 1003
2009.01.16 22:19:35 2008.09.15 23:59  ActivePivot EURUSD,M5: iBars D1: 1013
2009.01.16 22:19:35 2008.09.15 23:59  ActivePivot EURUSD,M5: iBars H4: 1068
2009.01.16 22:19:35 2008.09.15 23:59  ActivePivot EURUSD,M5: iBars H1: 1264
2009.01.16 22:19:35 2008.09.15 23:59  ActivePivot EURUSD,M5: iBars M30: 1527
2009.01.16 22:19:35 2008.09.15 23:59  ActivePivot EURUSD,M5: iBars M15: 2052
2009.01.16 22:19:35 2008.09.15 23:59  ActivePivot EURUSD,M5: iBars M5: 4133
2009.01.16 22:19:35 2008.09.15 23:59  ActivePivot EURUSD,M5: iBars M1: 16121


So two consecutive BTs do not give the same result because they do not use the same set of bars !!!

My question is: how to understand this behavior, and how the EA can know that the "pumping" is finished and the set of bars and the tester are stabilized ?

Reason: