I am not sure that it will help but I just found the simuilar thread about it (with replies):
-
Stop entry orders with OCO (One cancels the other)? and
- this EA from CodeBase: Place OCO Order, One pip Limit Order and One Pip Stop Order - expert for MetaTrader 4
- and one article: MQL5 Cookbook: ОСО Orders
all you need to do is count active orders (buy/sell)
if no active orders then delete all pending orders
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
Hi everyone,
I'm new here and I was trying to search for One Cancel Other but it didn't give me much of a result.
May I ask which "department" is the below function under? (expert advisor, indicator or something else)
Situation:
After I opened a trade, I will open another pending trade on the same pair.
If the existing trade is exited (Take profit), it will cancel my pending trade.
There will be times where my pending trade will be triggered and filled. And if that happens, I will have 2 open positions so the OCO is not longer needed
I hope I make sense above. I do hope someone can point me in the right direction. Thank you and have a good day!