I am writing a strategy where I want to take profit manually.
Once I manually take profits I want to stop the strategy.
It appears that the handlers in StrategyBase like OnExecution, OnOrderUpdate do not get called if the order is not generated by a strategy.
How do I accomplish my requirements ?
I did read about ATM strategies and how one can take profit , send a stop loss, use OCO orders etc.
Unfortunately I do not have a preset take profit level - this is up to the trader's discretion so the ATM appears to not be useful for this case.
Another considered possibility was polling every second to check account position but a lot can happen in one second so this is not an optimal workaround.
What is the best approach to code up this manual take profit to tie in with a strategy?

Comment