Robert: I'm trying to set a pending order, and want the order to expire at the end of the 4hr candle, however when I set everything up it flashed up with 'invalid expiration'. Not sure why this is happening?
If you want help, then show us what you are doing. We cannot read your mind or see your computer.
- Not all brokers allow expiration. Ask yours.
-
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.
- 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.)
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
I'm trying to set a pending order, and want the order to expire at the end of the 4hr candle, however when I set everything up it flashed up with 'invalid expiration'. Not sure why this is happening?