The "keltnerhopt" strategy is a backtesting strategy that uses the Keltner Channel indicator and the Relative Strength Index (RSI) to generate buy and sell signals for trading. Here's a breakdown of what the strategy does:
Timeframe: The strategy operates on daily (1-day) data. Stoploss and ROI: The stoploss is set to -0.254, indicating the maximum acceptable loss before selling.
The minimal_roi parameter defines the desired return on investment for different time periods.
Hyperopt Spaces: The strategy uses hyperopt to optimize its parameters.
The parameters being optimized are:
window_range: An integer parameter ranging from 13 to 56 with a default value of 16. It affects the window size used in the Keltner Channel calculation. atrs_range: An integer parameter ranging from 1 to 8 with a default value of 1. It affects the number of Average True Range multiples used in the Keltner Channel calculation. rsi_buy_hline: An integer parameter ranging from 30 to 70 with a default value of 61. It represents the RSI threshold for buying. populate_indicators: This function calculates the Keltner Channel upper band and middle band for different combinations of window and atrs parameters. It also calculates the RSI indicator. populate_buy_trend: This function defines the conditions for a buy signal. It checks if the closing price crosses above the Keltner Channel upper band and if the RSI value is above the specified threshold. populate_sell_trend: This function defines the conditions for a sell signal. It checks if the closing price crosses below the Keltner Channel middle band. The strategy uses these buy and sell signals to generate trading decisions within the backtesting framework.