# Buggy code
def get_signal(
    self, pair: str, interval: str, dataframe: DataFrame
) -> Tuple[bool, bool]:
    """
    Calculates current signal based several technical analysis indicators
    :param pair: pair in format ANT/BTC
    :param interval: Interval to use (in min)
    :param dataframe: Dataframe to analyze
    :return: (Buy, Sell) A bool-tuple indicating buy/sell signal
    """
    if not isinstance(dataframe, DataFrame) or dataframe.empty:
        logger.warning("Empty candle (OHLCV) data for pair %s", pair)
        return False, False

    try:
        df_len, df_close, df_date = self.preserve_df(dataframe)
        dataframe = strategy_safe_wrapper(self._analyze_ticker_internal, message="")(
            dataframe, {"pair": pair}
        )
        self.assert_df(dataframe, df_len, df_close, df_date)
    except StrategyError as error:
        logger.warning(
            f"Unable to analyze candle (OHLCV) data for pair {pair}: {error}"
        )

        return False, False

    if dataframe.empty:
        logger.warning("Empty dataframe for pair %s", pair)
        return False, False

    latest_date = dataframe["date"].max()
    latest = dataframe.loc[dataframe["date"] == latest_date].iloc[-1]

    # Check if dataframe is out of date
    interval_minutes = timeframe_to_minutes(interval)
    offset = self.config.get("exchange", {}).get("outdated_offset", 5)
    if latest_date < (arrow.utcnow().shift(minutes=-(interval_minutes * 2 + offset))):
        logger.warning(
            "Outdated history for pair %s. Last tick is %s minutes old",
            pair,
            (arrow.utcnow() - latest_date).seconds // 60,
        )
        return False, False

    (buy, sell) = latest[SignalType.BUY.value] == 1, latest[SignalType.SELL.value] == 1
    logger.debug(
        "trigger: %s (pair=%s) buy=%s sell=%s",
        latest["date"],
        pair,
        str(buy),
        str(sell),
    )
    return buy, sell


# Traceback (TypeError)
2020-05-26 04:21:20,354 - freqtrade.data.converter - INFO - Missing data fillup for OMG/BTC: before: 631 - after: 719
2020-05-26 04:21:20,905 - freqtrade.commands.trade_commands - ERROR - Timestamp subtraction must have the same timezones or no timezones
2020-05-26 04:21:20,905 - freqtrade.commands.trade_commands - ERROR - Fatal exception!
Traceback (most recent call last):
File "/freqtrade/freqtrade/commands/trade_commands.py"
, line 20, in start_trading

worker.run()
File "/freqtrade/freqtrade/worker.py", line 73, in run

state = self._worker(old_state=state)
File "/freqtrade/freqtrade/worker.py", line 107, in _worker

self._throttle(func=self._process_running, throttle_
secs=self._throttle_secs)
File "/freqtrade/freqtrade/worker.py", line 128, in _t
hrottle

result = func(*args, **kwargs)
File "/freqtrade/freqtrade/worker.py", line 141, in _p
rocess_running
self.freqtrade.process()
File "/freqtrade/freqtrade/freqtradebot.py", line 167, in process

self.enter_positions()
File "/freqtrade/freqtrade/freqtradebot.py", line 233, in enter_positions
trades_created += self.create_trade(pair)
File "/freqtrade/freqtrade/freqtradebot.py", line 416, in create_trade
(buy, sell) = self.strategy.get_signal(
File "/freqtrade/freqtrade/strategy/interface.py", line 338, in get_signal
(arrow.utcnow() - latest_date).seconds // 60
File "/usr/local/lib/python3.8/site-packages/arrow/arrow.py", line 1147, in sub
return self._datetime - other
File "pandas/_libs/tslibs/c_timestamp.pyx", line 300, in pandas._libs.tslibs.c_timestamp._Timestamp.__sub__
TypeError: Timestamp subtraction must have the same timezones or no timezones

# Fixed code
def get_signal(
    self, pair: str, interval: str, dataframe: DataFrame
) -> Tuple[bool, bool]:
    """
    Calculates current signal based several technical analysis indicators
    :param pair: pair in format ANT/BTC
    :param interval: Interval to use (in min)
    :param dataframe: Dataframe to analyze
    :return: (Buy, Sell) A bool-tuple indicating buy/sell signal
    """
    if not isinstance(dataframe, DataFrame) or dataframe.empty:
        logger.warning("Empty candle (OHLCV) data for pair %s", pair)
        return False, False

    try:
        df_len, df_close, df_date = self.preserve_df(dataframe)
        dataframe = strategy_safe_wrapper(self._analyze_ticker_internal, message="")(
            dataframe, {"pair": pair}
        )
        self.assert_df(dataframe, df_len, df_close, df_date)
    except StrategyError as error:
        logger.warning(
            f"Unable to analyze candle (OHLCV) data for pair {pair}: {error}"
        )

        return False, False

    if dataframe.empty:
        logger.warning("Empty dataframe for pair %s", pair)
        return False, False

    latest_date = dataframe["date"].max()
    latest = dataframe.loc[dataframe["date"] == latest_date].iloc[-1]
    # Explicitly convert to arrow object to ensure the below comparison does not fail
    latest_date = arrow.get(latest_date)

    # Check if dataframe is out of date
    interval_minutes = timeframe_to_minutes(interval)
    offset = self.config.get("exchange", {}).get("outdated_offset", 5)
    if latest_date < (arrow.utcnow().shift(minutes=-(interval_minutes * 2 + offset))):
        logger.warning(
            "Outdated history for pair %s. Last tick is %s minutes old",
            pair,
            (arrow.utcnow() - latest_date).seconds // 60,
        )
        return False, False

    (buy, sell) = latest[SignalType.BUY.value] == 1, latest[SignalType.SELL.value] == 1
    logger.debug(
        "trigger: %s (pair=%s) buy=%s sell=%s",
        latest["date"],
        pair,
        str(buy),
        str(sell),
    )
    return buy, sell