My expectation then is that while running a live sim on the same strategy with COBC = true, entries would be at the same time as the backtest time stamp, as well as exits based on the strategy signal changing (not stop loss or target being hit). However, in live sim trading all of my strategies ALWAYS enter trade BEFORE the backtest time stamps -- it's like COBC is set to false or completely ignored, and the strategies jump in immediately on signal instead of waiting until the close as the backtest does.
The real problem appears to be on exit though. While my entries vary slightly in price, they are usually within a tick (live sim vs backtest), but the exits can vary wildly. Again, it seems as if the live strategy is using COBC = false, so as soon as the signal reverses or indicates exit, the strategy hops out/exits intra-bar. The backtest meanwhile waits until bar close, which often means that the exit signal has disappeared or changed, and thus it does not exit the strategy. I've attached screen shots of performance in back test vs. live sim for the same strategy, and you can clearly see the difference between the two, as well as that the live sim entries are not at all on bar close and always preceed the backtest time stamps. The result in performance was that the loss in live sim trading was over TWICE as bad as backtesting would indicate it should be.
Let me also point out the following to be clear:
Strategy code is COBC = true
Dialogue/GUI box setting is COBC = true
All strategies use market orders for entry
All strategies have limit and stop orders for target and profit, but also use market orders for exit if indicator signals change (which should be calculated upon, and thus exit upon, bar close)
In spite of all this, live sim strategies consistently enter and exit intra-bar, thus giving different results than the live backtest, almost universally for the worse.
So my question is, why are the strategies not entering and exiting at the same time as the backtest, and how can I get the live strategies to operate in the same fashion as the backtest in terms of timing? I am aware that Ninja backtesting can only calculate and execute on bar close, and that is fine -- I can make a profitable strategy in backtesting using that limitation. The problem is getting live performance to operate in the same manner. Everything I have read indicates that simply setting COBC to true will function the same, and yet it is not.
Regards,
Andrew
Comment