Time condition for an indicator

 
bugati1989:
Hi everyone,
Can someone help me to write a condition for an indicator to send alerts only if the candle's open time is less than 59 seconds for M5?
Thank you in advance!
if(TimeCurrent()<Time[0]+59)
  {
    Alert("...");
  }
 
Alain Verleyen:
if(TimeCurrent()<Time[0]+59)
  {
    Alert("...");
  }

Very helpful. Thank you so much Alain!
 
whroeder1:
  1. If you want an answer for MT5, the above code won't work as there are no predefines.
  2. If you want an answer for MT5, why did you post in the MT4 forum?
I think the OP meant by M5 exactly that (5 min chart) and not MT5, but I could be wrong!
 
Fernando Carreiro: I think the OP meant by M5 exactly that (5 min chart) and not MT5, but I could be wrong!
That is more likely - need more coffee :)
 
Thank you guys, I have fixed this.