My goal is, when my strategy starts, it can sell my existing bought stocks in my account. This stock could be bought manually.
I don't need to handle pending orders. All previous pending orders are cancelled. I only need to handle existing bought stocks.
It seems all available options for "Syncing Account Positions" don't fit my needs:
1) Wait Until Flat
This option doesn't work as my Account position is not flat
2) Wait Until Flat, Sync account
This option doesn't work, because the strategy needs to submit a market order to flat my account. I need sell my stock using the strategy.
3) Immediately submit
4) Immediately submit, Sync account
Without using EnterLong() first, I cannot use ExitLongLimit() to sell my existing stock from my account.
5) Adopt account position
This option handles orders only. So it doesn't resolve my needs.
Currently I can only use unmanaged method to sell my existing stocks, is there a way to use managed method to sell? Thanks.
Comment