How to detect a new bar in RENKO chart?

crixtiano  

Hi there!

How to detect a new bar in RENKO chart?

How to programming this in MQL5 to Metatrader 5?

Thank you.

--
Cristiano Magalhaes

CodeFx  
//-- To work only at the time of the birth of new bar
   datetime time_0=iTime(m_symbol.Name(),Period(),0);
   if(time_0==m_prev_bars)
      return;
   m_prev_bars=time_0;
  { 
// ... do your stuff
       }
Reason: