panosz: indicators that have 4 inputs only because of the only 4 possible inputs declared.
-
Please edit your (original) post and use the CODE button (Alt-S)! (For large amounts of code, attach it.)
General rules and best pratices of the Forum. - General - MQL5 programming forum 2019.05.06
Messages Editor -
There are no variadic functions.
See the following:
Define Variadic Arguments in Functions? - Bollinger Bands, BB - Expert Advisors and Automated Trading - MQL5 programming forum 2018.04.19
Function with variable number of parameters - MQL4 programming forum 2018.01.06
Different Indicators Parameters to iCustom - MQL5 programming forum 2020.04.27

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
Hello all, I was having some trouble with an idea I had recently and I would love to get some help if possible. I'm pretty new in coding in general so if I'm missing something obvious I apologize.
So below is my code and my idea was to be able to set the inputs of an indicator without them having to be specified in advance. The main problem is that my code as is works only for indicators that have 4 inputs only because of the only 4 possible inputs declared.
More or less inputs make it crash. Any idea if it is possible to make it that way that it adjusts on every number of inputs needed each time?(My only thought was to make if else statements according to the NumberOfParameters input)