OPEN-SOURCE SCRIPT

Square-root Decay Volume Profile

224
This indicator displays a custom price profile that mimics a volume profile using occurrence-based weighting rather than actual volume. It counts how often the selected price source (e.g., close) falls within each price bin over a lookback period. What makes it unique is the use of square-root time decay: more recent price occurrences are given greater importance, while older data is discounted proportionally to the inverse square root of its age.

Each bin's relative weight is visualized as a horizontal bar aligned to the right edge of the chart, showing where price has "spent time" more recently. This allows traders to identify areas of interest, balance zones, and potential support/resistance levels based on decayed price density.

Key Features:
Square-root decay weighting favors recent price action

Adjustable lookback period, bin count, and histogram width

Works with any price source (close, hl2, etc.)

Plots boxes directly on the chart for clear visualization

This tool is especially useful for discretionary traders seeking a price-centric alternative to traditional volume profiles, with an added emphasis on recency.

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.