Market Validation Error

 
I am trying to upload an expert to the market, but I get an error code whenever it tries to validate: 

tester stopped because OnInit returns non-zero code 1

int OnInit()
  {

   if(!m_symbol.Name(Symbol()))
      return(INIT_FAILED);
   RefreshRates();

   m_trade.SetExpertMagicNumber(m_magic);
   m_trade.SetMarginMode();
   m_trade.SetTypeFillingBySymbol(m_symbol.Name());
   m_trade.SetDeviationInPoints(m_slippage);

   int digits_adjust=1;
   if(m_symbol.Digits()==3 || m_symbol.Digits()==5)
      digits_adjust=10;
   m_adjusted_point=m_symbol.Point()*digits_adjust;

   ExtStopLoss       = InpStopLoss        * m_adjusted_point;
   ExtTakeProfit     = InpTakeProfit      * m_adjusted_point;
   ExtMin         = InpMin             	  * m_adjusted_point;
   string err_text="";
   if(IntLotOrRisk==lot)
     {
      if(!CheckVolumeValue(InpVolumeLorOrRisk,err_text))
        {
         if(MQLInfoInteger(MQL_TESTER))
           {
            Print(__FUNCTION__,", ERROR: ",err_text);
            return(INIT_FAILED);
           }
         else
           {
            Alert(__FUNCTION__,", ERROR: ",err_text);
            return(INIT_PARAMETERS_INCORRECT);
           }
        }
     }
   else
     {
      if(m_money!=NULL)
         delete m_money;
      m_money=new CMoneyFixedMargin;
      if(m_money!=NULL)
        {
         if(!m_money.Init(GetPointer(m_symbol),Period(),m_symbol.Point()*digits_adjust))
            return(INIT_FAILED);
         m_money.Percent(InpVolumeLorOrRisk);
        }
      else
        {
         Print(__FUNCTION__,", ERROR: Object CMoneyFixedMargin is NULL");
         return(INIT_FAILED);
        }
     }
//---
   return(INIT_SUCCEEDED);
  }

This is my OnInit function. I get 0 errors on my local PC. I have tried everything I could set my eyes on to fix the issue, but none have worked. Thing I have tried:

1. Removing some of the code piece by piece until it works.

2. Setting deposit amount to 1 to see if I have enough money for trades, but still no errors.

3. After fiddling around some more trying to find the issue, I managed to replicate the issue on my local pc by removing the deletion and creating of CMoneyFixedMargin. Then I get the same error on my local pc: 

tester stopped because OnInit returns non-zero code 1

Am I missing something?

 

Forum on trading, automated trading systems and testing trading strategies

Discussion of article "The checks a trading robot must pass before publication in the Market"

Fernando Carreiro, 2022.12.24 18:46

As per the Market product rules, you are not allowed to restrict or limit your EA to a single symbol. Your EA must work for all symbols, even if its intended use is for a single symbol.

Forum on trading, automated trading systems and testing trading strategies

Discussion of article "The checks a trading robot must pass before publication in the Market"

Fernando Carreiro, 2023.03.27 01:50

You are not allowed to limit your EA in any way. It must be able to trade on anything an everything, even if it was designed for indices. Please read the Market rules.
 
Your topic has been moved to the section: Expert Advisors and Automated Trading
Please consider which section is most appropriate — https://www.mql5.com/en/forum/172166/page6#comment_49114893