Hello, when i'm building EA sometime i get ATR/OHLC wrong values. After few attempt they start getting correct and they never becomes incorrect. I have no idea why exactly this happening. I'm guessing it happens when i change timeframe, or when EA is just attached to chart, somehow it needs to load some data to read correct values from OHLC table.
- Metatrader 5 versions of indicators ...
- EA custom indicator problem beginner
- Elite indicators - metatrader 5 version :)
Do you really expect an answer? There are no mind readers here and our crystal balls are cracked.
How To Ask Questions The Smart Way. (2004)
Be precise and informative about your problem
We can't see your broken code.
Always post all relevant code (using Code button) or attach the source file.
Providing more detail info. In code i have nothing different or complicated.
Just i need to know what causes EA to send incorrect value through ATR function.
int atrH = iATR(Symbol(),0,14); double ATR() { double v[]; ArraySetAsSeries(v,true); CopyBuffer(atrH,0,0,2,v); return v[1]; }This is what i'm using in EA. Imagine previous candle (index 1) ATR is 0.00391. But when i call ATR() function in EA sometime it gives me weird value for example 2.130214( i don't know any amount) and after few call of this function. It gives me correct ( 0.00391) value every time.
Just i need to know what causes EA to send incorrect value through ATR function.
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