Bollinger Band and RSI Oversold Entry Strategy
Summary
This Freqtrade strategy combines a 14-period RSI with 20-period Bollinger Bands calculated from typical price using two standard deviations. It enters long when RSI is below 30 and the close is beneath the lower band, then signals an exit when RSI rises above 70. The configuration also specifies a one-hour timeframe, a 10% minimal return on investment, and a 25% stop loss.
The document presents implementation rules rather than performance evidence: it contains no backtest results, market selection, or discussion of trading costs. The entry condition treats simultaneous oversold RSI and a lower-band breach as a buying opportunity, while the exit relies on RSI recovery rather than a band or price target. These thresholds may behave differently across assets and market regimes, and the stated stop loss is wide. Evaluation would require testing with realistic execution assumptions and risk controls.
Key ideas
- The strategy opens long positions when RSI is below 30 and price closes below the lower Bollinger Band.
- It calculates Bollinger Bands over 20 periods with a two standard deviation width.
- An RSI reading above 70 triggers the long exit signal.
- The settings specify hourly candles, a 10% minimal return target, and a 25% stop loss.
- The document provides code and parameters but no evidence of historical or live performance.
Tags
Full text
# BbandRsi
# BbandRsi
author@: Gert Wohlgemuth
converted from:
https://github.com/sthewissen/Mynt/blob/master/src/Mynt.Core/Strategies/BbandRsi.cs
## Source (GPL-3.0)
```python
# --- Do not remove these libs ---
from freqtrade.strategy import IStrategy
from pandas import DataFrame
import talib.abstract as ta
import freqtrade.vendor.qtpylib.indicators as qtpylib
# --------------------------------
class BbandRsi(IStrategy):
"""
author@: Gert Wohlgemuth
converted from:
https://github.com/sthewissen/Mynt/blob/master/src/Mynt.Core/Strategies/BbandRsi.cs
"""
INTERFACE_VERSION: int = 3
# Minimal ROI designed for the strategy.
# adjust based on market conditions. We would recommend to keep it low for quick turn arounds
# This attribute will be overridden if the config file contains "minimal_roi"
minimal_roi = {
"0": 0.1
}
# Optimal stoploss designed for the strategy
stoploss = -0.25
# Optimal timeframe for the strategy
timeframe = '1h'
def populate_indicators(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
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_middleband'] = bollinger['mid']
dataframe['bb_upperband'] = bollinger['upper']
return dataframe
def populate_entry_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
dataframe.loc[
(
(dataframe['rsi'] < 30) &
(dataframe['close'] < dataframe['bb_lowerband'])
),
'enter_long'] = 1
return dataframe
def populate_exit_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
dataframe.loc[
(
(dataframe['rsi'] > 70)
),
'exit_long'] = 1
return dataframe
```Shown in full with attribution under the source's licence. Licence: GPL-3.0
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.