Hi all,
A pending order was issued at 10am with a target price of X. At 11am price reached X so the pending order becomes a market order.
Question is how to prevent that if current Spread is above a certain value?
Any idea ?
Yes, don't work with pending orders. If they become triggered, you have no chance to influence at which spread they are executed.
You can only solve that via an EA that checks if the target price has been reached, then checks the spread, and then places the order.
Yes, don't work with pending orders. If they become triggered, you have no chance to influence at which spread they are executed.
You can only solve that via an EA that checks if the target price has been reached, then checks the spread, and then places the order.
Thank you very much Daniel.
Don't use pending orders.
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.
Don't use pending orders.
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.
Thank you very much William ,
So I plan to change the EA so it can monitor the current Ask/Bid prices, verifying if they have met the target price, and then reassessing the signal validity before placing the order.
Please consider which section is most appropriate — https://www.mql5.com/en/forum/172166/page6#comment_49114893
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi all,
A pending order was issued at 10am with a target price of X. At 11am price reached X so the pending order becomes a market order.
Question is how to prevent that if current Spread is above a certain value?
Any idea ?