Download MetaTrader 5

how to code EA to do trailling only once a bar? pls help

To add comments, please log in or register
oilyjaah
28
oilyjaah  

i would like to do trailling stop only once a bar 

can anyone help pls? 

Keith Watford
Moderator
10617
Keith Watford  
    
      static datetime bar_time=0;
      if(Time[0]!=bar_time)
        {
         bar_time=Time[0];
         //Trail stop code
        }
.
oilyjaah
28
oilyjaah  
thank you
To add comments, please log in or register