I have one open position and one pending position ... I have enough margin but I dont want pending position to open when I already have one open position running.. I want to use buy stop or sell stop but I dont want to run two orders at same time even when I have enough margin... can you tell me how to disable multiple trading?
- How to Prevent EA From Opening Another Position if One Already Exists for Same Currency Pair
- Order priority??
- How to close all Pending orders in same time in Mt5
Yanan Nara:
I have one open position and one pending position ... I have enough margin but I dont want pending position to open when I already have one open position running.. I want to use buy stop or sell stop but I dont want to run two orders at same time even when I have enough margin... can you tell me how to disable multiple trading?
I have one open position and one pending position ... I have enough margin but I dont want pending position to open when I already have one open position running.. I want to use buy stop or sell stop but I dont want to run two orders at same time even when I have enough margin... can you tell me how to disable multiple trading?
Don't place a pending order where it can trigger before the open order hits SL or TP.
Well, as much as I know, you need to check your list of open Positions against the list of pending Orders.
Here as a starting point:
PositionsTotal() and OrdersTotal()
https://www.mql5.com/de/docs/trading
The processing should occur in
OnTrade()
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