Nelson Wanyama:
Is there a workaround? Using arrays is not a good idea, since arrays can only store variables of the same type.
Is there a workaround? Using arrays is not a good idea, since arrays can only store variables of the same type.
it's called variadic arguments/template or splat operator or pack argument..
Wiliiam wrote a workaround here
https://www.mql5.com/en/forum/238421

Define Variadic Arguments in Functions?
- 2018.04.19
- www.mql5.com
Can We define functions that like Print("Hello","World"," !"); http://www.equestionanswers.com/c/variadic-function...
Vladimir Karputov:
That is a custom implementation, trying to duplicate the Print function. And I have asked for a better alternative
Where did you see the array in the 'Print' function?
Sardion Maranatha:
It could work, but against my principles of clean code. I'm implementing python types in MQL5. Seems the idea I have is cleaner and more efficient. I'll post when it's complete.
it's called variadic arguments/template or splat operator or pack argument..
Wiliiam wrote a workaround here
https://www.mql5.com/en/forum/238421

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
Is there a workaround? Using arrays is not a good idea, since arrays can only store variables of the same type.
Print
It enters a message in the Expert Advisor log. Parameters can be of any type.