title: Recursive symbol checking
body: <p>I am getting an error that I am having problems fixing as recursion hasn't &quot;sunk in&quot; yet.</p>
  <p>It is supposed to go through an array of symbols already placed by the Class OrderManager Object and check if the symbol passed in is already there or not, if it is not there it should allow the trade, otherwise it will block it (multiple orders on the same currency compounds risk)</p>
  <p><code>[Error] '}' - not all control paths return a value.</code></p>
  <p>I believe it is because of the retest portion not having a return value but again I'm still newish to making my own recursive functions. However it may also be because my base and test cases are wrong possibly?</p>
  <p>P.S I added (SE) comments in places to clarify language specific things since it is so close to C++.</p>
  <p>P.P.S Due to the compiler error, I have no clue if this meets MVRC. Sorry everyone.</p>
  <pre><code>bool OrderManager::Check_Risk(const string symbol, uint iter = 0) {
      if((iter + 1) != ArraySize(m_symbols) &amp;&amp;
         m_trade_restrict != LEVEL_LOW) // Index is one less than Size (SE if
                                        // m_trade_restrict is set to LOW, it
                                        // allows all trades so just break out)
      {
          if(OrderSelect(OrderManager::Get(m_orders[iter]),
                         SELECT_BY_TICKET)) // Check the current iterator position
                                            // order (SE OrderSelect() sets an
                                            // external variable in the terminal,
                                            // sort of like an environment var)
          {
              string t_base = SymbolInfoString(
                  OrderSymbol(),
                  SYMBOL_CURRENCY_BASE); // Test base (SE function pulls apart
                                         // the Symbol into two strings
                                         // representing the currency to check
                                         // against)
              string t_profit =
                  SymbolInfoString(OrderSymbol(), SYMBOL_CURRENCY_PROFIT);
              string c_base =
                  SymbolInfoString(symbol, SYMBOL_CURRENCY_BASE); // Current base
  
              // (SE does the same as above but for the passed variable instead):
              string c_profit = SymbolInfoString(symbol, SYMBOL_CURRENCY_PROFIT);
  
              // Uses ENUM_LEVELS from Helpers.mqh (SE ENUM of 5 levels: Strict,
              // High, Normal, Low, None in that order):
              switch(m_trade_restrict) {
              case LEVEL_STRICT: {
                  if(t_base == c_base || t_profit == c_profit) {
                      return false; // Restrictions won't allow doubling
                                    // orders on any currency
                  } else
                      return Check_Risk(symbol, iter++);
              };
              case LEVEL_NORMAL: {
                  if(symbol == OrderSymbol()) {
                      return false; // Restrictions won't allow doubling
                                    // orders on that curr pair
                  } else
                      return Check_Risk(symbol, iter++);
              };
              default: {
                  // TODO: Logging Manager
                  // Hardcoded constant global (SE set to LEVEL_NORMAL):
                  ENB_Trade_Restrictions(default_level);
                  return Check_Risk(symbol, iter);
              }
              }
          }
      } else {
          return true;
      }
  }
  </code></pre>