OPEN-SOURCE SCRIPT

Support and Resistance Profile with Volatility Clustering

327
The indicator begins by looking at recent volatility behavior in the market: it measures the average true range over your chosen “Length” and compares it to the average true range over ten times that period. When volatility over the short window is high relative to longer-term volatility, we mark that period as a “cluster.” As price moves through these clusters—whether in a quiet period or a sudden burst of activity—the script isolates each cluster and examines the sequence of closing prices within it.

Within every cluster, the algorithm next finds the points along the price path that matter most to a human eye, smoothing out minor wobbles and highlighting the peaks and valleys that define the cluster’s shape. It does this by drawing a straight line between the beginning and end of the cluster, then repeatedly snapping the single point that deviates most from that line back onto it and re-interpolating, until it has identified a fixed number of perceptually important points. Those points capture where price really turned or accelerated, stripping away noise so that you see the genuine memory-markers in each volatility episode.

Each of those important points inherits a “weight” based on the cluster’s normalized volatility—essentially how large the average true range in that cluster was relative to its average close. Over your “Main Length for Profile” window, every time one of these weighted points occurs at a particular price level, it adds to a running total in that level’s bin. At the end of the window you see a silhouette of boxes extending to the right of the chart: where boxes are wide, many important points (with high volatility weight) have happened there in the past; where boxes are thin or absent, price memory is light.

For a trader, the value of this profile lies in spotting zones where the market has repeatedly “remembered” price extremes during volatile episodes—those are areas where support or resistance is likely to be strongest. Conversely, gaps in the profile—price levels with little weighted history—suggest frictionless zones. If price enters such a gap, it may move swiftly until it encounters another region of heavy memory. You can use this in several ways: as a filter on breakouts and breakdowns (only trade through a gap when you see sufficient momentum), as a guide for scaling into positions (add when price enters a low-memory zone and tighten stops where memory boxes thicken), or to anticipate where price might pause or reverse (when it reaches a band of wide boxes). By turning raw volatility clusters into a human-readable map of price memory, this tool helps you see at a glance where the market is likely to push or pause—and plan entries, exits, and risk targets accordingly.

Penafian

Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.