Student Wyckoff · Elliott Wave

Blog and practice

ATR, DMI, ADX, Supertrend and SAR: range, direction and state

Teaching tables and diagrams with explicit inputs, formulas, seeds, local conditions and limits when checking Elliott wave hypotheses.

Student Wyckoff editorial team

Published: (UTC+3)

Русский · English · Deutsch · Español · Français · Italiano · 繁體中文 · 日本語 · 한국어

This lab connects indicators to a wave hypothesis through explicit calculations. Every example price, volume and parameter is invented. A positive indicator condition describes a local state; it does not establish an entire Elliott count or measure a probability of profit.

Invented inputs and calculation rules

The table contains completed bars. t is an ordinal index; O/H/L/C mean open/high/low/close and V is invented volume from one source, not an entire-market total. Dataset A has a preceding bar t=−1 with C=99, H=100, L=98. Windows include the current bar unless explicitly stated otherwise.

SMA_n is the mean of the latest n values. EMA_n uses α=2/(n+1) and RMA_n uses α=1/n; both recursions y_t=αx_t+(1−α)y_(t−1) start with the mean of the first n available values. Intermediate values are not rounded; tables display up to six decimals. “—” means insufficient history or an undefined value, not zero. Missing inputs are not replaced with zero. Short teaching periods are not recommended settings; the seeds and zero policies are declared here, without a claim of parity with every platform.

DatasettOHLCV
A099.51019910010
A1101.510310110212
A2100.51021001018
A3103.510510310415
A4102.51041021039
A5105.510710510620
A6103.510510310411
A7106.510810610718
A8104.510610410514
A9107.510910710822
A10103.510510310416

Can an early undefined indicator value be replaced by zero and counted as a negative signal?

No. A missing full window and a calculated zero are different states; freeze the warm-up policy in advance.

ATR: range including gaps

TR compares the bar range with distances from the previous close; ATR3 smooths TR using RMA. Formula and worked calculation: TR_t=max(H_t−L_t,|H_t−C_(t−1)|,|L_t−C_(t−1)|); ATR3=RMA3(TR). ATR3_2=(2+3+2)/3=7/3; t7: TR=max(2,4,2)=4; ATR3=3.360768.

Initialization uses C_(−1)=99; the first ATR is mean TR0–2. Then ATR_t=(TR_t+2ATR_(t−1))/3. Zero TR is valid; fewer than three observations gives no value.

Local research predicate: t7: ATR3_t>ATR3_(t−1). ATR rises from t6 to t7, but it is not a direction measure. The same TR can accompany a decline. An ATR multiple alone specifies neither an account risk budget nor a guaranteed stop fill.

ATR: range including gapsATR: range including gapsPrice C99.04102.346667105.653333108.96CValue2.1338392.8209853.5081314.195277ATR30246810t
Original calculation on invented completed bars; warm-up gaps are not connected. Price and indicator use separate panels and scales.
tCTRATR3
01002—
11023—
210122.333333
310442.888889
410322.592593
510643.061728
610433.041152
710743.360768
810533.240512
910843.493675
1010453.995783

Reproduce the highlighted calculation and evaluate the local predicate. Does the result establish the entire wave count?

3.360768175583>3.041152263374. No. It is the result of the stated calculation on invented data, not proof of a wave structure or profit.

DMI: directional movement and normalization

Compare the increase in H with the decrease in L; only the strictly larger positive component receives DM. Formula and worked calculation: u=H_t−H_(t−1); d=L_(t−1)−L_t; +DM={u:u>max(d,0); 0:u≤max(d,0)}; −DM={d:d>max(u,0); 0:d≤max(u,0)}; ±DI=100RMA3(±DM)/ATR3. t7: +DI=52.775510; −DI=17.469388.

When u=d both DM values are zero. DM and TR use the same seed window t0–2; ATR=0 makes DI undefined. Prior H/L are supplied in the inputs.

