Try it and find out. I seem to recall someone posted that default parameters do not work in DLLs.
I was searching hi and low, cant find anything. I tried and it does seem not to work, for some unbeknowned reasons....
[...] Will this work well, and also during testing? And will this work well?
The MQ4 documentation says that your second example ( hseGambit(High, Low); ) isn't going to compile. The page at https://docs.mql4.com/basis/variables/formal says "MQL4-library functions imported within other modules cannot have parameters initialized by default values"
In other words, you can have functions with optional parameters in a MQH file (which you #include) but not in a EX4 library or DLL (which you #import).
The MQ4 documentation says that your second example ( hseGambit(High, Low); ) isn't going to compile. The page at https://docs.mql4.com/basis/variables/formal says "MQL4-library functions imported within other modules cannot have parameters initialized by default values"
In other words, you can have functions with optional parameters in a MQH file (which you #include) but not in a EX4 library or DLL (which you #import).
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I have this function stored as library function. It is import in a header file:
My question is about those 3 int parameters (highlighted in red) set to respective default values. If the EA call the fuction eg:
Will this work well, and also during testing? And will this work well?
Thx.