paulselvan: why nothing is displayed by Comment(t) ?
Because your indicator crashed. When counted_bars is zero, limit equals Bars, and Time[Bars] does not exist.
Start using the new Event Handling Functions.Event Handling Functions - Functions - Language Basics - MQL4 Reference
See How to do your lookbacks correctly.
No need for the decrement. Contradictory information on IndicatorCounted() - MQL4 and MetaTrader 4 - MQL4 programming forum
thank you for the info

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
Hello
I meet problem with indice of TimeHour()
When the indice is a constant like :
TimeHour of indice 2 is properly displayed.
-------------------------------------------------------------------------------------------------------------------------------+
But with its indice is a variable :
When integer variable limit - function of Bars or IndicatorCounted() - is indice of function TimeHour() why nothing is displayed by Comment(t) ?
Thank you