![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
Hey guys,
long time since I've been on here....
English is not my native language, so I'm sorry in advance if my phrasing aren't clear enough.
I've encountered some weird issue today with following built-in MAs- DEMA, TEMA, FrAMA.
It seems that whenever I try to set a long period on them, I can't programatically get the MA value (CopyBuffer returns -1),
However, if I manually attach the above MAs to the chart, and setting the same time period- the MA plots just fine (meaning the above calculation is done just fine by the indicator).
I have several years of tick data, so I have enough data for the above calculations.
Attached a sample code to illustrate the issue-
When I'm setting a period of 131 or higher on D1 chart- CopyBuffer returns -1
If I set any lower period- CopyBuffer returns the actual value.
Again- I have no problem when manually adding the above MA to D1 chart and setting any period above 130.
I tried looking thru the documentation, to see if there any sort of limitation on the above MAs, but couldn't find anything.
Am I missing something here?