bolyhos:
I just can't figure it out
I just can't figure it out
I don't think your OrderDelete() fails, but if it does don't you want to know why ? and if it does wouldn't you want to know some additional information ? such as Bid, Ask, OrderOpenPrice(), etc ?
Read this: What are Function return values ? How do I use them ?
This is why all your pending order are not deleted, your loop needs to count down, not up . . .: Loops and Closing or Deleting Orders
bolyhos:
Thank you very very much!!!
Those articles were really helpful. Is there any collection of that type of articles where the functions and problems go with them are analyzed in details. Because mql4 documentation does not explain everything like this.
Only if someone writes one for free in their own time . . . Thank you very very much!!!
Those articles were really helpful. Is there any collection of that type of articles where the functions and problems go with them are analyzed in details. Because mql4 documentation does not explain everything like this.


You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
- price of 1.32987 buy order opens immediately when the EA starts
- at the time when the above buy order opened price of 1.33037 and 1.32919 pending buy orders placed as well
(there are pending sell orders as well but that doesn't matter now, i think)
So if the price movement triggers one if the pending buy order, the other should be deleted by the EA
But today morning 3 buy market order were in the terminal
How can it happen if there is about 100 points range between the 2 buy pending orders, the currency is EURUSD with roughly 20 points spread
and the EA runs at night and between the 2 buy pending orders opening there was a 4 hours long period (see the picture below)
I just can't figure it out