OPEN-SOURCE SCRIPT
Aktualisiert

Support - Resistance & Fibonacci [StrixEDGE]

1 680
StrixZONE automatically detects Support and Resistance zones from price structure and overlays Fibonacci retracement levels — with a deliberate visual separation between the two. S/R zones are drawn historically (left of current price), while Fibonacci levels project into the future (right of current price). This separation ensures zero overlap and a clean, readable chart.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

HOW IT WORKS

The indicator operates on two independent analytical layers:

LAYER 1 — SUPPORT & RESISTANCE (Historical)
Automatically detects swing highs and swing lows using configurable pivot lookback detection. The most recent three resistance levels (R1, R2, R3) and three support levels (S1, S2, S3) are tracked and displayed as colored zones extending across the historical portion of the chart, stopping at the current bar.

Snapshot

R1/S1 is the most recent and visually strongest. R2/S2 and R3/S3 progressively fade, reflecting their age and diminishing relevance. Resistance zones are red, support zones are teal. Each zone has a configurable thickness based on ATR, creating a price band rather than a single line — because in practice, support and resistance are zones, not exact prices.

Snapshot

LAYER 2 — FIBONACCI RETRACEMENT (Forward Projection)
Calculates the highest high and lowest low over a 120-bar lookback and draws seven standard Fibonacci levels between them: 0%, 23.6%, 38.2%, 50%, 61.8%, 78.6%, and 100%. All levels project forward from the current bar by a configurable number of bars (default 20), showing where key retracement levels sit ahead of price.

The 50% and 61.8% levels are drawn with thicker solid lines. All others use thinner dashed lines. The 50%–61.8% region is highlighted as the Golden Zone — the area where retracements most frequently find support or resistance in trending markets. Each level displays its exact price at the right edge.

Snapshot

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

VISUAL SEPARATION — WHY IT MATTERS

Most indicators that combine S/R with Fibonacci draw everything on top of the same price area, creating visual clutter that makes the chart harder to read. StrixZONE deliberately separates the two layers in time:

→ S/R zones occupy the left side of the chart (historical price action where the levels were established)
→ Fibonacci levels occupy the right side (projected forward where price is heading)
→ The current bar is the boundary — S/R stops here, Fibonacci starts here

This means you can see at a glance where historical structure sits versus where retracement math says the next key levels are. When a Fibonacci level aligns with a nearby S/R zone, that confluence is immediately visible without the two drawing systems overlapping.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

SUPPORT & RESISTANCE DETAILS

Detection uses the standard pivot high/low method with a configurable lookback (default 10 bars). A swing high requires the bar's high to be higher than all bars within the lookback window on both sides. The same logic applies in reverse for swing lows.

Levels shift automatically as new pivots are detected. When a new resistance pivot forms, R1 becomes R2, R2 becomes R3, and the new level takes the R1 position. This ensures the most current market structure is always prioritized.

Visual hierarchy:
→ R1 / S1 — most opaque, largest label (most recent, most relevant)
→ R2 / S2 — slightly faded (still relevant but older)
→ R3 / S3 — most faded (historical context, may be invalidated)

Snapshot

Zone width is ATR-based (default 0.2× ATR), so zones automatically adapt to the instrument's volatility. A high-volatility asset gets wider zones; a stable asset gets tighter zones.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

FIBONACCI DETAILS

Levels are calculated from the absolute highest high and lowest low over the lookback period (default 120 bars). This captures the dominant price range for retracement analysis.

All seven levels are drawn as horizontal lines projecting right from the current bar:
→ 0% and 100% — range boundaries (dashed, subtle gray)
→ 23.6% and 78.6% — minor retracement levels (dashed)
→ 38.2% — standard retracement (dashed)
→ 50% — midpoint (solid, thick, yellow)
→ 61.8% — golden ratio (solid, thick, orange)

The Golden Zone (50%–61.8%) is filled with a translucent highlight and labeled. This is the area where price most commonly reverses during healthy retracements in trending markets.

Each level includes a price label at the right edge showing the percentage and exact price value, making it easy to set orders at these levels.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

DASHBOARD

A compact table in the top-right corner displays:
→ R1 — nearest resistance price
→ S1 — nearest support price
→ FIB 50% — the midpoint price for quick reference
→ POSITION — current price as a percentage of the Fibonacci range (e.g., 72% means price is in the upper portion of the range)

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

SETTINGS

Support & Resistance:
• Pivot Lookback (default 10) — bars required on each side to confirm a swing. Higher values detect fewer but more significant levels.
• Zone Width (default 0.2 ATR) — thickness of each S/R zone. Increase for wider zones on volatile instruments.

Fibonacci:
• Fibonacci Bars Right (default 20) — how far the levels project into the future.
• Golden Zone toggle — show or hide the 50–61.8% highlight.

