The Cluc7werk strategy is a trading strategy implemented in Python for backtesting purposes. Here is a brief description of what the strategy does:
The strategy uses various indicators and parameters to generate buy and sell signals for trading. It calculates Bollinger Bands (BB) for two different time periods and stores the upper, middle, and lower bands in the DataFrame.
It calculates the delta between the middle band and the lower band (bb1-delta), the absolute difference between consecutive closing prices (closedelta), and the absolute difference between the closing price and the lowest price (tail).
It calculates the exponential moving averages (EMA) for two different time periods and the rolling mean of the volume over a window of 24 periods.
It calculates the relative strength index (RSI) with a time period of 9 and applies an inverse Fisher transform to obtain values between -1.0 and 1.0. The populate_buy_trend function uses the calculated indicators and parameters to determine when to place buy signals. It checks if the Fisher-transformed RSI is below a specified threshold (params['fisher']), and either:
The bb1-delta is greater than a percentage of the close price (params['bbdelta-close']), the closedelta is greater than a percentage of the close price (params['closedelta-close']), the tail is less than a percentage of bb1-delta (params['bbdelta-tail']), the close price is below the lower bb1 band, and the close price is lower or equal to the previous close price. The close price is below the slower EMA, below a percentage of the lower bb2 band (params['close-bblower']), and the volume is lower than a percentage of the previous volume mean (params['volume']). The populate_sell_trend function uses the sell parameters to determine when to place sell signals. It checks if the product of the close price and a specified value (params['sell-bbmiddle-close']) is greater than the mid-bb2 band, the fast EMA is above the close price, the Fisher-transformed RSI is above a specified threshold (params['sell-fisher']), and the volume is greater than 0. The strategy also includes parameters for the ROI table, stop-loss level, and trailing stop functionality. Please note that this is just a brief overview of the strategy, and the exact behavior and performance can only be fully understood by analyzing the complete code and conducting thorough backtesting.