Close vs SuperTrend % Diff

On Visible Bars Only: High/low extremes and sums/counts accumulate via VC checks.
On Last Bar: Table refreshes with current stats, reflecting the visible view.
User Interaction: Zooming/panning triggers VC.barIsVisible() to recompute aggregates dynamically—no full history scan needed.
Edge Cases:
Empty visible range: High/low default to na; averages guarded against zero counts.
Division by zero in percent_diff: Unlikely, as st is ATR-based and rarely zero, but Pine handles na gracefully.
Performance: Efficient for long histories (e.g., daily charts over years) since stats are view-localized.
This indicator is useful for trend traders: Watch for percent_diff crossing zero for signals, and use the table to gauge visible volatility (e.g., if avg high > avg low in magnitude, bullish bias). Customize SuperTrend params (3,10) for different assets/timeframes. To extend, you could add alerts on threshold crosses or integrate dir for trend filters.
Invite-only script
Only users approved by the author can access this script. You'll need to request and get permission to use it. This is typically granted after payment. For more details, follow the author's instructions below or contact jitu350 directly.
TradingView does NOT recommend paying for or using a script unless you fully trust its author and understand how it works. You may also find free, open-source alternatives in our community scripts.
Author's instructions
Disclaimer
Invite-only script
Only users approved by the author can access this script. You'll need to request and get permission to use it. This is typically granted after payment. For more details, follow the author's instructions below or contact jitu350 directly.
TradingView does NOT recommend paying for or using a script unless you fully trust its author and understand how it works. You may also find free, open-source alternatives in our community scripts.