Download MetaTrader 5

List currency pairs function

To add comments, please log in or register
Louis Stoltz
638
Louis Stoltz 2014.02.10 01:00 

Hi

Is there a function or script available for listing all the brokers available currency pairs?

qjol
3243
qjol 2014.02.10 03:45  
Louis Stoltz
638
Louis Stoltz 2014.02.10 13:00  
Thanks so much
gchrmt4
356
gchrmt4 2014.02.10 15:18  
bonechair:

Is there a function or script available for listing all the brokers available currency pairs?

It depends whether you need code which works on v509. If you only want to run your code on v600+, then you can use the new symbol functions. For example:

void OnStart()
{
   for (int i = 0; i < SymbolsTotal(false); i++) {
      Print(SymbolName(i, false));
   }
}

Until the revised MQL4 documentation is ready, you can find more information about these functions in the MQL5 reference at https://www.mql5.com/en/docs/marketinformation

Louis Stoltz
638
Louis Stoltz 2014.02.10 16:53  
Thanks thats it
To add comments, please log in or register