First question - is this supposed to be MQL4 or 5?
What is this?
double iMAOnArray( double array[], // array with data int total, // number of elements int ma_period, // MA averaging period int ma_shift2, // MA shift int ma_method, // MA averaging method int shift, // shift );
It seems to be the function copied from MQL4 documentation which has no place in your code.
Anyway it should be
double iMAOnArray( double array[], // array with data int total, // number of elements int ma_period, // MA averaging period int ma_shift2, // MA shift int ma_method, // MA averaging method int shift, // shift );
and is used for reference. It should not be copied into your code as it is.
![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
This is what I got off the internet and cant figure out how to use it.