enivid:
For some reason the iMAOnArray() function for a linear-weighted moving average in MQL4 produces different results to the WMA calculation function found in examples for MQL5:
Is it something wrong with this custom function or with iMAonArray()? Is there any other way to substitute MQL4 iMAonArray() than with such custom functions?
Check out this Migrate MT-4 to MT-5 article. The MT-5 IMAOnArray() version is lengthy. Hope it works OK.
Migrating from MQL4 to MQL5
- 2010.05.17
- Sergey Pavlov
- www.mql5.com
This article is a quick guide to MQL4 language functions, it will help you to migrate your programs from MQL4 to MQL5. For each MQL4 function (except trading functions) the description and MQL5 implementation are presented, it allows you to reduce the conversion time significantly. For convenience, the MQL4 functions are divided into groups, similar to MQL4 Reference.
The problem has been resolved and the topic can now be closed :).

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
For some reason the iMAOnArray() function for a linear-weighted moving average in MQL4 produces different results to the WMA calculation function found in examples for MQL5:
Is it something wrong with this custom function or with iMAonArray()? Is there any other way to substitute MQL4 iMAonArray() than with such custom functions?