I want to backtest my strategy for single day, let's do 2jan2009.
I need BarsBackRequired=200;
So I start the StrategyAnalyzer , run it and debug, and in
OnBarUpdate() the first call arrives not at market open of the day , but the first call is 200 bars later.
Is there a possibility to run the BackTest also starting from mar****pen directly and not 200 bars later?
A simple fix would be to define the start date of the strategy 200 bars earlier, but 200 bars earliers is not a constant timespan, because there can be weekends, trading holidays , daylight saving time etc. in between.
So there is no easy way to find the exact timespan for 200 bars before.
The best would be if the strategy could just start on the datetime defined as SessionBegin and at the same time have also 200 bars more in the Bars object.
Any idea on how to setup a strategy in this way?
Andreas
Comment