Determine Symbols Market

 

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

 

You could try

if(MarketInfo(S,MODE_PROFITCALCMODE)==0)
  {
   //is forex
  }
Reason: