Closing a selection of trades

 

Hi,

Using an EA, How does can one close only a selection of orders or trades from a number of orders on one currency within the same EA? Should one differentiate them by Magic number upfront (when placing orders) and then close them according to Magic number, or is there another way?

Many thanks

 
stylesp:

Hi,

Using an EA, How does can one close only a selection of orders or trades from a number of orders on one currency within the same EA? Should one differentiate them by Magic number upfront (when placing orders) and then close them according to Magic number, or is there another way?

Many thanks


You can select on ordertype( ) orderopenprice( ) orderstoploss( ) ordertakeprofit ( ) orderopentime( ) Ordermagicnumber( ) ordersymbol( )
 
deVries:

You can select on ordertype( ) orderopenprice( ) orderstoploss( ) ordertakeprofit ( ) orderopentime( ) Ordermagicnumber( ) ordersymbol( )
Reason: