The "bbrsi" strategy is a trading strategy that uses several technical analysis (TA) indicators to generate buy and sell signals. Here's a breakdown of what the strategy does:
The populate_indicators function adds the following indicators to the given DataFrame:
Relative Strength Index (RSI)
Bollinger Bands (BB) consisting of lower band, middle band, and upper band
The populate_buy_trend function populates the buy signal in the DataFrame based on the following conditions:
RSI value is greater than 19
Close price is lower than the lower Bollinger Band
The populate_sell_trend function populates the sell signal in the DataFrame based on the following conditions:
RSI value is greater than 83
Close price is higher than the middle Bollinger Band
The strategy aims to identify potential buying opportunities when the RSI is relatively low and the price is below the lower Bollinger Band. It also identifies potential selling opportunities when the RSI is relatively high and the price is above the middle Bollinger Band.