Trend strength regime
Sorts ADX trend strength into weak, moderate or strong, and ignores the direction of the trend.
TrendStrengthRegime reads the ADX line and turns each bar into one of three classes: 2 when ADX is above 25, 1 when it is above 15 up to 25, and 0 when it is 15 or below. ADX measures how strong a trend is, not which way it points, so a steep fall and a steep rise both return 2. The cut-offs are fixed in code and the indicator has no settings.
How to read it
- The line steps between 0, 1 and 2 in its own pane below the price, with no values in between.
- 2 means ADX is above 25 (strong trend), 1 means 15 to 25 (moderate), 0 means 15 or below (weak or no trend).
- Read it as a question of how strong the move is, not which way. A 2 during a rally and a 2 during a sell-off look the same.
- The class changes only when ADX crosses 15 or 25, so it confirms a trend after the move has already started.
What it outputs
- Trend strength class
- Trend class from ADX: 0 weak (ADX at or below 15), 1 moderate (ADX 15 to 25), 2 strong (ADX above 25). Blank while ADX warms up.
Pitfalls
- Direction blind: a strong fall and a strong rise both return 2, so it cannot tell a sell-off from a rally.
- No smoothing: when ADX hovers near 15 or 25, the class flickers between two values on noise.
- Blank during warm-up: about 0.1% of bars in the sample had no value, so the line starts later than the price.