Display:
• Show S/R Zones — toggle the entire S/R layer.
• Show Fibonacci — toggle the entire Fibonacci layer.
• Show Dashboard — toggle the status table.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

WHAT MAKES THIS ORIGINAL

StrixZONE is not simply S/R lines drawn next to Fibonacci lines. Its originality lies in the deliberate temporal separation: S/R zones render historically from where they were established, while Fibonacci levels project exclusively into the future. This design choice eliminates the visual clutter that occurs when both systems draw over the same price bars — a problem common to multi-layer overlay indicators. The ATR-adaptive zone width, the three-tier visual hierarchy for level relevance, and the clean forward projection of Fibonacci create a tool that is structurally distinct from standard S/R or Fibonacci indicators.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

RECOMMENDED USE

Designed for all timeframes and all markets with OHLC data: crypto, forex, stocks, indices, commodities. Particularly effective on 15-minute to 4-hour charts for day and swing trading. Works well as a standalone structural analysis tool or alongside momentum indicators like StrixEDGE or StrixPULSE.

Look for confluence: when a Fibonacci level (especially 50% or 61.8%) sits near an S/R zone, that price area carries double significance as a potential reversal or breakout point.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

ALERTS

Two alert conditions available:
→ Resistance Breakout — price closes above R1
Snapshot
→ Support Breakdown — price closes below S1
Snapshot
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

DISCLAIMER
This indicator is a technical analysis tool, not financial advice. No indicator guarantees profitable outcomes. Past performance does not indicate future results. Always apply proper risk management.
Versionshinweise
v1.1 — Dashboard Customization Update

Added adjustable Dashboard size setting. Users can now scale the on-chart dashboard text between Tiny, Small, Normal, Large, and Huge directly from the indicator settings. This improves readability across different screen sizes, resolutions, and multi-monitor setups.

What's new:
— New "Dashboard Size" dropdown input
— All dashboard cells now respect the selected size uniformly
— Default remains "Tiny" for backward compatibility

No changes to S/R zone logic, Fibonacci calculations, pivot detection, or alert conditions.
Versionshinweise
Update v2.1 — Major Upgrade

🔄 What Changed

Golden Zone — Corrected to 0.618–0.786
- Golden Zone now uses the 0.618–0.786 Fibonacci retracement range (previously 0.500–0.618)
- Both boundary lines (61.8% and 78.6%) are now solid, width 2, with matching color
- Fill and "GOLDEN ZONE" label centered between the corrected levels

S/R — Fully Automatic Pivot Detection
- **Removed manual lookback-based S/R.** Levels are no longer set by a fixed bar count
- Now uses `ta.pivothigh` / `ta.pivotlow` for automatic swing detection
- Detects and displays 3 Resistance levels (R1, R2, R3) and 3 Support levels (S1, S2, S3)
- R1/S1 = most recent pivot, R2/S2 = previous, R3/S3 = oldest
- Each level draws from its origin bar (where the swing occurred) to the current bar

★ STRONG Level Detection
- Each S/R level is scored by touch count — how many times price wicks hit the zone within the last 150 bars
- Levels with touches ≥ threshold (default 3, adjustable) are classified as ★ STRONG
- Strong levels get: thicker lines (width 3), brighter zone bands, gold "★ STRONG" tag label

Break Detection — Lines Close When Broken
- Resistance is broken when price closes above the level
- Support is broken when price closes below the level
- Once broken, the line stops at the break bar — it no longer extends to the right
- Broken levels appear as dotted grey lines with dimmed zone bands and "✗" tag
- New pivots automatically open as fresh ACTIVE levels
- Toggle "Show Broken Levels" to hide broken levels completely from the chart

Dashboard — Full Status Overview
- Added STATUS column showing real-time state of each level:
- `★ STRONG` (gold) — active + heavily tested
- `ACTIVE` (green) — active, not yet strong
- `✗ BROKEN` (grey) — price closed beyond this level
- Broken levels' prices turn grey in the dashboard
- Golden Zone range (0.618 / 0.786) and Fibonacci Position % included

Visual Hierarchy
- R1/S1: solid, width 2, full opacity (most prominent)
- R2/S2: solid, width 1, 25% transparency
- R3/S3: dashed, width 1, 40% transparency (lightest)
- Any level marked STRONG overrides to: solid, width 3, full opacity
- Broken levels: dotted, width 1, grey color, no price label

Alerts
- R1 Breakout / S1 Breakdown — fires when price closes beyond nearest S/R
- R3 Breakout / S3 Breakdown — fires when price closes beyond oldest S/R
- Uses `{{ticker}}` and `{{close}}` placeholders for dynamic alert messages

Haftungsausschluss

Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.