Hello all, I'm currently developing an EA that needs to modify its open orders.
I used the codes shown below
<CODE REMOVED>
But it only works if the number of open orders is not more than two.
At three or more open orders, the OrderModify is simpy ignored.
Please, how do I sole this problem.
Please read some other posts before posting . . .
Please edit your post . . . please use the SRC button to post code: How to use the SRC button.
Where is your OrderSelect() ? please show enough of your code to be able to help you.
Why aren't you checking the return value from your OrderModify() and reporting errors and other useful variables if it fails ? This will help : What are Function return values ? How do I use them ?
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello all, I'm currently developing an EA that needs to modify its open orders.
I used the codes shown below
if(trailingstop>0)
{
if(Bid-OrderOpenPrice()>Point*trailingstop)
{
if(OrderStopLoss()<Bid-Point*trailingstop)
{
OrderModify(OrderTicket(),OrderOpenPrice(),Bid-Point*trailingstop,OrderTakeProfit(),0,Green);
return(0);
}
}
}
But it only works if the number of open orders is not more than two.
At three or more open orders, the OrderModify is simpy ignored.
Please, how do I sole this problem.