Download MetaTrader 5
To add comments, please log in or register
Having troubles understanding the code? Articles can help you!
Taskin Osman
803
Taskin Osman 2014.07.21 23:24 

Hi,

 

i would like to determine if a given symbol is a forex or non forex symbol. Any suggestions?

 

void UpdateSymbolData()
{
  
  int Now=(int)TimeCurrent();
  for (int i=0;i<SymbolsTotal(false);i++) 
   {
   string S=SymbolName(i,false);
   double D=MarketInfo(S,MODE_DIGITS); 
   double TickValue = MarketInfo(S,MODE_TICKVALUE);  
   ......mycode.....
   } 
}

 

I am using SymbolsTotal and SymbolName, i have checked SymbolInfoString and similar but could not find a way to determine.

Can somenoe help me please?

tx

Keith Watford
Moderator
8026
Keith Watford 2014.07.21 23:46  

You could try

if(MarketInfo(S,MODE_PROFITCALCMODE)==0)
  {
   //is forex
  }
/
To add comments, please log in or register