SetStopLoss(CalculationMode.Ticks, 4) // Sets stop loss
EnterLongLimit(4, High[1], "L"); // Buys 4 contracts
When some profit is achieved, I exit half the position:
ExitLong(2 ,"1h", "L"); // Sells 2 contracts
I now have 2 contracts remaining, but when my stop loss is subsequently hit, it sells 4 contracts, netting me short 2 contracts when I expect to be flat. I have also tried this with SetTrailStop, using the "from entry" field, but it works the same way:
SetTrailStop("L", CalculationMode.Ticks, 4, false);
What am I doing wrong? Thanks.

Comment