Local research predicate: t7: +DI>−DI. +DI>−DI at t7 describes dominance of smoothed positive movement. It is not a measured buyer/seller balance: DMI uses H/L/C without classifying trades.

DMI: directional movement and normalizationDMI: directional movement and normalizationPrice C99.04102.346667105.653333108.96CValue1.69230822.35897443.02564163.692308+DI−DI0246810t
Original calculation on invented completed bars; warm-up gaps are not connected. Price and indicator use separate panels and scales.
tC+DM−DMRMA3(+DM)RMA3(−DM)+DI−DI
010010————
110220————
21010110.33333342.85714314.285714
3104301.6666670.22222257.6923087.692308
4103011.1111110.48148142.85714318.571429
5106301.7407410.32098856.85483910.483871
6104021.1604940.88065838.15967528.958051
7107301.7736630.58710652.7755117.469388
8105021.1824421.0580736.48934732.651333
9108301.7882940.7053851.18663320.19021
10104041.1921961.80358729.83636245.137255

Reproduce the highlighted calculation and evaluate the local predicate. Does the result establish the entire wave count?

52.775510>17.469388. No. It is the result of the stated calculation on invented data, not proof of a wave structure or profit.

ADX: the magnitude of separation, not direction

DX normalizes the absolute DI difference; ADX3 smooths it without retaining direction. Formula and worked calculation: DX=100|+DI−−DI|/(+DI+−DI); ADX3=RMA3(DX). DX7=50.261476; ADX3_7=46.397841.

DX starts at t2 after DI; ADX is seeded with mean DX2–4 at t4. A zero DI sum gives undefined DX, not an artificial strength signal.

Local research predicate: t7: ADX3>25. The teaching threshold ADX>25 holds at t7. Swapping +DI and −DI leaves DX unchanged: a high ADX can also describe a decline. The threshold does not identify a wave number.

ADX: the magnitude of separation, not directionADX: the magnitude of separation, not directionPrice C99.04102.346667105.653333108.96CValue27.56444839.47721251.38997763.302741ADX30246810t
Original calculation on invented completed bars; warm-up gaps are not connected. Price and indicator use separate panels and scales.
tC+DI−DIDXADX3
0100————
1102————
210142.85714314.28571450—
310457.6923087.69230876.470588—
410342.85714318.57142939.53488455.335157
510656.85483910.48387168.86227559.844197
610438.15967528.95805113.70967744.466024
710752.7755117.46938850.26147646.397841
810536.48934732.6513335.5510232.782234
910851.18663320.1902143.42644136.330303
1010429.83636245.13725520.40837131.022992

Reproduce the highlighted calculation and evaluate the local predicate. Does the result establish the entire wave count?

46.397841>25; |a−b|=|b−a|. No. It is the result of the stated calculation on invented data, not proof of a wave structure or profit.

Supertrend: bands and persistent state

The chosen settings are ATR3 and multiplier 1. Final bands retain history; they are not merely the current bar’s HL2±ATR. Formula and worked calculation: bU=HL2+ATR3; bL=HL2−ATR3; a=(bU_t<U_(t−1) ∨ C_(t−1)>U_(t−1)); b=(bL_t>L_(t−1) ∨ C_(t−1)<L_(t−1)); U_t={bU_t:a; U_(t−1):¬a}; L_t={bL_t:b; L_(t−1):¬b}. t7: U=107.041152; L=103.639232; ST=L.

Seed t2 as down (−1), ST=U. From down, C>U flips up (+1); from up, C<L flips down. Equality does not flip. Up selects L and down selects U; state is undefined before ATR.

Local research predicate: t7: s=+1. State +1 at t7 does not mean a fresh flip occurred at t7. It changes to −1 at t10. The declared recursion can whipsaw; line color does not check wave structure.

