[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 82
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
A function returns only ONE value at all,
and the one described as void returns none, i.e. it returns nothing.
.
Alternatively, you can assign these values to global variables within a function.
Global - are they declared outside of special functions? Variable flag10 is declared at the beginning of the EA - along with external variables.
So there is no need to send the flag10 specifically to the outside - it will get there anyway?
All true. But there are solutions, "peasant" : modification in function/procedure of global variables of program, "civilized" : transfer of variables to function by reference.
Can you give me an example? Because I don't really understand it.
All true. But there are solutions, "peasant" : modification in function/procedure of global variables of program, "civilized" : transfer of variables to function by reference.
In this thread imho it is better to start with "peasant" )
Global are those declared outside of special functions?
Outside any functions.
Usually they are declared right after external variables before init, deinit and start functions.
So there's no need to send flag10 outwards on purpose - it will get there anyway?
Yes. If it is not redeclared in the function again, the global variable will be modified.
Outside any functions.
Usually they are declared immediately after the external variables before the init, deinit and start functions.
One more question. What are the global variables that are declared from the terminal with F3? And thank you all for the clarification.
Then there is an additional question. What are the global variables that are declared from the terminal with the F3 key? And thank you all for the clarification.
You're in over your head).
There are 3 levels in total:
-global variables of the terminal, scope of all programs running in the terminal (this is called by F3)
-Global variables of the program (entire program, all its functions are visible)
-Local variables (scope of function where it is declared);
Then there is an additional question. What global variables are declared from the terminal by pressing F3? And thank you all for the clarifications.
These are the terminal's global variables.
They can be accessed by any expert, script that works in this terminal.
Not to be confused with the global variables of the script/advisor.
You're in over your head.)
There are 3 levels in total:
-global variables of the terminal, scope of all programs running in the terminal (this is called by F3)
-Global variables of the program (entire program, all its functions are visible)
-Local variables (scope of function where it is declared);
Yeah, porridge! I'd even say pilaf :-) . But you still have to sort it all out.