Ad ogni chiusura barra

 
Buongiorno a tutti,gentilmente come faccio a far eseguire il comando ad ogni chiusura di barra invece che ad ogni tick? Nello specifico vorrei ricevere un alert mail ad una data situazione( incrocio medie),ma all avvenuto incrocio vengo bombardato di mail ad ogni tick!!!!!!!! Come risolvere?? Grazie mille!!!!
 
Detecting the start of a new bar or candle
Detecting the start of a new bar or candle
  • www.mql5.com
Detecting the start of a new bar or candle, in the OnTick() event handler of an expert advisor.