I use the following command for entry and setting the stoploss :
SetStopLoss("Long-25",CalculationMode.Price,LastDayLow,false);
EnterLongLimit(0,true,15, Level25, "Long-25");
We are Long and also have a stoploss at LastDayLow. all is Ok so far.
after a certain period of time I issue a command to Scaleout of the position:
ExitLong(Convert.ToInt32(Position.Quantity/2),"Scaleout","Long-25");
and the command is indeed executed and now I have 8 shares Long.
after a while the price drops to the STOPLOSS level and I have the stop triggered.
BUT its triggered with original QTY of 15. and instead of closing the position I have 7 shares SHORT .
What am I doing wrong?. I need the Qty of the SETSTOP to be updated correctly.
do I need to issue SETSTOP command again for it to be updated or it should be updated automatically ?
Comment