Freqtrade: All RSI conditions get ignored

Created on 25 Sep 2019  路  4Comments  路  Source: freqtrade/freqtrade

Step 1: Have you search for this issue before posting it?

yes

Step 2: Describe your environment

  • Operating system: Ubuntu 18.04.3 LTS
  • Python Version: 3.6
  • CCXT version: latest (25.09.2019)
  • Branch: Develop

Step 3: Describe the problem:

freqtrade completely ignores my RSI sell/buy signals

Steps to reproduce:

  1. Backtesting and plotting with the RSI signals
  2. Backtesting and plotting without the RSI signals

Observed Results:

  • What happened?
    The backtesting results and the charts are identical, both ignore the RSI condition
  • What did you expect to happen?
    I excpected freqtrade to open and close a trades only if the RSI condition is met

Relevant code exceptions or logs:

        def populate_buy_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
        dataframe.loc[
        (
            (dataframe['rsi'] > 47) &
            (dataframe["close"] < dataframe['bb_lowerband'])

        ),
        'buy'] = 1

        return dataframe

    def populate_sell_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame:

    dataframe.loc[
        (
                (dataframe['rsi'] > 86) &
                (dataframe["close"] > dataframe['bb_upperband'])

        ),
        'sell'] = 1

         return dataframe
Question

All 4 comments

Well what's the expected behaviour?
You're buying when RSI > 47, and selling when it's > 86 ...

Also, i suspect it's a copy/paste error - but indention looks WAY off in the code-sample above, so please check that in your strategy file.

Sometimes it happens that you copied a strategy into another file, modified it, but forgotten to change the name of the strategy class. The old one will still probably be used without all your recent modifications... Please check this in the log (the name of the file the strategy is resolved from)

Also, your conditions in the strategy is not buy when RSI > 47, it's actually buy when RSI > 47 AND close < BBlower. Are you sure you actually have candles in the backtesting timerange where both comparisons are true for the same candle?

@issamBD is it still actual?

Solved, it was a copy paste error, the program was loading another strategy file. Thanks for the help guys

Was this page helpful?
0 / 5 - 0 ratings