removeLastBuyPrice = async (
  logger,
  symbol,
  data,
  processMessage,
  extraMessages
) => {
  const {
    symbolConfiguration: {
      symbols,
      botOptions: {
        autoTriggerBuy: {
          enabled: autoTriggerBuyEnabled,
          triggerAfter: autoTriggerBuyTriggerAfter
        }
      }
    }
  } = data;

  // Delete the last buy price from the database
  await removeLastBuyPriceFromDatabase(logger, symbol);

  // Save number of active orders
  await saveOrderStats(logger, symbols);

  slack.sendMessage(
    `*${symbol}* Action - Removed last buy price:\n` +
      `- Message: ${processMessage}\n\`\`\`${JSON.stringify(
        extraMessages,
        undefined,
        2
      )}\`\`\``,
    { symbol, apiLimit: getAPILimit(logger) }
  );

  PubSub.publish('frontend-notification', {
    type: 'info',
    title: `The last buy price for ${symbol} has been removed.`
  });

  // Archive symbol grid trade
  const archivedGridTrade = await archiveSymbolGridTrade(logger, symbol);

  // Notify slack
  if (_.isEmpty(archivedGridTrade) === false) {
    slack.sendMessage(
      `*${symbol}* ${archivedGridTrade.profit > 0 ? 'Profit' : 'Loss'}:\n` +
        `\`\`\`` +
        ` - Profit: ${archivedGridTrade.profit}\n` +
        ` - ProfitPercentage: ${archivedGridTrade.profitPercentage}\n` +
        ` - Total Buy Amount: ${archivedGridTrade.totalBuyQuoteQty}\n` +
        ` - Total Sell Amount: ${archivedGridTrade.totalSellQuoteQty}\n` +
        `\`\`\``,
      { symbol, apiLimit: getAPILimit(logger) }
    );
  }

  // Delete symbol grid trade
  await deleteSymbolGridTrade(logger, symbol);

  if (autoTriggerBuyEnabled) {
    await saveOverrideAction(
      logger,
      symbol,
      {
        action: 'buy',
        actionAt: moment()
          .add(autoTriggerBuyTriggerAfter, 'minutes')
          .toISOString(),
        triggeredBy: 'auto-trigger',
        notify: true,
        checkTradingView: true
      },
      `The bot queued the action to trigger the grid trade for buying` +
        ` after ${autoTriggerBuyTriggerAfter} minutes later.`
    );
  }
}
Remove last buy price

@param {*} logger
@param {*} symbol
@param {*} data
@param {*} processMessage
@param {*} extraMessages