OPEN-SOURCE SCRIPT
Volume-Weighted Support & Resistance

This indicator detects swing highs and swing lows that formed on above-average volume and draws them as support/resistance zones. The idea behind the volume filter is simple: a swing point where many participants transacted is more likely to be defended or revisited than one that formed on thin volume.
How it works
Swing points are found with standard pivot detection (a bar higher/lower than a configurable number of bars on each side).
A pivot is only accepted if the volume on the pivot bar exceeded the volume moving average at that time by a configurable multiplier (default 1.5x the 20-bar average).
Accepted pivots become zones. Zone height is a multiple of ATR(14), so zones scale with the instrument's volatility.
When price closes through a zone, it is treated as broken: it either fades to gray or is removed, depending on your setting. Alert conditions fire on both resistance and support breaks.
Only the most recent N levels per side are kept (configurable), so charts stay readable.
Notes and limitations
Pivot detection needs the configured number of bars to the right before a swing point can be confirmed, so zones always appear with that delay — this is inherent to pivots, not a flaw specific to this script. Break detection uses confirmed closes only. Volume data quality varies by market and data feed (notably in forex, where volume is tick-based). Past reactions at a level do not guarantee future reactions; use this as one input in your own analysis.
How it works
Swing points are found with standard pivot detection (a bar higher/lower than a configurable number of bars on each side).
A pivot is only accepted if the volume on the pivot bar exceeded the volume moving average at that time by a configurable multiplier (default 1.5x the 20-bar average).
Accepted pivots become zones. Zone height is a multiple of ATR(14), so zones scale with the instrument's volatility.
When price closes through a zone, it is treated as broken: it either fades to gray or is removed, depending on your setting. Alert conditions fire on both resistance and support breaks.
Only the most recent N levels per side are kept (configurable), so charts stay readable.
Notes and limitations
Pivot detection needs the configured number of bars to the right before a swing point can be confirmed, so zones always appear with that delay — this is inherent to pivots, not a flaw specific to this script. Break detection uses confirmed closes only. Volume data quality varies by market and data feed (notably in forex, where volume is tick-based). Past reactions at a level do not guarantee future reactions; use this as one input in your own analysis.
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。