Skip to main content

Average Directional Index (ADX) in the Trade Rule Block

The ADX measures how strong a trend is, while its +DI and −DI lines show the trend's direction.

Purpose of the ADX

The Average Directional Index (ADX) measures the strength of a trend, regardless of its direction. It comes with two directional lines: +DI measures upward movement and −DI measures downward movement. In the Trade Rule block, you can use the ADX to trade only in trending markets, or to check whether buyers or sellers are in control.

How It Works

When you select Average Directional Index (ADX) in the Trade Rule block, you can configure it with the following settings:

Period of ADX

  • The number of candles used for the calculation.

  • Example: A period of 14 uses the last 14 candles (the standard setting).

Mode of ADX (Which line to use)

  • Main Line: The ADX line, showing trend strength (0 to 100).

  • +DI: The positive directional line, showing upward movement.

  • −DI: The negative directional line, showing downward movement.

Time Frame of ADX

  • Sets the chart time frame for the ADX calculation.

  • Can be replaced with a variable or input for quick testing and optimization.

Candle ID of ADX

  • Defines which candle the calculation starts from.

  • 0: Current candle (still forming).

  • 1: Most recently closed candle.

  • Higher IDs refer to older candles.

Adjust of ADX (Modify the Result)

  • Apply an adjustment to the calculated value by adding, subtracting, multiplying, or dividing by a number.

Example

If you set:

  • Period: 14

  • Mode: Main Line

  • Candle ID: 1

You get the ADX value of the most recently closed candle. A value above 25 is commonly read as a strong trend.

Average Directional Index (ADX) settings in the Profectus Trade Rule block

Use Cases

  • Trade only when a trend is strong, for example when the ADX is above 25.

  • Check trend direction with +DI > −DI (bullish) or −DI > +DI (bearish).

  • Avoid range-bound markets when the ADX is low.

⚠ Tip: The ADX shows strength, not direction. Combine the Main Line with +DI and −DI, or with a moving average, to know which way to trade.

⚠ Note: When you use Crosses Above or Crosses Below with this indicator, the cross is currently calculated on its first line, whatever Mode you select. To compare two specific lines, use > or < instead.

Did this answer your question?