OPEN-SOURCE SCRIPT
Atualizado

SMC Structure Engine [EmpArchitect]

2 176
█ OVERVIEW

The SMC Structure Engine automatically maps institutional price structure in real time — no manual drawing needed. It detects Break of Structure (BOS), Change of Character (CHoCH), Order Blocks with full lifecycle tracking, and Liquidity Sweeps. Every element updates live as new bars form.

This is a structure analysis tool. It does not suggest entries, stop losses, or take profits. Both scenarios always exist — the engine highlights the structure, you interpret the context.

█ ZONE LIFECYCLE SYSTEM

Order Blocks transition through three visual states:

Active — Solid border, full color. Price has not yet returned to the zone. These are untested institutional levels.

Tested — Orange outline. Price entered the zone but was rejected — institutions defended the level. Tested zones are stronger than fresh zones because they show confirmed interest.

Mitigated — Gray, dotted border. Price closed through the zone — the institutional order was filled. Zone stops extending and is removed from tracking.

Age-based fading makes newer zones visually prominent while older zones gradually become transparent. The chart stays clean without manual cleanup.

█ EDUCATION MODE

Toggle Education Mode to see detailed tooltips on every label. Hover over any CHoCH, BOS, Order Block, or Sweep marker to read what it means and what to look for next. Toggle off for a clean minimal trading view.

█ FEATURES

— BOS detection with solid lines connecting swing point to break candle
— CHoCH detection with dashed lines signaling potential regime shifts
— Order Block zones with volume-filtered detection and ATR minimum sizing
— Three-state lifecycle: Active → Tested → Mitigated
— Liquidity Sweep markers with volume confirmation and candle coloring
— Regime background shading (ultra-subtle teal or amber tint)
— Dashboard: regime, last structure event, active/tested OB counts, swing levels
— Education Mode with hover tooltips explaining every concept
— Age-based zone fading for automatic clutter management
— Configurable max active zones (default 5)

█ SETTINGS

Detection: Swing Length, Order Block Lookback
Filters: ATR Period, ATR Box Min Multiplier, Volume Spike Multiplier
Display: Education Mode, CHoCH/BOS/OB/Sweep toggles, Dashboard toggle
Zones: Max Active OBs, Max Bars Forward, Age-Based Fading
Colors: Full amber/teal palette — all colors customizable

█ HOW TO USE

Watch the zone lifecycle: an Active order block that transitions to Tested (orange outline) means institutions defended the level. Tested zones carry more weight than untested ones.

Use the regime indicator and background shading to maintain directional awareness. BOS confirms continuation. CHoCH warns of potential reversal.

Enable Education Mode when learning. Disable it for live trading.

█ NOTES

— Works on all instruments and timeframes
— Best on 15M-4H for intraday, Daily-Weekly for swing
— Pine Script v6, open-source
— Built by EmpArchitect
Notas de Lançamento
v1.1 — Structure Quality Update

Break Strength Grading:
- Every BOS and CHoCH graded Strong/Medium/Weak
based on break distance, body efficiency, and
FVG creation. Stronger breaks display thicker
lines and ▲▲▲/▲▲/▲ suffixes. Configurable
minimum strength filter.

Order Block Scoring:
- OBs scored 0-3 by displacement quality, FVG
presence, and freshness. Higher score = more
opaque, thicker border. Minimum score threshold
to hide weak OBs automatically.

Zone Lifecycle:
- Touch counter on all OBs (×0, ×1, ×2, ×3+).
Opacity fades with repeated tests.
- Mitigated zones marked gray with midpoint
strikethrough, retained briefly for context
before removal. Configurable retention period.
- Live score degrades progressively with touches.

Dashboard:
- Now shows break strength summary (Strong/Med/Weak
counts), high score OB count, and v1.1 label.

Alerts:
- 4 new conditions: Strong Bullish/Bearish BOS,
Strong Bullish/Bearish CHoCH.

Credits: Structure detection built on original
pivot-based engine. All v1.1 features by EmpArchitect.

Aviso legal

As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.