How to get all symbols name ?

Reza nasimi
546
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 ?


Mohammad Hossein Sadeghi
3267
Mohammad Hossein Sadeghi  
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()
Reza nasimi
546
Reza nasimi  
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 ;

Mohammad Hossein Sadeghi
3267
Mohammad Hossein Sadeghi  
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.
Amirfakhredin Ghanbari
298
Amirfakhredin Ghanbari  
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

Mehmet Bastem
2543
Mehmet Bastem  
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.