I'm not sure how to describe 100% correctly, but I will do my best.
This is the second time I faced this problem and it is puzzling me. I feel myself kind embarassed asking about that because although I am 100% sure that the strategy was compiled up to date but I have nothing else to back this claim because I have no logs from my side.
Some information that might help:
1) I'm using a custom renko bars with real high and low to avoid my historical backtesting results to differ from real time.
2) I'm using IQFeed connection.
3) Both backtesting and realtime uses CalculateOnBarClose = true
4) Symbol is WIN - Bovespa Future - Default session
The issue:
- My strategy gave today a false entry signal in realtime test.
- Backtesting the day gave the same result
- If I recompile the script, the backtest result is now different from what it was.
- Market Replay was tried to recheck the day and see if I can find a different outcome, but it ended up with the same result as Backtesting
To be able to gather more information I am now logging every single information of each bar and the workflow of the script for debugging.
Since it is not possible to go back to the old compiled state, since recompilation deletes the old file, I would like to know from support if you guys already faced the same problem and if it is possible to give some clues to track down this behavior.
Is the historical data in NinjaTrader updated after the market closes? Because I left IQFeed connection open and it might been a coincidence for me to recompile and get another result.
UPDATE::
Ok, I think i was able to narrow down my debugging. I do have some logging but I thought it was worthless (was kind mad to think straight). I tracked the functions that were called. It is a generic signal log, but there are only a very specific cases it will trigger.
This signal uses BOP (Balance of Power) value. If I remember correctly, the old signal that was triggered wrong days ago was also relying on BOP values. The signal never got to the threshold to activate, but it seems, somehow, it was triggered in realtime and backtesting before recompilation.
So it seems some indicator inconsistency, but I can't put my finger on what exactly is creating such behavior.
Losing the incorrect state was bad for me. Next time I will try to leave the computer untouched and recheck the results on another computer.
Comment