# IsNewBar() - specific time instead?

1639

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)?
16108

 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?
1639

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...
1639

Only just revisiting this point now. Call me slow, but:
1. If low is PERIOD_M15 it will be true xx:15, xx:30, and xx:45

How do I compare the current PERIOD_M15 with a certain time of the hour, every hour: XX:45?
Moderator
10612

DomGilberto:
Only just revisiting this point now. Call me slow, but:
1. If low is PERIOD_M15 it will be true xx:15, xx:30, and xx:45

How 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