Lets I have code as such:
SetStopLoss(signalNameFinal, CalculationMode.Price, stopPrice, false); // Set stop loss
SetProfitTarget(signalNameFinal, CalculationMode.Price, targetPriceFinal); // Set profit target
EnterShortLimit(0, true, contractsToTrade, entryPrice, signalNameFinal);
So this is setup upon EnterShortLimit executing we have the managed setStopLoss and SetProfitTarget set, as they all share the same signalName.
My question is this, either that Target or that stop is going to execute - how do I know via code which one is triggered? I didn't see distinction in orderState.
I need to use that knowledge to perform logic, ex:
If trade stops out do ABC, if trade hits target do XYZ.
Thank you

Comment