Experts: Close All Orders by Current Symbol

 

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

 
it doesnt close trade . Please check
 
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)

 

Bugs: EA can't close SELL order 

Modfy this code (line 90):

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

 

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.

 
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()) 

 
Thank you dear.
 
Can you make it so that you have a choice.  Close ONLY all buy orders. Or only all sell orders for that symbol.
 
IslandBound :
Can you make it so that you have a choice.  Close ONLY all buy orders. Or only all sell orders for that symbol.
Close All Positions Type : You can specify the position type and profit type. One limitation: the EA works for all symbols and for all Magic numbers.
Reason: