The Heracles strategy is a backtesting trading strategy designed to be used on a website. It aims to generate profitable trading signals based on certain indicators. Here's a breakdown of its important components:
The strategy calculates a ROI (Return on Investment) table with predefined values for different time periods.
It sets a stoploss value to limit potential losses.
The recommended timeframe for executing trades is set to 4 hours.
The strategy uses the "volatility_kcw" and "volatility_dcp" indicators from the TA (Technical Analysis) library to make trading decisions. It sets parameters for buying trades, including minimum and maximum divergence values, as well as indicator shifts. The strategy populates indicators by calculating the Keltner Channel Width Band and the Donchian Channel Percentage Band indicators. In the buying trend function, the strategy checks conditions based on the calculated divergence values and applies them to determine whether to execute a buy trade. The selling trend function doesn't perform any specific actions and sets the sell column to 0. Overall, the Heracles strategy aims to identify buy signals based on indicator divergences and apply predefined ROI values and stoploss levels to manage trades.