💬 Forum

CombinedStrategy

🏆 League #658 / 1939

KhalilGibrotha/freqtrade-antigravity-bot/freqtrade/user_data/strategies/CombinedStrategy.py · first seen 2026-07-16 · repo updated 2026-03-04 · ⬇ 1 download

Basics mode: spot timeframe: 5m interface version: 3
Settings stoploss: -0.248 has minimal roi
Indicators Bollinger_Bands RSI talib
Concepts mean_reversion
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
from freqtrade.strategy import IStrategy
from pandas import DataFrame
import talib.abstract as ta
import freqtrade.vendor.qtpylib.indicators as qtpylib

class CombinedStrategy(IStrategy):
    INTERFACE_VERSION = 3
    
    # Hyperopt-derived ROI
    minimal_roi = {
        "0": 0.093,
        "17": 0.075,
        "60": 0.011,
        "165": 0
    }
    
    # Hyperopt-derived Stoploss
    stoploss = -0.248
    
    timeframe = '5m'

    def populate_indicators(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
        # RSI
        dataframe['rsi'] = ta.RSI(dataframe, timeperiod=14)
        
        # Bollinger Bands
        bollinger = qtpylib.bollinger_bands(qtpylib.typical_price(dataframe), window=20, stds=2)
        dataframe['bb_lowerband'] = bollinger['lower']
        dataframe['bb_upperband'] = bollinger['upper']
        
        return dataframe

    def populate_entry_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
        dataframe.loc[
            (
                # Double Confirmation:
                # 1. Very Oversold (RSI < 18 from Hyperopt)
                (dataframe['rsi'] < 18) &
                # 2. Price below Lower Bollinger Band
                (dataframe['close'] < dataframe['bb_lowerband']) &
                (dataframe['volume'] > 0)
            ),
            'enter_long'] = 1
        return dataframe

    def populate_exit_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
        dataframe.loc[
            (
                (
                    # Take profit if Very Overbought (RSI > 89)
                    (dataframe['rsi'] > 89) |
                    # OR Price spikes above Upper Bollinger Band
                    (dataframe['close'] > dataframe['bb_upperband'])
                ) &
                (dataframe['volume'] > 0)
            ),
            'exit_long'] = 1
        return dataframe