The "keltnerhopt" strategy is a backtesting strategy that uses Keltner Channels and RSI (Relative Strength Index) to generate buy and sell signals for trading. Here is a breakdown of what the strategy does:
The strategy operates on daily timeframe data. The stoploss is set to -0.3, which means a maximum loss of 30% before selling.
The minimal_roi is set to {"0": 100}, which means the strategy will hold the position until a 100% return is achieved.
The strategy uses three hyperopt parameters for optimization: "window_range", "atrs_range", and "rsi_buy_hline".
The strategy calculates Keltner Channels using different window sizes and ATR (Average True Range) multiples. The strategy calculates the RSI indicator with a time period of 14. In the "populate_buy_trend" method, the strategy checks for a bullish signal when the price crosses above the upper band of the Keltner Channel and the RSI value is above the specified threshold. In the "populate_sell_trend" method, the strategy checks for a bearish signal when the price crosses below the middle band of the Keltner Channel. If the conditions for buying or selling are met, the respective "buy" or "sell" column in the dataframe is set to 1. Overall, the strategy aims to capture potential buying opportunities when the price is above the upper band of the Keltner Channel and the RSI is high, and selling opportunities when the price is below the middle band of the Keltner Channel.