which candle number we are in
int Higher_Timeframe=PERIOD_H4; datetime higher_time=iTime(Symbol(),Higher_Timeframe,0); int shift=iBarShift(Symbol(),0,higher_time); Comment("Candle is number "+(string)(shift+1));
This should give you a start
Note that if there is not a candle that has the same open time as the higher time-frame. it may be out by 1
Hi,
assuming that i'm viewing a one hour chart and i would like to know the current candle number from candle of four hours .( Is the current candle in one hour chart equal to (first candle , second candle , Third candle OR fourth candle))
I would like to show only the numbers as a comment.
Comment("Bar number", 2)