I need some way to trigger the strategy so that if I have an open position, I will close it and cancel any pending orders. Several times per week I seem to end up with "phantom" positions. Appears to be related to using the Close positions on Session close functionality. The strategy is not aware that the position was closed, and I end up with phantom positions opening when it thinks it is closing a position.
To avoid this, I rather just get a callback in my strategy so that I can close and cleanup. Thoughts?
Comment