I hope this message finds you well. I'm writing to seek your assistance with an unexpected issue I've been experiencing in my NinjaTrader strategy.
For quite some time, my strategy has been operating smoothly, but I recently encountered an anomaly where the strategy executed two contracts instead of the usual single contract. This was unexpected and despite my best efforts, I've been unable to determine the root cause.
I've meticulously reviewed my code to ensure there are no hidden triggers that could cause this, but everything appears to be in order. In the interest of precaution, I've even gone ahead to remove certain segments of code that might have influenced the contract number. However, these codes should not have such an impact as within the 'OnBarUpdate' method, there's a check for a Boolean value which is defaulted to false, and subsequently exported to the UI for controlling larger contract volume. The strategy also checks for specific hours to initiate larger contracts.
Interestingly, the timing for entering on a larger volume is consistent with the chart pattern, which leads me to worry that this anomaly might be somehow tied to my code. However, it's worth noting that my partner and I run the code separately on two different PCs, and yet, both of us experienced the same issue - our systems entered two contracts instead of one.
Adding to the puzzle, I've run a market playback immediately after this incident and the system entered just one contract on the same trade without any issue. This adds to my confusion about what could be causing this anomaly.
To provide a more comprehensive perspective, I would like to share my log files with you. Could you please provide an email address where I can send these files? Your prompt attention and guidance would be greatly appreciated as I rely heavily on this strategy for my trading activities.
Looking forward to your response.
Best regards,
Aviram Y.

Comment