ADX Background HighlightADX Background Highlight
This indicator is designed to help traders quickly identify low-trend or ranging market conditions using the Average Directional Index (ADX).
It calculates the ADX based on a user-defined length and compares it to a customizable threshold. When the ADX value falls below the specified threshold, it signals weak trend strength, and the chart background is highlighted in a subtle red color. This visual cue makes it easy to spot consolidation phases where trend-following strategies may be less effective.
Features:
Configurable ADX length
Adjustable trend strength threshold
Automatic background highlighting during low-trend conditions
Optional ADX line plot for additional analysis
How to use:
Red background = weak trend / ranging market (ADX below threshold)
No highlight = stronger trend conditions
This tool is especially useful for filtering trades, avoiding choppy markets, or confirming when to switch between trend-following and range-based strategies.
Pine Script® indicator

















