The Heracles Strategy, developed by @Mablue (Masoud Azizi), is a trading strategy that aims to generate profits through backtesting. It utilizes various technical indicators and buy/sell parameters to make trading decisions. The strategy is implemented as a class called "HeraclesOptimize" and extends the "IStrategy" interface.
It requires the installation of the TA library before running.
The strategy makes use of the following libraries: logging, numpy, pandas, ta, qtpylib, and functools.
The strategy's main logic is divided into three methods: "populate_indicators," "populate_buy_trend," and "populate_sell_trend." In the "populate_indicators" method, the strategy calculates several technical indicators such as Keltner Channel Width Band, Donchian Channel PBand, MACD Signal, and Exponential Moving Average (EMA). These indicators are used to generate trading signals. The buy and sell parameters are defined in the strategy as dictionaries. The buy parameters include indicators such as volatility_kcw and volatility_dcp, along with their corresponding conditions. The sell parameters consist of trend_macd_signal and trend_ema_fast indicators, also with their conditions. The strategy sets a minimal ROI (Return on Investment) table, specifying the expected returns at different time intervals. It also includes a stop loss and trailing stop functionality. Overall, the Heracles Strategy aims to identify buying opportunities when the buy conditions are met and selling opportunities when the sell conditions are met. The strategy's performance has been backtested, showing average profits, median profits, total profits, and other statistics based on historical trading data.