I would like to get some feedback based on the attached log snippet.
My strategy opens a short position with 2 contracts and uses SetStopLoss and SetProfitTarget to set the exit orders.
An error of some kind happens when submitting the Target, but execution continues and the log seems to show that orders made it to the state where they could exit the trade as intended.
Then the profit target is hit and partially filled and chaos ensues.
Instead of my position reducing from Short 2 to Short 1 contract, it is now Long 4 contracts. ?!?!
Next, the target order continues to fill (buy to cover) and the final position is now Long 5 contracts instead of Flat.
It appears that after the error on submitting the target, Ninja thinks the strategy is Long and not Short
This is running on a sim account with a live feed from Continuum and there is no manual intervention. This is 100% the strategy.
Each call for the stop loss is: SetStopLoss ( TradeNumber + " Entry", CalculationMode.Ticks, StopLossTicks, false );
Each call for the Target is: SetProfitTarget( TradeNumber + " Entry", CalculationMode.Ticks, TargetTicks );
Comment