The ADXMomentum strategy is a trading strategy that combines the use of the Average Directional Index (ADX) and momentum indicators to generate buy and sell signals. Here's a breakdown of what the strategy does:
The strategy is designed for a minimal Return on Investment (ROI) of 0.01, which can be adjusted based on market conditions. It uses a stop loss of -0.25, indicating the maximum acceptable loss before exiting a trade.
The timeframe for the strategy is set to 1 hour, meaning it analyzes price data over hourly intervals.
The strategy requires at least 20 candles (or periods) of data before producing valid signals.
Indicators Used:
ADX (Average Directional Index): It calculates the strength of a trend. The buy signal is generated when the ADX value is greater than the specified buy_adx parameter, indicating a strong trend. The sell signal is generated when the ADX value is greater than the specified sell_adx parameter. Plus Directional Indicator (+DI) and Minus Directional Indicator (-DI): They measure the upward and downward movement of price, respectively. The buy signal is generated when the +DI value is greater than the buy_plus_di parameter, and when the +DI is greater than the -DI. The sell signal is generated when the -DI value is greater than the sell_minus_di parameter, and when the +DI is less than the -DI. Momentum Indicator: It calculates the rate of change of price. The buy signal is generated when the momentum value is greater than the buy_mom parameter. The sell signal is generated when the momentum value is less than the sell_mom parameter. The strategy populates these indicators using the specified time periods and assigns a "buy" or "sell" value to the corresponding dataframe rows based on the conditions mentioned above.