I want to modify a pending sell limit order to a new Sell Limit price. The previous sell limit price is 0.89156, and High1=0.8905. That means I want to change the pending sell limit price from 0.89156 to 0.8905. Strangely the code is not working although it printed "High1=0.8905". Could anybody here give me hand? Many thanks!
Inserted Code
if(OrderSymbol() == Symbol() && OrderType()==OP_SELLLIMIT && MathAbs(OrderStopLoss()- High1 - stop_loss - Spread)>eps)
{
if (sma1-sma2 < -MAthreshold)
{
Print("High1=",High1); // this bit is working.
OrderModify(OrderTicket(),High1, High1+ stop_loss + Spread, High1 - TakeProfit,0,Blue);
}
else
OrderDelete(OrderTicket());
}