stepped trail ordermodify errors - page 2

 
robofx.org:

I'm sorry but didn't get what the problem is. What is that zero stop ?

What exactly are you trying to accomplish?

I'm trying to get a stepped trailing stop. For example when prices reaches +20pips, it moves the stop to break even. When price reaches +50 pips, it moves the stop to +30.

The problem is that at the moment the steps work so price reaches 50 and the stop is modified to 30. However, when price comes back to 30, instead of being stopped out, the EA changes the stop back to zero. So, it is changing to stop again.

 
SanMiguel:

I'm trying to get a stepped trailing stop. For example when prices reaches +20pips, it moves the stop to break even. When price reaches +50 pips, it moves the stop to +30.

The problem is that at the moment the steps work so price reaches 50 and the stop is modified to 30. However, when price comes back to 30, instead of being stopped out, the EA changes the stop back to zero. So, it is changing to stop again.

As I said earlier, use your initial code in reverse order. Still don't get what is the point of using this kind of trailing stop. Do you believe a single tick will move the price 250 or 300 pips away?

Most of the time just FirstTP will be executed.

Reason: