The adx_strategy is a trading strategy that utilizes technical indicators to generate buy and sell signals. It is optimized using the Sortino Ratio and two years of historical data. The strategy is designed to be used with a ticker interval of 15 minutes.
It uses the following indicators: ADX, PLUS_DI, MINUS_DI, SAR, and MOM.
In the populate_indicators method, these indicators are calculated and added to the input DataFrame.
The ADX indicator measures the strength of a trend, while the PLUS_DI and MINUS_DI indicators represent the directional movement. SAR is the Parabolic SAR indicator, and MOM calculates the momentum. The populate_buy_trend method generates buy signals based on certain conditions. It checks if the ADX value is greater than 16, the MINUS_DI value is greater than 4, and if there is a crossover where the MINUS_DI crosses above the PLUS_DI. The populate_sell_trend method generates sell signals based on different conditions. It checks if the ADX value is greater than 43, the PLUS_DI value is greater than 24, and if there is a crossover where the PLUS_DI crosses above the MINUS_DI. The strategy also includes a minimal ROI (Return on Investment) table that defines the desired returns at different time intervals. It has a stop loss set at -0.1255, which indicates the maximum tolerable loss before selling. Overall, the strategy aims to identify potential buying opportunities when the trend strength is significant and the directional movement suggests positive price movement. It looks for selling opportunities when the trend strength is high and the directional movement indicates a potential reversal.