The Heracles Strategy is a trading strategy designed for backtesting purposes. It is implemented as a Python script and can be used to analyze the performance of different trading strategies. The strategy uses various technical indicators to make buy and sell decisions.
It includes the following indicators: Keltner Channel Width Band, Donchian Channel Priceline Band, MACD Signal, and Exponential Moving Average (EMA).
In the buy phase, the strategy checks if the value of the 'volatility_kcw' indicator is less than the value of the 'volatility_dcp' indicator.
If this condition is met, a buy signal is generated. In the sell phase, the strategy checks if the 'trend_macd_signal' indicator has crossed below the 'trend_ema_fast' indicator. If this condition is met, a sell signal is generated. The strategy also includes parameters for setting the stop-loss and trailing stop. The stop-loss is set at -0.346, and the trailing stop is enabled with a positive offset of 0.022 and an offset to trigger the trailing stop of 0.071. The strategy operates on a 12-hour timeframe and provides a minimal return on investment (ROI) table, which specifies the expected returns at different time intervals. To use the strategy, the 'ta' library needs to be installed. The strategy is implemented as a class called 'Heracles' that extends the 'IStrategy' interface provided by the backtesting framework. Please note that this is a brief description of the strategy, and for a detailed understanding, it is recommended to refer to the provided source code and documentation.