OPEN-SOURCE SCRIPT

Matt Market Efficiency

105
This is a custom Pine Script v5 indicator for TradingView that creates a Market Efficiency Heatmap as a background overlay on your chart. It visualizes how "efficient" the market's price movement is over a specified period—essentially measuring how much of the total price volatility (wiggle room) resulted in net directional progress, weighted with volume activity.

High efficiency (stronger, less transparent color) indicates a clean trend with minimal wasted movement (e.g., a strong uptrend or downtrend).
Low efficiency (fainter color) suggests choppy, inefficient price action (e.g., ranging or noisy market).
Color coding: Teal for bullish (net price up), Purple for bearish (net price down).
The heatmap intensity scales from 1% opacity (very low efficiency) to 25% opacity (high efficiency), making it subtle yet informative without overwhelming the chart.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.