Download MetaTrader 5
To add comments, please log in or register
Are you a real pro? Share your knowledge with millions of traders!
Michael
492
Michael 2014.06.08 22:41 

Well, thanks to the latest builds (600+) of MT4, we can now easily get this information.

Here's the code:

void OnStart()
  {
//---
   int HowManySymbols=SymbolsTotal(true);
   string ListSymbols=" ";
   for(int i=0;i<HowManySymbols;i++)
     {
      ListSymbols=StringConcatenate(ListSymbols,SymbolName(i,true),"\n");
     }
   Comment(ListSymbols);
   Alert(HowManySymbols);
  }

 The code on it's own just lists out whats available in the Market Watch window and then issues an alert to tell you how many there are.  But from this code, you should be able to easily incorporate this into your code.

/
To add comments, please log in or register