Supertrend: bands and persistent stateSupertrend: bands and persistent statePrice C99.04102.346667105.653333108.96CValue100.28495103.130615105.976279108.821944ST0246810t
Original calculation on invented completed bars; warm-up gaps are not connected. Price and indicator use separate panels and scales.
tCATR3ULsST
0100—————
1102—————
21012.333333103.33333398.666667-1103.333333
31042.888889103.333333101.1111111101.111111
41032.592593105.592593101.1111111101.111111
51063.061728105.592593102.9382721102.938272
61043.041152107.041152102.9382721102.938272
71073.360768107.041152103.6392321103.639232
81053.240512107.041152103.6392321103.639232
91083.493675107.041152104.5063251104.506325
101043.995783107.995783104.506325-1107.995783

Reproduce the highlighted calculation and evaluate the local predicate. Does the result establish the entire wave count?

ST7=L7=103.639232; s7=+1; s10=−1. No. It is the result of the stated calculation on invented data, not proof of a wave structure or profit.

Parabolic SAR: extreme, acceleration and reversal

EP is the current state’s extreme and AF its acceleration factor; direction and seed are explicit. Formula and worked calculation: q_t=SAR_(t−1)+AF_(t−1)(EP_(t−1)−SAR_(t−1)); AF0=0.02; ΔAF=0.02; AFmax=0.20. t7: SAR=100.939586; EP=108; AF=0.10; s=+1.

Seed t0 up with SAR=L0=99 and EP=H0=101. An up candidate is capped at the prior two lows, a down candidate floored at the prior two highs (only one exists at t1). A strict current-low/down or current-high/up breach reverses: SAR=prior EP, AF=0.02, EP=current opposite extreme. Without reversal a new EP raises AF to its cap; equality does not reverse.

Local research predicate: t7: C>SAR ∧ s=+1. This is a declared teaching seed, not guaranteed parity with every SAR. Reversal at t10 gives SAR=109: a state point is not a promised stop fill or proof that a wave ended.

Parabolic SAR: extreme, acceleration and reversalParabolic SAR: extreme, acceleration and reversalPrice C99.04102.346667105.653333108.96CValue97.8101.933333106.066667110.2SAR0246810t
Original calculation on invented completed bars; warm-up gaps are not connected. Price and indicator use separate panels and scales.
tCSAREPAFs
0100991010.021
1102991030.041
2101991030.041
310499.161050.061
410399.51041050.061
510699.8397761070.081
6104100.4125941070.081
7107100.9395861080.11
8105101.6456281080.11
9108102.2810651090.121
101041091030.02-1

Reproduce the highlighted calculation and evaluate the local predicate. Does the result establish the entire wave count?

107>100.939586; s7=+1; SAR10=109. No. It is the result of the stated calculation on invented data, not proof of a wave structure or profit.

A testable condition and a wave strategy

For a study, freeze the source, timeframe, parameters, formula, availability time and alternative wave count first. Each section gives a local predicate with a threshold chosen for arithmetic practice. Record both positive and negative outcomes at bar close without selecting settings after seeing the result. Check a structural wave-rule violation from price separately.

RSI, averages, MACD and other price transforms share overlapping inputs. Several agreeing lines are not independent votes and do not supply probabilities that can be multiplied. A strategy test needs a separate sample and a predeclared outcome; simulated trades also need execution and cost assumptions. This lab supplies no trading performance, accuracy rate or product features.

ValueLocal research predicate
ATR: range including gapst7: ATR3_t>ATR3_(t−1)
DMI: directional movement and normalizationt7: +DI>−DI
ADX: the magnitude of separation, not directiont7: ADX3>25
Supertrend: bands and persistent statet7: s=+1
Parabolic SAR: extreme, acceleration and reversalt7: C>SAR ∧ s=+1

Three price transforms agree. Does that provide three independent confirmations and establish the count?

No. Shared inputs create dependence; local filters are checked separately from price rules, and usefulness needs another sample.

Sources and limits