https://www.mql5.com/en/forum/160410/page2#comment_3818539 Same problem.
"Yes! When you use an EA, you can simulate Pending orders with Market orders and you can actually have much better control with Market Orders than pending orders ever will when done in an EA. In fact, that is what I do in my own EA's and I NEVER use pending orders."
What you think? Any way to implement his idea to my EA?
- 2016.10.21
- www.mql5.com
close the pending order before it activate.
not possible. how can you close pending order before you even place it?
try code alternative solution(s) for your system. i.e check pending price condition, before OrderSend()
https://www.mql5.com/en/forum/160410/page2#comment_3818539 Same problem.
"Yes! When you use an EA, you can simulate Pending orders with Market orders and you can actually have much better control with Market Orders than pending orders ever will when done in an EA. In fact, that is what I do in my own EA's and I NEVER use pending orders."
What you think? Any way to implement his idea to my EA?
What you are asking for is a Stop-Limit order. You can simulate with an EA by using the following logic.
if(Bid <= sell_stop_price && !pending_order_exists(OP_SELLLIMIT)) sell_limit_order(sell_stop_price);
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Dear developers,
My EA put 2 pending order before the news time. my broker is TRUE ECN and my account also TRUE ECN. I am using MT4.
Buy Stop at : 67.70
Sell Stop at : 67.30
With the news time Sell order activated by moving 22pips. So it placed with next available price. Price 67.30 no longer available and pending order move to next available price 67.08.
So what i want to do with my EA,
If that Sell Stop order price not available for activate as SELL at that exact level(Price moved with high GAP) then close the pending order before it activate. I do not know if it possible or not. But i need to know your knowledge about that.
I am using following code to put orders.
Or Is that possible to use Maximum price slippage with SELLSTOP, BUYSTOP orders to handle this?
Thank you.