AtmStrategyChangeStopTarget(GetAtmStrategyPosition AveragePrice(ATR)-((ATR-GetAtmStrategyPositionAveragePrice(atmStrategyId1) )*2),0, "TARGET1",atmStrategyId1);
The objectives are as follows (say in a long position)
1. On entry the ATR stop moves upwards as the price moves upwards. This works as it should.
2. The 2 x ATR target should be fixed based on the value on entry. The problem with the above code is when the price moves up the ATR target is moving up as well. I want it to fix the ATR target at the point of entry.
So the question is how would I store and access the value of 2 x ATR at the point of entry so it doesn't move up as the price moves up?
Thanks in advance
DJ
Comment