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

Back to topics list To post a new topic, please log in or register
avatar
4
oilyjaah 2016.01.22 10:07
 

i would like to do trailling stop only once a bar 

can anyone help pls? 

avatar
Moderator
3427
GumRai 2016.01.22 11:43 #
 
    
      static datetime bar_time=0;
      if(Time[0]!=bar_time)
        {
         bar_time=Time[0];
         //Trail stop code
        }
.
avatar
4
oilyjaah 2016.01.22 12:33 #
 
thank you
Back to topics list  

To add comments, please log in or register