Skip to main content

ADX (futures)

Use the ADX indicator to determine when to buy and sell. This indicator measures the strength of a trend, allowing Gunbot to buy during strong uptrends and sell during strong downtrends. Gunbot uses ADX together with Directional Index.

ADX is a popular technical analysis tool used by traders to identify trends in the market. It is calculated using a series of calculations that take into account the highs and lows of price movements over a specified time period. Generally, an ADX reading above 25 indicates a strong trend, while a reading below 20 suggests a weak trend. The ADX can be used in conjunction with other indicators to confirm trading signals and help traders make informed decisions.

How to work with it

This page explains how futures trading operates with the ADX method. The triggers for trades differ slightly from those used in spot trading.

Gunbot opens a single position, either long or short, and closes it when the target is met. If the stop is triggered before closing the trade at a profit, Gunbot will place a stop order at a loss. After closing a position, Gunbot will seek to open a new long or short position.

Buy method conditions

Opening a long position is allowed when DI- is smaller than DI+ and ADX is above ADX_LEVEL.

Sell method conditions

Opening a short position is allowed when DI- is bigger than DI+ and ADX is above ADX_LEVEL.

Conditions to close

A position is closed when the desired ROE is reached.

Conditions to stop

A position is closed at loss when negative ROE reaches the STOP_LIMIT target.

ADX Strategy settings (futures)

Long settings

LabelConfig ParameterDefault ValueDetailed Description
Buy enabledBUY_ENABLEDtrueEnables the execution of buy or long orders when set to true.

This allows you to actively participate in buying opportunities as they arise based on the ADX strategy conditions.

Short settings

LabelConfig ParameterDefault ValueDetailed Description
Sell enabledSELL_ENABLEDtrueEnables the execution of sell or short orders when set to true.

This setting allows you to initiate sell transactions automatically, capitalizing on trading conditions defined by the ADX strategy.


LabelConfig ParameterDefault ValueDetailed Description
PeriodPERIOD15The period setting determines the "size" of the candlesticks in minutes used for the indicator calculations. It is crucial to ensure the period value is supported by your exchange to ensure accurate indicator outputs.

The default setting uses 15-minute candlesticks.
ADX levelADX_LEVEL25Set the minimum trend level for initiating trades. The ADX level can be adjusted between 1 and 99, allowing you to define the strength of the trend required before executing a trade.

The default value is set at 25, providing a baseline for typical market conditions.
DI periodDI_PERIOD14Specifies the number of candles used to calculate the ADX. The DI period helps in determining the strength of the trend over a specified number of candlesticks.

The default setting is 14 candles, which typically balances responsiveness with trend confirmation.