if my tp(target) hit without taking (filling) my limit orders then automatically remove/delete my limit orders is this thing possible in mt5
for example I opened a short position current price is 5 my limit orders at 2 and my target is 7 if price directly reaches to 7 without coming to 2 then automatically delete my limits which are on 2 is this possible in MT5
- Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes
- Errors, bugs, questions
- if TP is hit do this and this
Of course, it's possible, code it.
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.

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