I've create a loop that calculates a previous date and then the iBarShift from this, but it doesn't seem to work) what am I missing?
The result seem to stop working/repeat after a certain limit... I'm not missing any candle data (downloaded from TickStory - no issues)
Yet went it shifts bar from a different date it works (implying data there for that candle).... although this one repeats after 1549
But some of them (from different starting points) work well into the 1000s of candle shifts rather than maxing out
try this
int Bar = iBars(_Symbol,_Period); for(int r = 0; r <= Bar; r++)
try this
I've create a loop that calculates a previous date and then the iBarShift from this, but it doesn't seem to work) what am I missing?
You are trying to get the shift of a bar that does not exist, so it returns the highest bar index.
The strategy tester starts with 1000 bars history.
You are trying to get the shift of a bar that does not exist, so it returns the highest bar index.
The strategy tester starts with 1000 bars history.
You are trying to get the shift of a bar that does not exist, so it returns the highest bar index.
The strategy tester starts with 1000 bars history.
ahhhh, I see, from the start date it can only go back 1000 bars, but once it moves through it can go back further
So instead of testing from say 2010-01-01, I'd start from 2009-07-01 and set the EA to not trade until 2010 so that the strategy tester will have enough bar shift history avaiable
ahhhh, I see, from the start date it can only go back 1000 bars, but once it moves through it can go back further
So instead of testing from say 2010-01-01, I'd start from 2009-07-01 and set the EA to not trade until 2010 so that the strategy tester will have enough bar shift history avaiable
That's it.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I've create a loop that calculates a previous date and then the iBarShift from this, but it doesn't seem to work) what am I missing?
The result seem to stop working/repeat after a certain limit... I'm not missing any candle data (downloaded from TickStory - no issues)
Yet went it shifts bar from a different date it works (implying data there for that candle).... although this one repeats after 1549
But some of them (from different starting points) work well into the 1000s of candle shifts rather than maxing out