The BbandRsiRolling strategy is designed to backtest trading strategies using Bollinger Bands and the rolling RSI indicator. It focuses on determining optimal buying conditions based on the RSI and Bollinger Bands, while the selling decisions are solely determined by achieving a minimal return on investment (ROI). Here's a breakdown of the strategy:
Minimal ROI: The strategy sets specific ROI targets at different time intervals.
These targets have been determined using hyperopt over a 270-day period.
Stoploss: The strategy has an optimal stoploss value of -0.08, which means that if the price drops by 8% from the purchase price, the asset will be sold to limit potential losses.
Timeframe: The strategy operates on a 5-minute timeframe, indicating that it analyzes price data in 5-minute intervals. Indicators: The strategy calculates the Relative Strength Index (RSI) with a time period of 14 and populates the 'rsi' column in the dataframe. It also computes Bollinger Bands using a window of 20 and 2 standard deviations. The lower, middle, and upper bands are stored in the 'bb_lowerband,' 'bb_middleband,' and 'bb_upperband' columns, respectively. Buy Trend: The strategy identifies buy signals when two conditions are met: the rolling minimum RSI value over the past 8 periods is less than 37, and the closing price is below the lower Bollinger Band. If both conditions are satisfied, the 'buy' column is set to 1. Sell Trend: The selling decisions are left unspecified in the provided code. This section can be customized according to specific criteria for selling assets. Overall, the BbandRsiRolling strategy combines RSI and Bollinger Bands to determine optimal buying conditions, while the selling decisions are based on achieving a predefined minimal ROI.