Not entirely correct!
"extern" variables can be changed by the code during the execution. This will however not change the default value set in the properties dialog box, only its locally running value. They are initialised to default values when you access the properties window and change the values in the dialog box.
"input" variables, however cannot be changed by the code and any such attempt will be detected by the compiler and give an error.
boobyditbeber: I didn't find any information about that. I did try to change it with getpointer() , but it is not possible with simple variable as the mql4 book explained
So if anybody could help me about how to update the input field with my new value.
from ->> external int value=2:
in my program I will get a new value=15
If I open the input window from my own indicator I will always see value=2
never 15
I did try to use ->> ChartSetSymbolPeriod() to reloaded the indicator but I get always value=2
Help could be very usefull for me about that problem
Not entirely correct!
"extern" variables can be changed by the code during the execution. This will however not change the default value set in the properties dialog box, only its locally running value. They are initialised to default values when you access the properties window and change the values in the dialog box.
"input" variables, however cannot be changed by the code and any such attempt will be detected by the compiler and give an error.
Ok so show me a piece of code that changes the extern variable value in the input parameters.
As I stated! It does not change the Input parameters in the dialog box, only the locally running value during the code execution.
Forum on trading, automated trading systems and testing trading strategies
How to update the external input entries with a new values ? please :)
Fernando Carreiro, 2018.09.30 08:52
Not entirely correct!
"extern" variables can be changed by the code during the execution. This will however not change the default value set in the properties dialog box, only its locally running value. They are initialised to default values when you access the properties window and change the values in the dialog box.
"input" variables, however cannot be changed by the code and any such attempt will be detected by the compiler and give an error.
extern int myVariable = 2; void OnTick() { myVariable += 1; Comment( "myVariable: ", myVariable ); }
Hello,
how to update the input field with my new value.
I did not! The OP is complaining that he sets the dialog box value to 2, but when he runs the program he gets 15 (see below).
He believes the solution is to alter the dialog box externally via some function in order to fix what he believes to be the problem.
However, he does not realise that maybe he is changing the value of the variable within the code inadvertently and thus causing the problem. That is what I am talking about!
Forum on trading, automated trading systems and testing trading strategies
How to update the external input entries with a new values ? please :)
boobyditbeber, 2018.09.29 20:51
Hello,
I didn't find any information about that. I did try to change it with getpointer() , but it is not possible with simple variable as the mql4 book explained.
So if anybody could help me about how to update the input field with my new value.
from ->> external int value=2:
in my program I will get a new value=15
If I open the input window from my own indicator I will always see value=2
never 15
I did try to use ->> ChartSetSymbolPeriod() to reloaded the indicator but I get always value=2
Help could be very usefull for me about that problem
Thanks a lot..
Laurent
It doesn't change anything about the answer does it.
It can't be done.
Of course it can be done if we drill into the operating system and create an overlay that displays the correct value.
Or find the spot in memory where the 2 is located and change it into a 15 EXTERNally but that's just not practical.
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello,
I didn't find any information about that. I did try to change it with getpointer() , but it is not possible with simple variable as the mql4 book explained.
So if anybody could help me about how to update the input field with my new value.
from ->> external int value=2:
in my program I will get a new value=15
If I open the input window from my own indicator I will always see value=2
never 15
I did try to use ->> ChartSetSymbolPeriod() to reloaded the indicator but I get always value=2
Help could be very usefull for me about that problem
Thanks a lot..
Laurent