Is it possibly to create just an exit rule for robot (semi-robot) ?

 

Is it possibly, that I decide when to buy, and the robot would finish the rest of trade ?

If it can be possible, Is there an special function to do this interaction between me and the robot, to don`t create any kind on conflict ?

 

Thank you so much 

 
c.robredo:

Is it possibly, that I decide when to buy, and the robot would finish the rest of trade ?

If it can be possible, Is there an special function to do this interaction between me and the robot, to don`t create any kind on conflict ?

 

Thank you so much 

Hi Robredo, for sure is possible. You may need an EA so after you place the order the EA can do what you need.

For example can place the stop loss, can move with a trailing stop or close the order based on an indicator or take profit. Maybe you just need to hire a coder to create your EA.

 

If you are a coder than  

  1. Select order : OrderSelect()  
  2. Loop order by OrdersTotal() (gives all order) and select specific order.
  3. Close that order by OrderClose().

 

 To complete what Suraj said above

 

always use this loop in order to select orders and do what you want on them: 

     for (int cnt = 0; cnt < OrdersTotal(); cnt++)
     {
        int ticket_select = OrderSelect (cnt, SELECT_BY_POS, MODE_TRADES);
        
        if ( OrderType() <= OP_SELL
        &&   OrderSymbol() == Symbol() 
        &&   OrderMagicNumber() == magic_number) //optional
        {

//conditions and modifications

	}
}
 
Mohammad Soubra:

 To complete what Suraj said above

 

always use this loop in order to select orders and do what you want on them: 

To complete...

 for (int cnt = OrdersTotal()-1; cnt >= 0 ; cnt--)
     {
        int ticket_select = OrderSelect (cnt, SELECT_BY_POS, MODE_TRADES);
        
        if ( OrderType() <= OP_SELL
        &&   OrderSymbol() == Symbol() )
        //&&   OrderMagicNumber() == magic_number) //optional only when your entry was using a script to give them the magic_number.
        {

//conditions and modifications now include OrderClose

        }
}

 always use this Decrement loop in order to select orders and to close them: 

 
Atsushi Yamanaka:

To complete...

 always use this Decrement loop in order to select orders and to close them: 

good..!
 

hi robredo,


do you mean you want to open trade at a time you define?

yes, you can do it. just need some code.

Reason: