Tracking a closed order

To add comments, please log in or register
Nelson Chinedu Odo
13
Nelson Chinedu Odo  

I open many trade of the same currency  at a time 

How can I write mql4/5 program that will close all 

The trade when any of those trade is closed by either stop loss 

Or take profit. I start my trading 7am everyday and I open 

Multiple trades. How can I do it. 

Marco vd Heijden
Moderator
8176
Marco vd Heijden  
By using the search function.
whroeder1
17940
whroeder1  
You know how many trades you opened. OrderSelect loop and count how many are still open. Less, close all orders.
  1. Using OrdersTotal directly and/or no Magic number filtering on your OrderSelect loop means your code is incompatible with every EA (including itself on other charts and manual trading.) Symbol Doesn't equal Ordersymbol when another currency is added to another seperate chart . - MQL4 forum
  2. In the presence of multiple orders (one EA multiple charts, multiple EA's, manual trading)
  3. learn to code it, or pay (Freelance) someone to code it. We're not going to code it for you. We are willing to help you when you post your attempt (using SRC) and the nature of your problem.
To add comments, please log in or register