Download MetaTrader 5
To add comments, please log in or register
MQL5 Reference is available in 8 languages. Learn MQL5 in the language that suits you best!
oilyjaah
28
oilyjaah 2016.01.22 09:07 

i would like to do trailling stop only once a bar 

can anyone help pls? 

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