ok,
now I found it out
#include <Indicators\Oscilators.mqh> CiATR atr; void OnStart() { //--- //atr = new CiATR; atr.Create(_Symbol,PERIOD_CURRENT,14); atr.Refresh(-1); Print(atr.Main(0)); }
but I don't know, why I have to refresh it
and is there a way to deinitialiszize?
Maybe it is
atr.Destroy();
But i didn't test it so its best if you looked into the code it must be there.
Also you could use a fast timer.
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 tried to use for the ATR calculation the include files,
but I always get Empty Value out
here the script
is there something wrong?
https://www.mql5.com/en/docs/standardlibrary/technicalindicators/oscillatorindicators/ciatr/ciatrcreate