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
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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)