getLastBuyPriceRemoveThreshold = (
  logger,
  cachedSymbolInfo,
  globalConfiguration,
  symbolConfiguration
) => {
  const symbolBuyLastBuyPriceRemoveThreshold = _.get(
    symbolConfiguration,
    'buy.lastBuyPriceRemoveThreshold',
    -1
  );

  if (symbolBuyLastBuyPriceRemoveThreshold !== -1) {
    logger.info(
      { symbolBuyLastBuyPriceRemoveThreshold },
      'Last buy threshold is found from symbol configuration.'
    );
    return symbolBuyLastBuyPriceRemoveThreshold;
  }

  logger.info(
    { symbolBuyLastBuyPriceRemoveThreshold },
    'Last Buy Price Remove Threshold is set as -1. Need to calculate and override it'
  );

  let newBuyLastBuyPriceRemoveThreshold = -1;

  // If old last buy price remove threshold is -1,
  // then should calculate last buy price remove threshold based on the notional amount.
  if (_.isEmpty(cachedSymbolInfo) === false) {
    const {
      quoteAsset,
      filterMinNotional: { minNotional }
    } = cachedSymbolInfo;

    newBuyLastBuyPriceRemoveThreshold = _.get(
      globalConfiguration,
      `buy.lastBuyPriceRemoveThresholds.${quoteAsset}`,
      -1
    );

    logger.info(
      { quoteAsset, newBuyLastBuyPriceRemoveThreshold },
      'Retrieved last buy price remove threshold from global configuration'
    );

    if (newBuyLastBuyPriceRemoveThreshold === -1) {
      newBuyLastBuyPriceRemoveThreshold = parseFloat(minNotional);

      logger.info(
        { newBuyLastBuyPriceRemoveThreshold, minNotional },
        'Could not get last buy price remove threshold from global configuration. Use minimum notional from symbol info'
      );
    }
  } else {
    logger.info(
      { cachedSymbolInfo },
      'Could not find symbol info, wait to be cached.'
    );
  }

  return newBuyLastBuyPriceRemoveThreshold;
}
Get last buy price remove threshold
@param {*} logger
@param {*} cachedSymbolInfo
@param {*} globalConfiguration
@param {*} symbolConfiguration
@returns