-
It takes time to open an order (network to, server queue, values verified, network back). Yet the market is always moving.
You need to refresh prices before the second send.
-
Why are you opening two? Because of FIFO rules, the first order must close first.
NFA Enforces FIFO Rule, Bans Forex Hedging in US Forex Accounts - Trading Heroes (2016)
FAQ: FIFO in the Forex Market - BabyPips.com (2011)Most brokers won't let you set independent TPs. SL will always be the same. Closing orders must be done specially.
OrderModify changing all open orders reguardless of ticket# - MQL4 programming forum #1.2 (2020)Just open one order with twice the size and do a partial close at the first TP level.
OrderClose fails in Tester - error 138 (requote) - MQL4 programming forum #2.4 (2023)

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I am trying to place to orders one after the other in my EA script. When I try to trade it live, the first one goes through, but the second never does. It comes back with this error saying order failed off quotes. Is there a way to fix this? I am trying to open up two orders with different take profits at the same time. Right now this is just two ordersend functions one after the other. I haven't been able to find a solution.
So if it is a buy signal, I would place two buy orders at the same price and stops, just different tp. Thanks in advance