isExceedingMaxOpenTrades = async (logger, data) => {
  const {
    symbolConfiguration: {
      botOptions: {
        orderLimit: {
          enabled: orderLimitEnabled,
          maxOpenTrades: orderLimitMaxOpenTrades
        }
      }
    },
    sell: { lastBuyPrice }
  } = data;

  if (orderLimitEnabled === false) {
    return false;
  }

  // If the last buy price is recorded, this is one of open trades.
  if (lastBuyPrice) {
    return false;
  }

  return (await getNumberOfOpenTrades(logger)) >= orderLimitMaxOpenTrades;
}
Check whether max number of open trades has reached

@param {*} logger
@param {*} data
@returns