The issue is caused by the OrderAction syntax used when exiting a long position. The order action received is 'Sell' rather than 'SellToCover'. If the Leader account enters and exits a trade fast before the Follower accounts have entered a trade, the followers are entered into a SHORT position which is a major problem.
These are the OrderAction commands sent by NinjaTrader when an order is executed. As you can see, the LONG OrderAction syntax is problematic:
LONG entry/exit:
Entry-Execution received: Buy on Leader account.
Exit-Execution received: Sell on Leader account.
SHORT entry/exit:
Entry-Execution received: Sell on Leader account.
Exit-Execution received: BuyToCover on Leader account.
The coding guide makes mention of a 'OrderAction.SellShort', but I am having trouble receiving this command. What is the correct way to properly distinguish entries from exits? Specifically - is there a way to distinguish a LONG exit from a SHORT entry order?

Comment