Just open in the editor ...\Include\Trade\Trade.mqh
and search for OrderModify(). There you can see how to modify a pending order and all other things you might want to do like delete and place again ...
Hello
i am stuck on this one , appreciate any idea
my EA is placing Pending orders according to certain conditions , lets say will execute after 2 bars are bullish
after these 2 bars passed is another condition which will be one EMA on top of the other .
now if i placed the EMA condition from the start it cant be done as the EMA condition is not met yet
and i cant place it after as the pending orders are already on place
also monitoring the price and placing instant orders will tie up my EA
any thoughts
thank!
There is no need to create pending orders in code.
-
The pending has the slight advantage, A) you are closer to the top of the queue (filled quicker), B) there's no round trip network delay (filled quicker.)
Don't worry about it unless you're scalping M1 or trading news.
-
Humans can't watch the screen 24/7, so they use pending orders; EAs can, so no need for pending orders, have it wait until the market reaches the trigger price and just open an order.

- 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
i am stuck on this one , appreciate any idea
my EA is placing Pending orders according to certain conditions , lets say will execute after 2 bars are bullish
after these 2 bars passed is another condition which will be one EMA on top of the other .
now if i placed the EMA condition from the start it cant be done as the EMA condition is not met yet
and i cant place it after as the pending orders are already on place
also monitoring the price and placing instant orders will tie up my EA
any thoughts
thank!