Sorry Alain, i don't understand. can you give me some code example. what u mean historical reason?
Sorry Alain, i don't understand. can you give me some code example. what u mean historical reason?
Sorry Alain, i don't understand. can you give me some code example. what u mean historical reason?
Sorry Alain, i don't understand. can you give me some code example. what u mean historical reason?
Dear,
I want to know what is different between Symbol()
function and _Symbol variable.
I know both return current symbol name. but which should i use.
Me also...I know _Symbol in the MQL4 reference, "The _Symbol variable contains the symbol name of the current chart.", and the Symbol(), "Returns the name of a symbol of the current chart." , which makes us believe that one contains and the other returns....However I hear my friend Kirill Eremenko from Forexboat.com (I actually bought a couple of courses from UDEMY.com) state Symbol() is "Universal".
Alain Verleyen:
Use
Symbol(). _Symbol is only there for historical reason.
Fantastic.
Sorry Alain, i don't understand. can you give me some code example. what u mean historical reason?
Slower...Sorry "historical reason" does not compute.. If you can tell yourself how it is stored historically then you will be enabled to answer the relevance of the question "What, historical reason?" How does the coding store historically? You will solve this later; for now.
What Alain is saying is _Symbol is what they used to use before they updated MQL4 to be more like MQL5. Now, Symbol() is there instead of it. It basically replaced _Symbol, but is still here so programs written in the older style of language will still work, i.e. backward compatibility.
Oh "historical reason", you understand that it is something to do with coding progress or progressing with coding. Also with the way that the OnInit was InIt; changes happen. Symbol() is "Universal" in a way that it can be understood by both MQL4 and MQL5; most probably.
Backward compatibility.
According to https://whatis.techtarget.com/definition/backward-compatible-backward-compatibility
Backward compatible refers to a hardware or software system that can successfully use interfaces and data from earlier versions of the system or with other systems.

- whatis.techtarget.com

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Dear,
I want to know what is different between Symbol() function and _Symbol variable.
I know both return current symbol name. but which should i use.