Davide Tedesco:
another way to use an array.
But with this choice i must set all parameters before call function, and read all in parameters in function.
No, dynamic number of arguments is not allowed in functions.
So, your best bet is to use a dynamic array or a structure. Since arrays and structures are passed by reference, you can keep it dynamic and keep incrementing array values as required.
If you are looking for same function having different types of arguments, you can even try function overloading:
![Function Overloading - Functions - Language Basics - MQL4 Reference Function Overloading - Functions - Language Basics - MQL4 Reference](https://c.mql5.com/36/26/function-overloading-functions.png)
Function Overloading - Functions - Language Basics - MQL4 Reference
- docs.mql4.com
Usually the function name tends to reflect its main purpose. As a rule, readable programs contain various well selected identifiers. Sometimes different functions are used for the same purposes. Let's consider, for example, a function that calculates the average value of an array of double precision numbers and the same function, but operating...
![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
Hi at all,
Is it possibile create a function/method use Variable Arguments as c language ?
Or using library ? which? Anyone know a good library for this scope ?
Or another way for create a function with dynamic number of pamaters input ?
Thanks at all !