3rd M1 bar of M15

 

Hi


Is there any way to identify 3rd M1 bar of a new M15 candle?


thanks.

 
richo:

Hi


Is there any way to identify 3rd M1 bar of a new M15 candle?


thanks.



 
Yes, get the time of the M15 bar, add on 120 seconds.
 
RaptorUK:
Yes, get the time of the M15 bar, add on 120 seconds.

thanks that was quick. I am a beginner in mql. can you please elaborate little bit.
 
richo:

thanks that was quick. I am a beginner in mql. can you please elaborate little bit.

Figured it out. Thanks


   datetime M1BarTime = iTime(Symbol(),PERIOD_M15,0);
   Comment("M15 Open Time ",TimeToStr(M1BarTime,TIME_MINUTES),"\n",
           "M1 Open Time ",TimeToStr(M1BarTime+120,TIME_MINUTES));
 
richo:

Figured it out. Thanks

Well done . . and you learned something in doing it :-)
Reason: