The Heracles Strategy, developed by Masoud Azizi (@Mablue), is a trading strategy designed for backtesting on a website. It utilizes various technical indicators to make buying decisions in the market. The strategy involves importing necessary libraries such as pandas, ta, and qtpylib.
It uses the "S08" strategy class, which implements the Freqtrade IStrategy interface.
The strategy defines several hyperparameters for buying, selling, and risk management.
To populate indicators, the strategy calculates two volatility indicators: Keltner Channel Width Band (volatility_kcw) and Donchian Channel P Band (volatility_dcp). These indicators help identify potential buying opportunities. The populate_buy_trend method implements the buy strategy based on the hyperparameters set. It checks conditions based on the calculated indicators and the hyperparameter values. If the conditions are met, the strategy sets a "buy" signal. The populate_sell_trend method is not implemented in this strategy, as it returns a dataframe with a "sell" column set to 0. The strategy also defines a minimal_roi (minimal return on investment) table and a stoploss value for risk management. To use this strategy, it is important to add it to the pairlists in the config.json file under the StaticPairList section. Additionally, the ta library needs to be installed before running the strategy. Note: The description provided is a summary based on the code provided. The strategy's actual performance and effectiveness can only be determined through proper backtesting and evaluation.