What I'm trying to do is move the second target to BE once the first target is hit. This is easy if I have predefined target without moving the target. ie if I set the first target as vwap then the stop for the remaining contract will move to breakeven once vwap is hit with the following code:
if (Close[0]> vwap1)
{AtmStrategyChangeStopTarget(0, GetAtmStrategyPositionAveragePrice(atmStrategyId1) , "STOP2", atmStrategyId1);
}
The problem now is once I manually move the target on entry I'm not sure how to reference it using programming as I have no reference. I need to say something like "if TARGET1 has been reached" or if TARGET1 is no longer active then move stop as follows:
GetAtmStrategyPositionAveragePrice(atmStrategyId1) , "STOP2", atmStrategyId1);
I couldn't find anything in the manual or in the threads about this specific issue. I did find this so not sure how it fits in:
string[] entryOrder = GetAtmStrategyEntryOrderStatus("orderId");
Thanks in advance
DJ
Comment