MarketInfo and SymbolInfoDouble return 0 on strategy tester

 
Hi all am running this code on strategy tester AUDJPY, to confirm if the symbol is valid, the code tries to make a request Using marketinfo and if the return value is > 0, then the symbol is correct. It works properly on live but it doesn't work on tester. Is there a workaround for this?
int Trade::SymbolType(string symbol="NULL", bool verbose=false)
   {  // SymbolType body start
   int   CalculatedSymbolType=6;
   string   SymbolBase="",SymbolCounter="",postfix="",CalculatedBasePairForCross="",CalculatedCounterPairForCross="";
   
   string   CurrentSymbol=symbol;
   if(symbol=="NULL") CurrentSymbol=Symbol();
   //Print("Account currency is ", AccountCurrency()," and Current Symbol = ",CurrentSymbol);
   if(verbose==true) Print("Account currency is ", AccountCurrency()," and Current Symbol = ",CurrentSymbol);
   
   SymbolBase=StringSubstr(CurrentSymbol,0,3);
   SymbolCounter=StringSubstr(CurrentSymbol,3,3);
   postfix=StringSubstr(CurrentSymbol,6);
   
   if(SymbolBase==AccountCurrency()) CalculatedSymbolType=1;
   if(SymbolCounter==AccountCurrency()) CalculatedSymbolType=2;
   
   if((CalculatedSymbolType==1 || CalculatedSymbolType==2) && verbose==true) Print("Base currency is ",SymbolBase," and the Counter currency is ",SymbolCounter," (this pair is a major)");

   if(CalculatedSymbolType!=1 && CalculatedSymbolType!=2)
      {
      if(verbose==true) Print("Base currency is ",SymbolBase," and the Counter currency is ",SymbolCounter," (this pair is a cross)");

      // Determine if AccountCurrency() is the COUNTER currency or the BASE currency for the COUNTER currency forming CurrentSymbol
      if(MarketInfo(StringConcatenate(AccountCurrency(),SymbolCounter,postfix),MODE_LOTSIZE)>0)
         {
         CalculatedSymbolType=4; // SymbolType can also be 3 but this will be determined later when the Base pair is identified
         CalculatedCounterPairForCross=StringConcatenate(AccountCurrency(),SymbolCounter,postfix);
         if(verbose==true) Print(AccountCurrency()," is the Base currency to the Counter currency for this cross, the CounterPair is ",CalculatedCounterPairForCross,", Bid = ",DoubleToStr(MarketInfo(CalculatedCounterPairForCross,MODE_BID),(int)MarketInfo(CalculatedCounterPairForCross,MODE_DIGITS))," and Ask = ",DoubleToStr(MarketInfo(CalculatedCounterPairForCross,MODE_ASK),(int)MarketInfo(CalculatedCounterPairForCross,MODE_DIGITS)));
         }
      else if(MarketInfo(StringConcatenate(SymbolCounter,AccountCurrency(),postfix),MODE_LOTSIZE)>0)
         {
         CalculatedSymbolType=5;
         CalculatedCounterPairForCross=StringConcatenate(SymbolCounter,AccountCurrency(),postfix);
         if(verbose==true) Print(AccountCurrency()," is the Counter currency to the Counter currency for this cross, the CounterPair is ",CalculatedCounterPairForCross,", Bid = ",DoubleToStr(MarketInfo(CalculatedCounterPairForCross,MODE_BID),(int)MarketInfo(CalculatedCounterPairForCross,MODE_DIGITS))," and Ask = ",DoubleToStr(MarketInfo(CalculatedCounterPairForCross,MODE_ASK),(int)MarketInfo(CalculatedCounterPairForCross,MODE_DIGITS)));
         }
      
      // Determine if AccountCurrency() is the COUNTER currency or the BASE currency for the BASE currency forming CurrentSymbol
      if(MarketInfo(StringConcatenate(AccountCurrency(),SymbolBase,postfix),MODE_LOTSIZE)>0)
         {
         CalculatedSymbolType=3;
         CalculatedBasePairForCross=StringConcatenate(AccountCurrency(),SymbolBase,postfix);
         if(verbose==true) Print(AccountCurrency()," is the Base currency to the Base currency for this cross, the BasePair is ",CalculatedBasePairForCross,", Bid = ",DoubleToStr(MarketInfo(CalculatedBasePairForCross,MODE_BID),(int)MarketInfo(CalculatedBasePairForCross,MODE_DIGITS))," and Ask = ",DoubleToStr(MarketInfo(CalculatedBasePairForCross,MODE_ASK),(int)MarketInfo(CalculatedBasePairForCross,MODE_DIGITS)));
         }
      else if(MarketInfo(StringConcatenate(SymbolBase,AccountCurrency(),postfix),MODE_LOTSIZE)>0)
         {
         CalculatedBasePairForCross=StringConcatenate(SymbolBase,AccountCurrency(),postfix);
         if(verbose==true) Print(AccountCurrency()," is the Counter currency to the Base currency for this cross, the BasePair is ",CalculatedBasePairForCross,", Bid = ",DoubleToStr(MarketInfo(CalculatedBasePairForCross,MODE_BID),(int)MarketInfo(CalculatedBasePairForCross,MODE_DIGITS))," and Ask = ",DoubleToStr(MarketInfo(CalculatedBasePairForCross,MODE_ASK),(int)MarketInfo(CalculatedBasePairForCross,MODE_DIGITS)));
         }
      }
   if(verbose==true) Print("SymbolType() = ",CalculatedSymbolType);
   
   if(CalculatedSymbolType==6) Print("Error occurred while identifying SymbolType(), calculated SymbolType() = ",CalculatedSymbolType);
   
   return(CalculatedSymbolType);
   }  // SymbolType body end