OPEN-SOURCE SCRIPT

Support & Resistance Threesome [Zofesu]

4 632
Support & Resistance Threesome [Zofesu] is an overlay indicator that tracks up to twelve simultaneous liquidity zones across two structural levels — major and minor — and combines zone interaction data with an RSI-based smart entry filter to produce high-probability reversal signals directly at institutional price levels.

The three components work as a system: zones define where price is expected to react, touch counting measures how many times the level has been tested and held, and the entry filter ensures signals fire only when momentum conditions align with the zone interaction.

─────────────────────────────────────
01 — What is S/R Threesome?
─────────────────────────────────────
S/R Threesome detects pivot-based support and resistance zones and tracks them dynamically across the chart. Each zone is built around a confirmed swing high or low, padded by a configurable buffer, and updated in real time as price interacts with it.

The indicator tracks two structural levels simultaneously:

Major zones — built from wider swing lookback (default 20 bars). These represent significant structural levels where institutional activity is more likely.

Minor zones — built from shorter swing lookback (default 8 bars). These represent recent, lower-timeframe levels within the larger structure.

Up to three zones per type are tracked simultaneously — three major resistance, three major support, three minor resistance, three minor support — twelve zones total.

─────────────────────────────────────
02 — Zone Lifecycle
─────────────────────────────────────
Each zone passes through three states:

Active — zone is intact, price has not closed beyond it. The zone extends forward in real time and darkens with each confirmed touch.

Confirmed — zone has been tested at least twice (touch count ≥ 2). Border changes to yellow. A confirmed zone is a higher-probability level — it has held under pressure more than once.

Filled — price closed beyond the zone boundary. The box turns gray with a dashed border, marking the zone as invalidated. A filled resistance that price returns to often acts as new support, and vice versa.

─────────────────────────────────────
03 — Touch Count and Visual Intensity
─────────────────────────────────────
Every time a confirmed bar closes with price interacting with a zone boundary, the touch counter increments (maximum 5). The zone responds visually:

Touch 1 — lightest fill, thinnest border
Touch 2 — zone confirmed, yellow border
Touch 3 — medium fill intensity
Touch 4+ — darkest fill, thickest border

This system makes the most tested zones immediately visible — heavier zones have held under more pressure and carry more institutional weight.

─────────────────────────────────────
04 — Buffer System
─────────────────────────────────────
Zones are not single price lines — they are areas with a configurable half-width on both sides of the pivot price. Three buffer modes are available:

ATR — zone width adapts to current volatility. Default multiplier: 0.5. Recommended for most markets.
Percent — fixed percentage of current price. Default: 0.15%.
Fixed — absolute tick-based value. Default: 500 ticks. Use for specific instruments with known pip structures.

Duplicate filter: zones that form within 3× buffer distance of an existing major zone, or 2× for minor zones, are suppressed to prevent visual clutter from overlapping levels.

─────────────────────────────────────
05 — Smart Entry System
─────────────────────────────────────
Entry signals fire when two conditions align simultaneously:

1. Price interacted with a major support or resistance zone on the previous bar (low touched support zone / high touched resistance zone)
2. RSI confirms momentum exhaustion — oversold for long entries (default below 35), overbought for short entries (default above 65)

A stop loss line is drawn automatically at the time of entry — positioned below the support zone bottom for longs, above the resistance zone top for shorts, with an additional SL buffer applied.

The zone must also be older than the maximum of both swing lookback periods — this prevents entries on zones that were just created and not yet validated by subsequent price action.

─────────────────────────────────────
06 — Settings
─────────────────────────────────────
Liquidity Zones
Major Swing Lookback — pivot detection window for major zones. Default: 20.
Minor Swing Lookback — pivot detection window for minor zones. Default: 8.
ATR Length — ATR lookback for buffer calculation. Default: 14.
Max Zone Age (bars) — zones older than this are replaced. Default: 300.

Buffer
Buffer Mode — ATR / Percent / Fixed. Default: ATR.
ATR Multiplier — zone half-width as ATR multiple. Default: 0.5.
Percent Buffer % — zone half-width as % of price. Default: 0.15%.
Fixed Buffer — zone half-width in ticks. Default: 500.

Entry — RSI
RSI Length — default: 14.
RSI Overbought — short entry filter threshold. Default: 65.
RSI Oversold — long entry filter threshold. Default: 35.

Entry — SL
SL Mode — ATR / Percent / Fixed. Default: ATR.
SL ATR Multiplier — SL distance as ATR multiple. Default: 1.5.
SL Percent % — SL as % of price. Default: 0.5%.
SL Fixed (pips) — SL in ticks. Default: 800.

Entry — Visual
Show Entry Signals — enable/disable arrows and SL lines.
SL Line / Long Arrow / Short Arrow — color settings.

Colors
Major Resistance / Support — zone fill color for major levels.
Minor Resistance / Support — zone fill color for minor levels.
Filled Zone — border color for invalidated zones.
Resistance / Support Border — active zone border color.
Confirmed Border — border color when touch count ≥ 2. Default: yellow.

─────────────────────────────────────
07 — How To Use
─────────────────────────────────────
Step 1 — Identify the active zones
Major zones (darker, thicker border) are the primary levels. Minor zones provide secondary context within the structure.

Step 2 — Watch for confirmed zones
Yellow border = zone has been tested and held at least twice. These are the highest-priority levels to trade from.

Step 3 — Wait for the entry signal
A triangle arrow appears when price touches a major zone with RSI confirming exhaustion. The SL line shows the invalidation level automatically.

Step 4 — Read zone fill intensity
Darker fill = more touches = stronger institutional interest at that level. Lighter fill = fresh zone, treat with less conviction.

Step 5 — Monitor filled zones
Gray dashed zones that price returns to after being filled often flip polarity — former resistance becomes support and vice versa. Watch for interaction at these levels even after they are invalidated.

Step 6 — Alerts
Two alert conditions are pre-configured:
S/R-3: LONG — long entry at support zone with RSI oversold
S/R-3: SHORT — short entry at resistance zone with RSI overbought

Works on all asset classes: Indices, Forex, Gold, Oil, Crypto.
Best timeframes: H1, H4, D1.

免責事項

これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。