IBarShift error - page 2

 
Filip Pop:- logs show MT4 failing to get the time and index of the bar with index 1001 inside OnInit
  1. Do not look at bars in OnInit, there is no chart yet.
  2. The tester guarantees that there are 100 bars of the current time frame. Do you have 1000+ bars of history before the starting date of the test?
 
Filip Pop:


There sure appears to be one, I've replicated and reduced the problem to this - when trying to get the index of the bar that is more than 1000 bars behind the point where the test started in Strategy tester, iBarShift will erroneously return 1000 - that is the maximum, even if you have data past that. The next bar you'll have available 10001 bars back, still 1000 bars prior to the test start.

...

If you think this 1000 limitation is due to any settings, then please share your secret with us.                                                                     


There is NO "1000" limitation on iBarshift. Don't you understand your tests are just proving it ?

There is a limitation in Strategy Tester. The topic was not about Strategy Tester but live chart so yes it is" a specific issue, depending on your settings, data and code."