Download MetaTrader 5

List currency pairs function

To add comments, please log in or register
Louis Stoltz
636
Louis Stoltz  

Hi

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

qjol
3243
qjol  
Louis Stoltz
636
Louis Stoltz  
Thanks so much
gchrmt4
356
gchrmt4  
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
636
Louis Stoltz  
Thanks thats it
To add comments, please log in or register