The BBRSI strategy is a backtesting strategy that combines Bollinger Bands (BB) and Relative Strength Index (RSI) indicators to generate buy and sell signals for trading. Here is a breakdown of how the strategy works:
The strategy uses a 14-period RSI indicator to determine the overbought and oversold conditions of a trading instrument. It also calculates the Bollinger Bands using a 20-period simple moving average and 4 standard deviations.
The lower Bollinger Band (bb_lowerband), middle Bollinger Band (bb_middleband), and upper Bollinger Band (bb_upperband) are calculated and stored in the dataframe.
The buy signal is generated when the RSI value is above 30 (indicating oversold condition) and the closing price is below the lower Bollinger Band.
The sell signal is generated when the closing price crosses above the middle Bollinger Band. The strategy aims to capitalize on potential price reversals by buying when the price is at the lower Bollinger Band and selling when it crosses above the middle Bollinger Band. It incorporates the RSI indicator to filter out trades by considering the oversold condition. The minimal ROI (Return on Investment) and stoploss parameters are also set to manage the risk and target specific returns. This strategy is designed to operate on 5-minute ticker intervals, but the timeframe can be adjusted based on market conditions. The backtesting website would use this strategy to test various trading instruments and evaluate their historical performance based on the generated buy and sell signals.