If the first profit target is hit I would like to move the stop for the remaining two positions. I realise I can use the following syntax:
SetStopLoss("LongEntry2",CalculationMode.Price,stoplossnew,true);
SetStopLoss("LongEntry3",CalculationMode.Price,stoplossnew,true);
assuming LongEntry1 is closed due to profit being hit. But how would I catch the event that the target is hit for LongEntry1?
I can use code such as
profit = GetCurrentBid() - LongOrder.AvgFillPrice;
to calculate the current profit on an open position but wish to catch the event of a position hitting its target. Is this done using the
OnPositionUpdate event?
Comment