anuj71:
Hello,
I am trying to use extern instead of Input because i am changing it value later on the code.
I am getting an error : extern variable initialization is not allowed
Please read the documentation.
MQL5 extern is comparable to C/C++ extern keyword.
MQL4 uses the keyword for a different functionality.
They are not compatible.
In MQL5 there is no way of changing an input variable. They are considered const.
anuj71 #:
Ok, So, what is alternative way? any idea.
Let say, i setup input SL = 10, later if i want to change something like this if(SL < StopLevel) SL= StopLevel;. How can i do that?
Have a global variable in the program, assign the input to it and use that instead of the input variable.
Better would be, you "rage-quit" the app and tell the user to input proper settings, telling him what values are valid.
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,
I am trying to use extern instead of Input because i am changing it value later on the code.
I am getting an error : extern variable initialization is not allowed