The ADXMomentum strategy is a trading strategy that utilizes technical indicators to generate buy and sell signals. Here's a breakdown of how the strategy works:
The strategy uses the following indicators: Average Directional Index (ADX), Positive Directional Indicator (+DI), Negative Directional Indicator (-DI), Parabolic SAR (SAR), and Momentum (MOM). The minimal return on investment (ROI) for this strategy is set to 0.01, which means that the strategy aims to achieve at least a 1% return on each trade.
The stop loss is set to -0.25, indicating that if the trade goes against the expected direction by 0.25 (25%) of the entry price, the position will be closed to limit losses.
The strategy operates on 1-hour candlestick data.
Before generating valid signals, the strategy requires a startup candle count of 20, meaning it needs 20 candles of data to calculate the indicators and start producing signals. In the populate_indicators method, the strategy calculates the ADX, +DI, -DI, SAR, and MOM indicators using the provided candlestick data. The populate_buy_trend method generates a buy signal when the following conditions are met:
ADX is greater than 25
MOM is greater than 0
-DI is greater than 25
+DI is greater than -DI
The populate_sell_trend method generates a sell signal when the following conditions are met:
ADX is greater than 25
MOM is less than 0
-DI is greater than 25
+DI is less than -DI
Overall, the ADXMomentum strategy aims to identify trends using the ADX indicator and make buy and sell decisions based on the combination of momentum, directional indicators, and SAR. It seeks to capture positive returns while managing risk through the use of stop loss.