How to get all symbols name ?

 

Hi
I want to use iClose[] in all currencies .
it needs the string symbol name.
but as I now the name of currency pairs are a little different in different brokers.

how can I Get the list of all symbols name of the broker ?


 
Reza nasimi:

Hi
I want to use iClose[] in all currencies .
it needs the string symbol name.
but as I now the name of currency pairs are a little different in different brokers.

how can I Get the list of all symbols name of the broker ?



Use 

SymbolsTotal()

To get the count of all or Market Watch symbols of the broker, then get the name by its position index using the following function

SymbolName()
 
Mohammad Hossein Sadeghi:

Use 

To get the count of all or Market Watch symbols of the broker, then get the name by its position index using the following function


Thaaaaaaaanks a lot   Mohamad hossein sadeghi

I was disappointed after searching for this without a satisfying result ;

 
Reza nasimi:

Thaaaaaaaanks a lot   Mohamad hossein sadeghi

I was disappointed after searching for this without a satisfying result ;

 

You're welcome. You could search for it in documentation of MetaEditor.
 
Mohammad Hossein Sadeghi:

Use 

To get the count of all or Market Watch symbols of the broker, then get the name by its position index using the following function

useful tnX

 
Reza nasimi:

Hi
I want to use iClose[] in all currencies .
it needs the string symbol name.
but as I now the name of currency pairs are a little different in different brokers.

how can I Get the list of all symbols name of the broker ?


 int total=SymbolsTotal(true)-1;
   
  for(int i=total-1;i>=0;i--)
  {
   string Sembol=SymbolName(i,true);
   Print("Number: "+string(i)+" Sembol Name: "+Sembol+" Close Price: ",iClose(Sembol,0,0));
  }

https://www.mql5.com/en/charts/11513206/xauusd-m15-qnb-finans-yatirim

Chart XAUUSD, M15, 2020.03.20 13:29 UTC, QNB Finans Yatirim Menkul Degerler A.S., MetaTrader 4, Demo
Chart XAUUSD, M15, 2020.03.20 13:29 UTC, QNB Finans Yatirim Menkul Degerler A.S., MetaTrader 4, Demo
  • www.mql5.com
Symbol: XAUUSD. Periodicity: M15. Broker: QNB Finans Yatirim Menkul Degerler A.S.. Trading Platform: MetaTrader 4. Trading Mode: Demo. Date: 2020.03.20 13:29 UTC.