OPEN-SOURCE SCRIPT

Support and Resistance with Probability% Volume

780
Release Notes — Support and Resistance with Probability% Volume

What this script does

This indicator automatically plots Support and Resistance zones using confirmed pivot highs/lows from two higher-timeframe “banks”. Each level tracks:
Touch count (how many times price has interacted with the level)
Respect probability % (how often touches resulted in a bounce vs a break)
Volume context for each touch (bucketed into Low → Extra High)

It is designed for both scalping and day trading, with one preset selector.

Key Features

1) Scalp / Day Trade presets (2-bank framework)

A single dropdown sets the two internal timeframes:
Scalp mode: Bank A = 1m, Bank B = 5m
Day Trade mode: Bank A = 15m, Bank B = 1H
This gives you a fast bank (near-term structure) and a slower bank (bigger structure) at the same time.

2) Confirmed Pivot Levels (non-repainting level creation)

Levels are created only from confirmed pivot highs/lows, using:
Left Bars / Right Bars to confirm pivots
Levels are added only when the source timeframe prints a new bar
Because pivots are confirmed and request.security() uses lookahead_off, levels are stable (no future leakage).

3) Level merging (de-clutter / reduce duplicates)

When a new pivot prints, the script checks if it’s close to an existing level.
If within Merge Similar Levels (%), it merges into the existing level (averages the price)
Otherwise it creates a new level
This keeps the chart clean and prevents “stacked” levels at nearly the same price.

4) Level management & pruning (Live vs Historical depth)

The script maintains a rolling “active level set” using a time window:
Include Historical Levels OFF → uses Bars Window For Levels
Include Historical Levels ON → uses Historical Bars
Old levels automatically drop off once they exceed the selected window, and the bank is also capped with:
Max Levels (Bank A / Bank B)
So it stays fast and avoids clutter.

5) Touch detection (wick-based, ATR-scaled tolerance)

Touches are detected using a wick-based method (more realistic than close-only tests), with tolerance based on ATR:
Touch Tolerance (ATR x) defines how close price must get to count as a touch
Cooldown Between Touches prevents counting repeated taps too quickly
This works well for volatile symbols where “near misses” matter.

6) Respect Probability % (bounce vs break outcome)

After a touch, the script opens a “pending outcome” and measures whether price:
Bounces by reaching a bounce threshold, or
Breaks by crossing a break threshold
Both thresholds are ATR-scaled:
Bounce Distance (ATR x)
Break Threshold (ATR x)
The result updates counters:
ok = respected (bounce)
bad = failed (break)
Respect % = ok / (ok + bad) × 100
Lookahead windows control how long the script waits for an outcome:
Lookahead Bars for Respect (Bank A / Bank B)
If neither bounce nor break occurs within the lookahead window, the pending state expires without scoring.

7) Wick Zones (largest excursion visualization)

Each level maintains a “worst case” wick excursion seen so far:
Support tracks the largest wick below the level
Resistance tracks the largest wick above the level
These are drawn as zones (boxes), so you can visually see how “thick” the level behaves in practice.
Controls include:
Show Zones
Min Zone Height (ATR x)
Zone fill / border opacity settings
Optional:
Show Center Line (lvl) to draw a clean line through the zone midpoint.

8) Volume bucket breakdown per touch (HMV-style)

Each touch is classified into a volume “bucket” using Z-score:
Uses Volume MA and Volume StDev
Categorizes touches into: Low / Normal / Medium / High / Extra High
Counts how many touches occurred in each bucket
You can choose what to display with:
Show Low / Normal / Medium / High / Extra High
Show Volume Breakdown in Labels
This lets you quickly spot whether a level is being tested mostly on heavy volume (more meaningful) or low volume (often less meaningful).

9) Clean chart rendering + label controls

The indicator uses object “pools” (lines/labels/boxes) to stay efficient.
You can control appearance with:
Per-bank colors + line widths
Label on/off
Label background opacity + text opacity
Back-extend (how far zones/lines extend left)
Interpreting the labels
Each plotted level label displays:
Sup. / Res.
Bank timeframe (e.g., 1m, 5m, 15m, 1H)
Touch count
Resp % (respect probability)
Optional volume bucket counts for touches
Example:
Sup. (5m) | Touch: 6 | Resp: 83% | Vol M:3 H:2 XH:1

How to Use — Support and Resistance with Probability% Volume

1) Pick your mode first (Scalp vs Day Trade)

Use Preset Mode to set the two timeframe banks:
Scalp = Bank A 1m (micro structure) + Bank B 5m (local structure)
Day Trade = Bank A 15m (intraday structure) + Bank B 1H (session structure)
Rule of thumb:
If you’re trading off a 1m–5m chart → Scalp
If you’re trading 5m–15m entries / session moves → Day Trade

