help print function

 
how can I print a value on a graph? with this function I can do it but keep changing what I want is. example:
if profit> 10 print 20
20 must not change until the next condition 
profit> 20 printing 30
if profit returns to 10 remain in print 30
 double profitstopsell;

   if (OrdersTotalMagicsell (Magicsell)> = 5 && OrderProfit ()> = - 70 )
     {
      profitstopsell = 100 ;
     }
   
   if (OrdersTotalMagicsell (Magicsell)> = 5 && OrderProfit () > = - 50 )
     {
      profitstopsell = 70 ;
     }  
   if (OrdersTotalMagicsell (Magicsell)> = 5 && OrderProfit () > = - 30 )
     {
      profitstopsell = 50 ;
     }    
   Comment (

           "-------------- STOP LOS DINAMICO --------------" , "\ n" ,
             "ST.SELL =" , profitstopsell);
   return ( 0 );
  }