Today I experienced what I believe may be a bug or at least a very important discrepancy between live trading & backtest.
Upon initialization, my new strategy adds a secondary instrument that acts as a proxy for the main instrument. This secondary instrument is traded on another venue and therefore has a different session template.
The strategy is configured to close any open position at the end of the session. The session of the main instrument closes after the one of the secondary instrument.
In the strategy analyzer, the exit on close handler is only called at the close of the main instrument's session. I can see trades closed at the end of the main session.
However, it seems that during live trading the exit on close handler is also called at the close of the secondary instrument.
This lack of consistency is obviously a pretty big problem.
* Could you confirm this behavior?
* Is this a bug? If not, where is it documented?
* How can I fix that so that the exit on close handler is only called at the close of the main instrument's session?
Thanks!
Comment