Scenario:
- My strategy calls AtmStrategyCreate() several times to initiate long positions.
- Some get filled, and have positions running.
- Some of those that get filled exit with a profit or loss.
- Some don't get filled but are still waiting to enter.
- Then my strategy generates a short signal and calls AtmStrategyCreate() again to generate some short entries.
- I need to know what long positions are still out there so I can close them, and what ATM strategies are still out there waiting for their entries to be filled, so I can cancel them.
Is this possible? I can easily generate a List of ATM strategies I've created, but I have no way of knowing, after calling AtmStrategyCreate(), what happens to them. Which ones went away due to exiting, and which ones haven't been filled yet, and which ones have positions running?
(Also, does AtmStrategyClose() work only on ATM strategies with open positions, or does it cancel any ATM strategies that haven't yet filled their entry orders?)
-Alex

Comment