Download MetaTrader 5

Experts: Close All Orders by Current Symbol

To add comments, please log in or register
Log in to MQL5.community using OpenID. It is convenient!
Automated-Trading
Admin
99093
Automated-Trading 2015.09.11 09:58 

Close All Orders by Current Symbol:

This EA will show the button that can used to close all orders by the current chart symbol.

Close All Orders by Current Symbol

Author: Gusti Risyadi Noor

Mohammed Abdul Baseer
978
Mohammed Abdul Baseer 2015.09.15 03:22  
it doesnt close trade . Please check
Gusti Risyadi Noor
1608
Gusti Risyadi Noor 2015.09.15 17:29  
Baseer:
it doesnt close trade . Please check

Thanks for your correction.

That miss for SELL order. EA just close BUY order.

 

Modfy this code (line 90):

 if(OrderType()==OP_BUY)   to  if(OrderType()==OP_BUY || OrderType()==OP_SELL)

Gusti Risyadi Noor
1608
Gusti Risyadi Noor 2015.09.15 17:31  

Bugs: EA can't close SELL order 

Modfy this code (line 90):

 if(OrderType()==OP_BUY)   to  if(OrderType()==OP_BUY || OrderType()==OP_SELL)

asim.iqbal
14
asim.iqbal 2015.09.30 15:11  

Sir the robot is closing all the order in all the pairs in same time. I have tested it. It is not closing the orders by Symbol. Please check.

 

Thank you.

 

Best regards.

Gusti Risyadi Noor
1608
Gusti Risyadi Noor 2015.10.01 18:37  
asim.iqbal:

Sir the robot is closing all the order in all the pairs in same time. I have tested it. It is not closing the orders by Symbol. Please check.

 

Thank you.

 

Best regards.

Thanks Sir, this is the right code.

Change this line 

if(OrderSelect(i,SELECT_BY_POS))

To 

if(OrderSelect(i,SELECT_BY_POS) &&  OrderSymbol()==Symbol()) 

asim.iqbal
14
asim.iqbal 2015.10.01 19:26  
Thank you dear.
To add comments, please log in or register