SilSama:
Hello, Hi there,
I'm a newbie and I want to create a new indicator mql5, but I want to use IndicatorCounted() function like this mql4 code:
But I got a error : "'IndicatorCounted' - undeclared identifier". I don't know which function instead this in mql5?
Please help me! Many thanks!
So as far as I know the closest thing to IndicatorCalculated on mql5 is BarsCalculated()
So I think try counter_bars=Bars(_symbol) -BarsCalculated(*indicator handle here*).
This will only work if you are working with a buffer (which you most likely are) but if you're not using a buffer, then you could try using Bars-1 ,which would simply iterate through all the bars on the chart.
busta bruno #:
Hello,
Thank you so much!
Hello,
So as far as I know the closest thing to IndicatorCalculated on mql5 is BarsCalculated()
So I think try counter_bars=Bars(_symbol) -BarsCalculated(*indicator handle here*).
This will only work if you are working with a buffer (which you most likely are) but if you're not using a buffer, then you could try using Bars-1 ,which would simply iterate through all the bars on the chart.
See How to do your lookbacks correctly #9 … #14 & #19.
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 there,
I'm a newbie and I want to create a new indicator mql5, but I want to use IndicatorCounted() function like this mql4 code:
But I got a error : "'IndicatorCounted' - undeclared identifier". I don't know which function instead this in mql5?
Please help me! Many thanks!