The "BBRSITV" strategy is a trading strategy that utilizes Bollinger Bands, Relative Strength Index (RSI), and True Volume (TV) indicators to generate buy and sell signals. Here's a breakdown of how the strategy works:
In the "populate_indicators" method:
The RSI is calculated using a period of 14 on the closing prices. Another RSI is calculated using a period of 4 on the closing prices.
If the strategy is running in "hyperopt" mode, the strategy iterates over different moving average (MA) lengths from 5 to 80.
For each MA length:
An exponential moving average (EMA) is calculated on the RSI using the current MA length.
The standard deviation (STDDEV) is calculated on the RSI using the current MA length. If the strategy is not in "hyperopt" mode, the MA length and sell MA length specified in the configuration are used instead of iterating. The "EWO" (Elliott Wave Oscillator) indicator is calculated based on the specified fast and slow EWO values. In the "populate_buy_trend" method:
A buy signal is generated when the following conditions are met:
RSI is below the lower Bollinger Band (basis - deviation * sigma). EWO is above the specified high threshold and the volume is greater than zero. In the "populate_sell_trend" method:
A sell signal is generated when the following conditions are met:
RSI is above the specified high threshold or RSI is above the sell MA length's EMA plus deviation * sell sigma. The volume is greater than zero. The "BBRSITV4" and "BBRSITV1" classes inherit from the "BBRSITV" class and override the "populate_buy_trend" method to include additional conditions based on the EWO and RSI_4 indicators. Overall, the strategy aims to identify potential buying opportunities when the RSI is low and the price is below the lower Bollinger Band, while selling opportunities arise when the RSI is high or the price exceeds the sell MA length's EMA plus a certain deviation. The EWO and volume are used as additional confirmation criteria for generating buy signals.