English

## IsNewBar() - specific time instead?

 556 DomGilberto 2014.11.03 16:33   Can I change this:```//+------------------------------------------------------------------+   //| Ensuring its a new candle function                               | //+------------------------------------------------------------------+   bool IsNewCandle()    {       if(Bar1Time == iTime(NULL, low, 0))         return(false);              Bar1Time = iTime(NULL, low, 0);return(true);    }```So that if IsNewCandle() == True this refers to xx:45 (or quarter to the hour instead of on the hour)?
12985
WHRoeder 2014.11.03 17:17 #

 DomGilberto: So that if IsNewCandle() == True this refers to xx:45 (or quarter to the hour instead of on the hour)? If low is PERIOD_M15 it will be true xx:15, xx:30, and xx:45You've been posting here for 15 months. Why are you still posting trivial questions?

 556 DomGilberto 2014.11.03 19:55 #   You're right - I do 101 things all the time and should stop writing threads like this, sorry.Guess I am helping out the new guys who come on...maybe...
 556 DomGilberto 2015.01.25 22:25 #   Only just revisiting this point now. Call me slow, but:If low is PERIOD_M15 it will be true xx:15, xx:30, and xx:45How do I compare the current PERIOD_M15 with a certain time of the hour, every hour: XX:45?
 Moderator3407 GumRai 2015.01.25 23:18 #   DomGilberto: Only just revisiting this point now. Call me slow, but:If low is PERIOD_M15 it will be true xx:15, xx:30, and xx:45How do I compare the current PERIOD_M15 with a certain time of the hour, every hour: XX:45?Check for a new bar on M15, then check that TimeMinute(newbartime)==45