Change SL

 

hi, my name is Emanuele. How can I change the current order SL?


int ControlloSL(){

  int c=0;

  for (c=0;ticket[c] != 0 ;c++){

  if (OrderSelect(ticket[c],MODE_TRADES) == true){

         if (OrderProfit()> 0){

      OrderModify(ticket[c],OrderOpenPrice(),Open[0],OrderTakeProfit(),0,Yellow);

      Print("Ordine modificato : ", ticket[c]);

   }}

  }

  return(INIT_SUCCEEDED);

  }
 

Forum on trading, automated trading systems and testing trading strategies

When you post code please use the CODE button (Alt-S)!

Use the CODE button

Reason: