Please don't use IndicatorCounted() function. It is the very old almost obsolete style of coding an Indicator in MT4. Use the more modern MQL4+ style with the OnCalculate() event handling function which is more compatiable with MQL5.
OK thanks for the help, I will go see and try to adapt my program with those, maybe the problem will be solved ))
-
You should stop using the old event handlers (init, start, deinit) and IndicatorCounted() and start using new event handlers (OnInit, OnTick/OnCalculate, OnDeinit).
Event Handling Functions - MQL4 Reference
How to do your lookbacks correctly - MQL4 programming forum #9-14 & #19 (2016) -
You know which bar is new. Use iBarShift to find the new H1 bar index.
On MT4: Unless the current chart is that specific symbol(s)/TF(s) referenced, you must handle 4066/4073 errors before accessing candle/indicator values.
Download history in MQL4 EA - Forex Calendar - MQL4 programming forum - Page 3 #26.4 (2019)
-
You should stop using the old event handlers (init, start, deinit) and IndicatorCounted() and start using new event handlers (OnInit, OnTick/OnCalculate, OnDeinit).
Event Handling Functions - MQL4 Reference
How to do your lookbacks correctly - MQL4 programming forum #9-14 & #19 (2016) -
You know which bar is new. Use iBarShift to find the new H1 bar index.
On MT4: Unless the current chart is that specific symbol(s)/TF(s) referenced, you must handle 4066/4073 errors before accessing candle/indicator values.
Download history in MQL4 EA - Forex Calendar - MQL4 programming forum - Page 3 #26.4 (2019)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello ,
I would like to ask if it is possible to count the new bars of a different Timeframe using IndicatorCounted() or another function .. for example, if I am on M15 and want the result of the counted bars on the Timeframe of H1 how to use IndicatorCounted to get this result ?