ADX

The ADX measures the strength of a trend regardless of its direction.

Role in the strategy

SlotAvailableRole
Entry PointNo—
Entry RuleYesFilters entries by the ADX direction or its level position.
Exit PointNo—
Exit RuleYesTriggers exits by the ADX direction or its level position.

The ADX produces conditions, not order prices. As an entry rule it is ANDed with the entry point and the other entry rules; as an exit rule it is ORed with the other exit rules. See Indicators for the slot semantics.

Logic rules

The indicator offers the standard oscillator rule set, evaluated on the ADX value:

RuleSignal is 1 when
ADX risesADX rose on the previous bar
ADX fallsADX fell on the previous bar
ADX is higher than the Level lineADX is above Level
ADX is lower than the Level lineADX is below Level
ADX crosses the Level line upwardADX crossed above Level from below
ADX crosses the Level line downwardADX crossed below Level from above
ADX changes its direction upwardADX formed a valley (down then up)
ADX changes its direction downwardADX formed a peak (up then down)

The ADX measures trend strength without a direction: the same signal is written for both the long and the short side (noDirectionOscillator). The indicator itself does not distinguish between bullish and bearish trends — pair it with a directional rule such as Directional Indicators when the strategy needs a direction.

Parameters

ParameterTypeDefaultRangePurpose
Periodnumber141 to 1000Bars of the directional calculation
Levelnumber00 to 100Threshold for the level rules

Calculation

tech.ADX in engine/indicator-engine/tech.ts computes:

  • DI+ and DI-: exponential averages of the positive and negative directional movement, normalized by the true range.
  • DX = 100 × |DI+ − DI-| / (DI+ + DI-).
  • ADX = exponential average of the DX over the Period.

The ADX line is drawn in a separate chart pane; higher values mean a stronger trend.

Backtesting

  • The rule is evaluated on the previous (closed) bar with the standard dead zone (SIGMA = 0.000001).
  • The indicator contributes only a single signal array copied to both directions — it never changes the entry or exit order price.
  • An entry happens only when the entry point allows the direction and every entry rule passes; an exit happens when the exit point is reached and any exit rule passes.