The TEMABounce strategy is a trading strategy that utilizes various technical analysis indicators to generate buy and sell signals. Here is a brief description of what the strategy does:
The populate_indicators function adds the following indicators to the given DataFrame:
RSI (Relative Strength Index)
MACD (Moving Average Convergence Divergence) and its components (macd, macdsignal, macdhist)
Bollinger Bands and related metrics (bb_lowerband, bb_middleband, bb_upperband, bb_percent, bb_width, bb_gain)
TEMA (Triple Exponential Moving Average) and its related metrics (tema, tema_short, tema_angle, tema_diff)
SMA (Simple Moving Average)
SAR (Stop and Reverse)
The populate_entry_trend function determines the buy signals based on the populated indicators. The conditions for a buy signal include:
Volume greater than 0
MACD histogram greater than or equal to 0 (if buy_macd_enabled is True)
TEMA difference greater than 0
Bollinger Bands gain greater than or equal to the specified threshold (if buy_bb_enabled is True)
Crossing above 0 for the TEMA angle
The populate_exit_trend function determines the sell signals based on the populated indicators.
The conditions for a sell signal include:
Crossing below 0 for the TEMA angle
Close price greater than the TEMA
TEMA difference greater than or equal to the negative of the specified threshold (sell_diff)
If sell_hold is True, it sets the sell signal to 0 for all data points (no selling)
The strategy aims to identify potential buying opportunities when the indicators align with the specified conditions and sell positions when the conditions for selling are met.