A trending vs ranging market is a definition to test
TradingView describes ADX as a measure of trend strength. It does not identify direction by itself. ATR% measures the size of recent true ranges relative to price. A strong trend can have either high or low volatility, so combining these into a single bull-or-bear label loses information. The following two-axis definition is an illustrative research specification, not a validated trading system.
- The 20, 25, and 2% thresholds are example choices. Select or estimate them using training data and record all alternatives tried; they are not universal market boundaries.
- Range-proxy means low ADX under this rule. It does not prove a bounded trading range or mean reversion. Record direction separately if your question requires it.
- For a percentile-based volatility cutoff, specify the percentile method and estimate it on training data only. If the cutoff rolls, predeclare the trailing window and use only information available at each close.
| Field | Frozen example specification |
|---|---|
| Chart context | One exchange-qualified symbol, standard daily candles, a fixed session and adjustment setting. Save the timezone and data retrieval date. |
| Trend input | TradingView DMI with DI length 14 and ADX smoothing 14. Use its ADX value at the completed daily close. |
| Trend state | Two consecutive closes with ADX >= 25 confirm Trend. Two consecutive closes with ADX <= 20 confirm Range-proxy. Otherwise retain the previous confirmed state. |
| Initialization | Start Unknown. A value between 20 and 25 cannot initialize a state. A failed threshold condition resets that threshold's consecutive-close count. |
| Volatility input | ATR length 14 with RMA smoothing. ATR% = 100 × ATR / close, using a positive close. |
| Volatility state | High when ATR% >= 2%; Normal when ATR% < 2%. This axis updates at every completed close without the two-close trend confirmation. |
| Unavailable data | Missing inputs or a nonpositive close produce Unknown, reset confirmation counts, and suppress state-change alerts. The first valid state after Unknown is initialization, not a transition. |