💬 Forum

RSI_BB_2

remiotore/ccxt-freqtrade/strategies/RSI_BB_2_converted.py · ★3 · ⑂2 · first seen 2026-07-28 · repo updated 2026-01-11

Basics mode: spot timeframe: 15m interface version: 3
Settings stoploss: -1.0 has minimal roi
Indicators Bollinger_Bands RSI talib
15 related strategies ( identical code, similar name)

Each tile is a different kind of check — from an instant code lint to full sandboxed backtests and forward tests on recent data. Not sure what a check actually proves? See the FAQ →

Source

Download Raw
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import talib.abstract as ta
import pandas
from pandas import DataFrame
import freqtrade.vendor.qtpylib.indicators as qtpylib
from freqtrade.strategy.interface import IStrategy

class RSI_BB_2(IStrategy):
    INTERFACE_VERSION = 3
    timeframe = '1d'
    timeframe = '15m'
    minimal_roi = {'0': 0.85, '11343': 0.407, '23766': 0.16, '41495': 0}
    stoploss = -1

    def populate_indicators(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
        dataframe['rsi'] = ta.RSI(dataframe)
        bollinger1 = qtpylib.bollinger_bands(qtpylib.typical_price(dataframe), window=20, stds=1)
        dataframe['bb_lowerband1'] = bollinger1['lower']
        bollinger3 = qtpylib.bollinger_bands(qtpylib.typical_price(dataframe), window=20, stds=3)
        dataframe['bb_upperband3'] = bollinger3['upper']
        return dataframe

    def populate_entry_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
        dataframe.loc[dataframe['close'] < dataframe['bb_lowerband1'], 'enter_long'] = 1
        return dataframe

    def populate_exit_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
        dataframe.loc[(dataframe['rsi'] > 56) & (dataframe['close'] > dataframe['bb_upperband3']), 'exit_long'] = 1
        return dataframe