Hedging EA , close losing positions with profitable trades ?

 

just wanted to ask the a question , 

what would be the mql4 code be for using profitable trades to close losing ones, using a hedge EA , bring equity back up from 5% loss to 3% loss ?

thanks

 
googs666:

just wanted to ask the a question , 

what would be the mql4 code be for using profitable trades to close losing ones, using a hedge EA , bring equity back up from 5% loss to 3% loss ?

thanks

OrderCloseBy

Closes an opened order by another opposite opened order.

bool  OrderCloseBy( 
   int        ticket,      // ticket to close 
   int        opposite,    // opposite ticket 
   color      arrow_color  // color 
   );


 
Fernando Morales:

OrderCloseBy

Closes an opened order by another opposite opened order.


thank you very much !