The SafeCluc strategy is a trading strategy that utilizes various technical indicators to determine buy and sell signals. Here is a breakdown of what the strategy does:
In the populate_indicators method, the strategy calculates and adds several indicators to the dataframe, including:
Heikin-Ashi candles (open, close, high, low)
Bollinger Bands (mid, lower)
Bollinger Bands delta (bbdelta)
Close delta (closedelta)
Tail (difference between close and low)
Exponential Moving Averages (ema_fast, ema_slow)
Volume moving average (volume_mean_slow)
Rate of Change Ratio (rocr)
Relative Strength Index (RSI) and Fisher Transform (rsi, fisher)
RSI with different time periods (rsi_84, rsi_112)
Top percent changes for different time intervals (tpct_change_1, tpct_change_2, tpct_change_4, tpct_change_9)
The strategy then retrieves additional informative data for a higher timeframe (1 hour) and merges it with the current dataframe. In the populate_buy_trend method, the strategy applies various conditions to identify potential buy signals.
These conditions include:
RSI values below 60 for two different time periods (rsi_84, rsi_112)
Negative top percent changes for different intervals (tpct_change_1, tpct_change_2, tpct_change_4)
Price pump protection conditions based on rolling maximum values
Conditions involving Bollinger Bands, close delta, tail, and Heikin-Ashi candles
If all the buy conditions are met, the strategy marks the corresponding row with a 'buy' signal.
In the populate_sell_trend method, the strategy identifies potential sell signals based on the following conditions:
Fisher Transform values exceeding a sell threshold
Decreasing highs and lows in Heikin-Ashi candles
EMA crossing above the Heikin-Ashi close price
Heikin-Ashi close price multiplied by a sell threshold exceeding the Bollinger Bands middle band
Volume being greater than zero
If all the sell conditions are met, the strategy marks the corresponding row with a 'sell' signal.
The strategy aims to generate buy and sell signals based on the combination of these technical indicators and conditions.