doshur:
SymbolSelect()
Hi,
Any functions that can check if symbol exists for trading?
thanks
Not yet mentioned in the MQL Reference, but 'SymbolExist' is already highlighted as a valid Keyword in the MetaEditor (build 1970)
bool SymbolExist(const string symbol_name, bool &is_custom)
sounds a bit extreme to select a symbol just to verify it exists...
void OnStart()
{
//---
Print(IsSymbol("EURUSD"));
Print(IsSymbol("I Ain't No Symbol, Biyatch!"));
}
//+------------------------------------------------------------------+
bool IsSymbol(string symbol) {
SymbolInfoDouble(symbol, SYMBOL_BID);
return GetLastError() != ERR_MARKET_UNKNOWN_SYMBOL;
}
int i = StringSplit(strBasket, StringGetCharacter(",", 0), Basket); if(i > 0) { for(int x = 0; x < i; x++) { if(!SymbolExist(Basket[x], false)) return(INIT_PARAMETERS_INCORRECT); } } else { return(INIT_PARAMETERS_INCORRECT); }
'false' - variable expected JPY Basket.mq5 32 37
Release note 14, from version Built 2005 ( 21 FEB 2019)
New SYMBOL_EXIST property in the ENUM_SYMBOL_INFO_INTEGER enumeration, means that the symbol under this name exists.

MetaTrader 5 Platform build 2005: Economic Calendar, MQL5 applications as services and R language API
- 2019.02.21
- MetaQuotes Software Corp.
- www.metatrader5.com
Completely revised built-in Economic Calendar. The Economic Calendar is our proprietary solution. Therein you will find over 600 financial news and indicators related to the 13 largest global economies: USA, European Union, Japan, UK, Canada, Australia, China among others. Relevant data is collected from open sources in real time. The new...

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,
Any functions that can check if symbol exists for trading?