2) Understand what the script plots

Each bank creates levels from confirmed pivot highs/lows and draws them as:
A wick zone (filled box): shows “where price really stabs” around the level
Optional center line: a clean line at the level price
A label: shows Touches, Respect%, and optional Volume bucket counts
Support/Resistance is decided dynamically:
If current price is above the level → it will label it as Support
If current price is below the level → it will label it as Resistance

3) Use Touches + Respect% as the “quality filter”

The two most useful numbers are:
Touch count: how often the level has been interacted with
Respect %: how often touches resulted in a bounce vs a break
(higher usually = more reliable in that market context)

Practical guidance:
Touches 1–2: “new / unproven” levels (use cautiously)
Touches 3–5: good working levels
Touches 6+: strong structure but can become “obvious” (watch for stop runs)

Respect% guidance:
70–100%: level has recently held well
50–70%: mixed, often tradable only with confirmation
<50%: level is getting chewed through (treat as weak / likely to break)
4) Use the Volume breakdown to judge “meaningful” touches
If Show Volume Breakdown in Labels is on, you’ll see counts like:
M:3 H:2 XH:1 (Medium/High/Extra High volume touches)

How to read it:
More H/XH touches → level tests happened when participation was strong
(usually more meaningful than low-volume taps)
Mostly Low/Normal touches → the level may be “technical” but not defended
Tip for scalping:
A level with high Respect% and multiple High/Extra High touches is often a great “reaction zone” to stalk entries around.

5) Tune “how strict” a touch is (Touch Tolerance)

Touch Tolerance (ATR x) controls how close price must get to count as a touch.
Smaller = stricter touches (fewer, cleaner)
Larger = looser touches (more, but noisier)
Common starting points:
XAUUSD 1m scalping: 0.08 – 0.15
15m / 1H day trading: 0.10 – 0.25
If you feel touches are “too easy” → reduce tolerance.
If it misses obvious taps → increase tolerance slightly.

6) Tune Respect% behavior (Bounce / Break thresholds)

These are ATR-based, so they adapt to volatility:
Bounce Distance (ATR x): how far price must move away to count as a bounce
Break Threshold (ATR x): how far through the level counts as a failure/break
Lookahead Bars: how long the script waits for bounce/break confirmation
Practical tuning:
If Respect% feels too optimistic (too many bounces) → increase Bounce Distance
If Respect% feels too harsh (too many breaks) → increase Break Threshold
If outcomes often remain unresolved → increase Lookahead Bars slightly

7) Use Zones (wick thickness) for entries and stops

Zones show the largest wick excursion seen at that level. This helps with:
Entry placement: enter near the “edge” of the zone rather than the center
Stop placement: stops often need to sit outside the wick zone to avoid noise
Avoiding fakeouts: if the zone is thick, expect deeper probes
Controls:
Min Zone Height (ATR x) prevents tiny/meaningless zones
Zone opacity lets you keep the chart readable

8) De-clutter with merging + level limits

If you see too many levels stacked:
Increase Merge Similar Levels (%)
Reduce Max Levels per bank
Reduce the Bars Window (or don’t enable Historical)
If you want broader structure:
Enable Include Historical Levels and increase historical bars (careful—more clutter)

9) A simple workflow for trading with it

For longs
Identify nearest Support zone (from either bank)
Prefer levels with higher touches + higher Respect%
Prefer levels with multiple High/Extra High volume touches
Wait for your entry trigger (your system/confirmation)
Use the zone thickness to judge stop distance

For shorts
Same logic using Resistance zones.

Attribution

This indicator incorporates ideas from several open-source TradingView projects.

Heatmap Volume (xdecow)

The volume classification system used for touch analysis is inspired by the open-source
Heatmap Volume indicator by xdecow.

Specifically, this script adapts the statistical volume classification methodology based on:
  • Moving Average of Volume
  • Standard Deviation of Volume
  • Relative Volume (Z-Score) Buckets


The original Heatmap Volume indicator was designed to visualise abnormal market participation.

In this indicator, that methodology has been substantially extended and integrated into an entirely different Support & Resistance framework where volume buckets are used to:

  • Classify every support/resistance touch.
  • Build historical volume-touch statistics.
  • Measure how often high participation defends or breaks levels.
  • Display volume participation directly within each level label.


All Support & Resistance detection, probability calculations, touch engine, wick zone calculations, buyer/seller control analysis, level management, historical statistics and rendering were independently developed for this project.

Special thanks to xdecow for releasing the original Heatmap Volume indicator as open source.

면책사항

해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.