
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
ArrayPush(Double <VALUE>, Double <ARRAY>)
This function will move all of the values in the array along one entering <VALUE> at [0].
The question is this: Is it possible in MQL4 to NOT declare data types in the function declaration so that this function will work the same with arrays of type datetime, double, int....etc.... or is it necessary to have a near duplicate function for each data type?
So instead of:
void function ArrayPushDbl(Double <VALUE>, Double <ARRAY>[]){}
void function ArrayPushDT(datetime <VALUE>, datetime <ARRAY>[]){}
void function ArrayPushInt(int <VALUE>, int <ARRAY>[]){}
I could just have something like:
void function ArrayPush(mixed <VALUE>, mixed <ARRAY>[]){}
(void because array are passed by reference so there is nothing to return....)