The problem is if I take say a long trade and add the second part of the code that changes the target it changes the target to below the price where the ATR stop is located and closes out target1 leaving target 2 still working, Any idea on what I'm doing wrong here? It should reset the target to +70 ticks over the entry price so no idea why it is changing it to where the ATR stop is located. Thanks. DJ
if (atmStrategyId1.Length > 0 && GetAtmStrategyMarketPosition(atmStrategyId1) != Cbi.MarketPosition.Flat)
{
AtmStrategyChangeStopTarget(0, ATR, "STOP1", atmStrategyId1);
AtmStrategyChangeStopTarget(Position.AvgPrice+70*T ickSize,0, "TARGET1", atmStrategyId1);
}
Comment