Trailing stop & order modify error 1 - page 2

 
Proximus:

Hi i`m trying to build a trailing stop, and it's working fine but sometimes i get a nasty order modify error 1.I don't know if it's harmful i've read the documentation it is when the value is unchanged i guess,but the question is how to resolve it :D .Hew is my code:

it caused modify at same price.


try this

double newSL = ......

for example BUY

if(Bid-OrderStopLoss()>trailiing*Point && OrderStopLoss()<newSL) ticket= OrderModify(..............