I am running a strategy where I set a stoploss at the moment of entry. This all works fine.
Then at some point I take a partial profit (lets say 50%). I notice that the stoploss still holds the original quantity. So I need to adjust it to the remaining quantity.
I put the SetStopLoss(CalculationMode.Price, dblEntry) code into the OnPositionUpdate method, but this doesnt seems to work. The order is not submitted.
How can I best call a SetStopLoss method so that the remaining amount of shares left in the position is adjusted?
Thanks.
Comment