IsNewBar() - specific time instead?

Back to topics list To post a new topic, please log in or register
avatar
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)?
avatar
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)?
  1. If low is PERIOD_M15 it will be true xx:15, xx:30, and xx:45
  2. You've been posting here for 15 months. Why are you still posting trivial questions?

avatar
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...
avatar
556
DomGilberto 2015.01.25 22:25 #
 
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?
avatar
Moderator
3407
GumRai 2015.01.25 23:18 #
 
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
Back to topics list  

To add comments, please log in or register