I'm trying to understand why I'm getting different results when running a strategy using Market Replay vs. the Strategy Analyzer.
My strategy is using 3 min bars as well as tick data. The 3 min. bar data is used to generate trade signals and the tick data is used to manage the trade (moving stops, etc). In the OnBarUpdate() function I'm checking if 'BarsInProgress == 0' for the bar data and 'BarsInProgress == 1' for the tick data. I then branch off into different logic depending on what time frame I'm in.
When I run it using the Strategy Analyzer it seems as if the tick data is ignored. I'm assuming the reason is because the Strategy Analyzer doesn't allow the use of multiple time frames in the same manner as Market Replay or live data - is this correct? I have also noticed that the simulated stops don't work the same under each scenario.
I have read other posts in the forum and I think I understand what I need to do (including looking at the 'SampleEnterOnceExitEveryTick' sample strategy); but before I re-code my strategy I wanted to check that making these changes will help get similar results...
My understanding is that instead of adding another time frame to the strategy (ex. Add(PeriodType.Tick, 1) ) I need to set the CalculateOnBarClose = false while using 3 min. bars. I then should check if it's the 'FirstTickOfBar' and use that for my trade signals (actually looking back one bar). And if it's not the 'FirstTickOfBar' I then use my trade management logic (at the tick level).
Will making these changes get me similar results when testing the strategy using Market Replay and the Strategy Analyzer?
Any comments greatly appreciated.
Comment