OPEN-SOURCE SCRIPT
Zone Tap Counter: Support & Resistance Strength

What is this indicator?
This script is designed to help traders objectively monitor the strength and significance of price zones by counting and visualizing how many times price “taps” confirmed support and resistance levels. The indicator leverages swing high/low detection to automatically plot relevant zones and uses price tap frequency as an objective strength metric.
How does it work?
Zone Identification:
Tap Counting Logic:
Visual Feedback:
How to use it:
Originality & Calculation Details:
Disclaimer:
This indicator is for educational and analytical purposes only. It does not predict future price movement, guarantee profits, or recommend specific trades. Always use your own analysis and risk management. See TradingView’s House Rules for more details.
This script is designed to help traders objectively monitor the strength and significance of price zones by counting and visualizing how many times price “taps” confirmed support and resistance levels. The indicator leverages swing high/low detection to automatically plot relevant zones and uses price tap frequency as an objective strength metric.
How does it work?
Zone Identification:
- The script uses the Pine Script functions ta.pivothigh and ta.pivotlow to detect confirmed swing highs and lows on your chart. Each swing high establishes a resistance zone, and each swing low establishes a support zone.
- Only confirmed pivots are used, ensuring all signals are strictly non-repainting.
Tap Counting Logic:
- For every candle, the indicator checks whether price touches (comes within a small, user-set tolerance) of any currently tracked support or resistance zone. To avoid counting repeated taps in the same move, the script ensures only unique bar taps are registered.
- Each time price taps a zone, a counter for that zone is incremented.
- Both the tolerance for taps (percentage-based), and the depth/history of zones tracked are fully adjustable in settings.
Visual Feedback:
- Zones with more taps are drawn darker (lower transparency), making it easy to spot the strongest/hardest-tested levels on the chart.
- A label on each zone displays the current tap count (e.g., "3x"), giving direct feedback about which support/resistance are most significant in the current view.
- Only recent zones (user-configurable) are shown to keep charts clear and useful.
How to use it:
- Add the indicator to your TradingView chart.
- Set the swing length and tap tolerance in settings to match your market or timeframe (short swing length for scalping, longer swings for bigger structure).
- Watch for zones with high tap counts and darker lines: These zones represent areas where price has repeatedly reacted, suggesting they may be important for your trading decisions.
- You can adjust the minimum number of taps needed for a zone to be highlighted and the number of zones to display for your preferred visual clarity.
- Combine this tool with other analysis for confirmation—tap counts should not be seen as trading signals, but as supporting information.
Originality & Calculation Details:
- This script does NOT simply merge or overlay existing indicators. The calculation method is original: it uses swing-based support/resistance and applies unique tap-count logic, designed for objective zone strength visualization.
- No repainting logic is present.
- All code and visualization methods are documented and transparent.
Disclaimer:
This indicator is for educational and analytical purposes only. It does not predict future price movement, guarantee profits, or recommend specific trades. Always use your own analysis and risk management. See TradingView’s House Rules for more details.
开源脚本
本着TradingView的真正精神,此脚本的创建者将其开源,以便交易者可以查看和验证其功能。向作者致敬!虽然您可以免费使用它,但请记住,重新发布代码必须遵守我们的网站规则。
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。
开源脚本
本着TradingView的真正精神,此脚本的创建者将其开源,以便交易者可以查看和验证其功能。向作者致敬!虽然您可以免费使用它,但请记住,重新发布代码必须遵守我们的网站规则。
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。