Download MetaTrader 5
To add comments, please log in or register
How to launch your trading signal and become a provider
Dominic Gilbert
1632
Dominic Gilbert 2014.11.03 15: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)?
whroeder1
13619
whroeder1 2014.11.03 16: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?
Dominic Gilbert
1632
Dominic Gilbert 2014.11.03 18: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...
Dominic Gilbert
1632
Dominic Gilbert 2015.01.25 21: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?
Keith Watford
Moderator
7918
Keith Watford 2015.01.25 22: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
/
To add comments, please log in or register