Javier Santiago Gaston De Iriarte Cabrera:
Yes you can.
Hi
I want to get the symbol name , can I do it with _Symbol or Symbol()? if not, any other way?
Javier Santiago Gaston De Iriarte Cabrera:
Hi
I want to get the symbol name , can I do it with _Symbol or Symbol()? if not, any other way?
Yes, both of them returns the symbol name.
// Expert Initializing -------------------- int OnInit() { return(INIT_SUCCEEDED); } // Expert DeInitializing ------------------- void OnDeinit(const int reason) { } // Expert OnTick -------------------------- void OnTick() { Comment("\n","Symbol Name by _Symbol -:" , _Symbol, "\n", "Symbol Name by Symbol(); -: ", Symbol()); } // OnTick End <<----------------------
Javier Santiago Gaston De Iriarte Cabrera: Hi I want to get the symbol name , can I do it with _Symbol or Symbol()? if not, any other way?
Hi, I'm not sure I understand, but if you're referring to symbols with a prefix and/or suffix, here's an example:
//--- Get SYMBOL string SYMBOL = _Symbol; if(!StringToUpper(SYMBOL)) { Print("Error getting current symbol name: ", GetLastError()); return(INIT_FAILED); } //--- Checks SETTINGS if(StringFind(SYMBOL, "EURUSD") >= 0) { Setting_EURUSD(); }

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
Hi
I want to get the symbol name , can I do it with _Symbol or Symbol()? if not, any other way?