OPEN-SOURCE SCRIPT
Actualizado Breakout

Breakout is an overlay indicator for identifying pre-breakout trade context using supply/demand zones, higher-timeframe alignment, moving-average structure, and confluence scoring.
This script is for analysis and planning only. It does not place orders or guarantee results.
What it does
Breakout helps visualize potential long and short setups before price breaks out of a key zone. It combines:
- Key magnet supply/demand zones (strongest reaction levels only)
- HTF trade zones auto-anchored by chart timeframe
- Pre-trade setup boxes with entry, stop, and target
- Diamond markers for high-confluence turning points
- Liquidity levels for potential sweep/SFP context
- Optional info panel with bias, levels, and active setup details
How it works
Magnet zones: pivot highs/lows cluster into levels. Levels price revisits gain strength. Only the strongest are drawn.
HTF trade regime: each chart timeframe uses two higher anchor timeframes. Long ideas can be filtered to HTF demand zones; shorts to HTF supply zones. Zones use confirmed HTF swing highs/lows with ATR-based width and reach.
Setup engine: setups form when zone context, trend/MA structure, confidence score, and cooldown align. Stops use risk percent, MA support/resistance, swing levels, and a max distance cap. Targets use a configurable minimum risk/reward.
Diamond signals: require structure (SFP, reversal, or MA setup), zone context, and supporting momentum/trend. Optional volume spike and RSI divergence add confluence. Not every pivot prints a diamond.
Volume and divergence: abnormal volume spikes (relative volume and z-score) can combine with RSI divergence in diamonds and setup scoring.
MTF data uses request.security() with barmerge.lookahead_off to avoid lookahead on higher-timeframe context.
How to use
1. Add Breakout to your chart.
2. Choose your execution timeframe.
3. Keep HTF zone filter on for higher-timeframe alignment.
4. Wait for price at HTF zone plus key magnet zone, then diamond or setup box with confidence at or above Min Confidence.
5. Use entry, stop, and target from the active setup box for planning.
6. Manage risk with your own rules.
Main settings
- Risk: risk per trade, min R/R, max hold bars
- Filters: min confidence, approach distance, cooldown, volume, vol spike and divergence
- HTF zones: trade inside HTF S/D only, auto anchors, zone width and reach
- Display: zones, setups, liquidity, labels, info panel, EMAs, diamond spacing
Alerts
- Breakout Long Setup
- Breakout Short Setup
- Breakout Approaching Demand
- Breakout Approaching Supply
Alerts reflect script conditions at alert time. They are not trade recommendations.
Disclaimer
Educational and informational use only. Not financial advice. Trading involves risk, including loss of capital. Past results do not guarantee future performance. Use at your own discretion.
This script is for analysis and planning only. It does not place orders or guarantee results.
What it does
Breakout helps visualize potential long and short setups before price breaks out of a key zone. It combines:
- Key magnet supply/demand zones (strongest reaction levels only)
- HTF trade zones auto-anchored by chart timeframe
- Pre-trade setup boxes with entry, stop, and target
- Diamond markers for high-confluence turning points
- Liquidity levels for potential sweep/SFP context
- Optional info panel with bias, levels, and active setup details
How it works
Magnet zones: pivot highs/lows cluster into levels. Levels price revisits gain strength. Only the strongest are drawn.
HTF trade regime: each chart timeframe uses two higher anchor timeframes. Long ideas can be filtered to HTF demand zones; shorts to HTF supply zones. Zones use confirmed HTF swing highs/lows with ATR-based width and reach.
Setup engine: setups form when zone context, trend/MA structure, confidence score, and cooldown align. Stops use risk percent, MA support/resistance, swing levels, and a max distance cap. Targets use a configurable minimum risk/reward.
Diamond signals: require structure (SFP, reversal, or MA setup), zone context, and supporting momentum/trend. Optional volume spike and RSI divergence add confluence. Not every pivot prints a diamond.
Volume and divergence: abnormal volume spikes (relative volume and z-score) can combine with RSI divergence in diamonds and setup scoring.
MTF data uses request.security() with barmerge.lookahead_off to avoid lookahead on higher-timeframe context.
How to use
1. Add Breakout to your chart.
2. Choose your execution timeframe.
3. Keep HTF zone filter on for higher-timeframe alignment.
4. Wait for price at HTF zone plus key magnet zone, then diamond or setup box with confidence at or above Min Confidence.
5. Use entry, stop, and target from the active setup box for planning.
6. Manage risk with your own rules.
Main settings
- Risk: risk per trade, min R/R, max hold bars
- Filters: min confidence, approach distance, cooldown, volume, vol spike and divergence
- HTF zones: trade inside HTF S/D only, auto anchors, zone width and reach
- Display: zones, setups, liquidity, labels, info panel, EMAs, diamond spacing
Alerts
- Breakout Long Setup
- Breakout Short Setup
- Breakout Approaching Demand
- Breakout Approaching Supply
Alerts reflect script conditions at alert time. They are not trade recommendations.
Disclaimer
Educational and informational use only. Not financial advice. Trading involves risk, including loss of capital. Past results do not guarantee future performance. Use at your own discretion.
Notas de prensa
Breakout is a pre-breakout overlay indicator for supply/demand trading. It highlights where price is most likely to react before a move — not after it.WHAT IT DOES
• Key magnet zones — clusters pivot reactions into the strongest S/D levels only (not every pivot). Brighter zones = more reactions = higher reversal probability.
• Zone flip tracking — when price closes through a zone, its role flips (demand → supply or vice versa). Flipped zones use distinct muted colors; retest-confirmed flips read stronger (solid border vs dashed).
• Full zone color control — SRUS defaults: green demand, purple supply. Custom palette toggle for demand, supply, flipped, and HTF zone colors.
• HTF trade zones — auto-anchors signals to higher-timeframe S/D bands (e.g. 5m trades only inside 1H/4H zones). Stacked HTF confluence boosts setup score.
• Liquidity / future SFP — yellow dotted BSL (buy-side) and SSL (sell-side) levels where equal highs/lows suggest pending sweeps.
• Pre-trade setups — entry, stop, and target boxes with live SL/TP distance % on the active trade only. Past trades stay off the chart by default.
• Diamond signals — confluence model for potential tops/bottoms at zones, MAs, SFP, volume spikes, and RSI divergence.
• Confidence scoring (0–100) — ranks each setup on trend, RSI, MACD, volume, session, zone strength, R/R, magnet/liquidity confluence, HTF alignment, and vol/divergence cross-ref.
• MA regime — 20/50/200 EMA trend context (off by default for a clean chart).
• Multi-timeframe bias — non-repainting higher-TF trend filter.
DEFAULTS
Labels, info panel, and EMAs are off by default. Only the strongest key zones and the current active setup are drawn to keep the chart readable.
ALERTS
• Long Setup Ready
• Short Setup Ready
• Approaching Demand
• Approaching Supply
• Zone Flipped (opt-in toggle)
SETTINGS GROUPS
Account · Risk Management · Setup Filters · Session Times · Multi-Timeframe · HTF Trade Zones · Display · Zone Colors
DISCLAIMER
This is an analytical/educational tool only. It is not financial advice and does not execute trades. Signals are probabilistic, not guaranteed. Always manage your own risk. Past behavior of price levels does not predict future results.
Notas de prensa
Breakout is a pre-breakout overlay for supply/demand trading. It maps where price is most likely to react before a move — not after it.KEY FEATURES
Magnet S/D Zones
Clusters pivot reactions into the strongest levels only (not every pivot). Nearby pivots merge aggressively so the chart stays clean. Only the top 4 key zones draw by default.
Visual Strength Hierarchy
• Brighter neon border = more reactions = higher reversal probability
• x5 elite: vivid neon border, see-through fill
• x4 strong: medium neon box
• x2–x3 weak: small neon cross markers (no heavy boxes)
• ★ LEAD badge marks the #1 priority magnet; lower-ranked zones fade progressively so you always know which level is leading
Zone Flip Tracking
When price closes through a zone, its role flips (demand ↔ supply). Flipped zones use a distinct muted palette. Retest-confirmed flips show stronger borders. Optional Zone Flipped alert.
Full Color Control
SRUS defaults: green demand (#16C784), purple supply (#9C27B0). Custom toggles for demand, supply, flipped, and HTF zone colors.
HTF Trade Zones
Auto-anchors signals to higher-timeframe S/D bands (e.g. 5m trades inside 1H/4H zones). Stacked HTF confluence boosts setup score. Thin neon borders, see-through fills.
Liquidity / Future SFP
Yellow dotted BSL (buy-side) and SSL (sell-side) levels at equal highs/lows — likely sweep targets.
Pre-Trade Setups
Entry, stop, and target with thin lines and see-through boxes. Live SL/TP distance % on the active trade only. Past trades off by default.
Diamond Signals
Confluence model for potential tops/bottoms at zones, MAs, SFP, volume spikes, and RSI divergence. Stronger magnet zones add to diamond score.
Confidence Scoring (0–100)
Ranks setups on trend, RSI, MACD, volume, session, zone strength tier, R/R, magnet/liquidity confluence, HTF alignment, and vol/divergence cross-ref.
Clean Defaults
Labels, info panel, and EMAs off by default. Candles stay readable through transparent zone fills.
ALERTS
• Long Setup Ready
• Short Setup Ready
• Approaching Demand
• Approaching Supply
• Zone Flipped (opt-in)
SETTINGS
Account · Risk Management · Setup Filters · Session Times · Multi-Timeframe · HTF Trade Zones · Display · Zone Colors
DISCLAIMER
Educational/analytical tool only. Not financial advice. Does not execute trades. Signals are probabilistic. Manage your own risk. Past price behavior does not guarantee future results.
Notas de prensa
v6.1 — What's NewCALENDAR S/D ZONES (NEW)
• Optional Daily, Weekly, MTD, and YTD supply/demand bands — all OFF by default
• Daily/Weekly anchor to previous session/week high (supply) and low (demand)
• MTD/YTD use running month/year high/low on daily anchor
• GPS-style period colors (green/orange/purple/white) with thin neon borders
• Toggle each period independently under "Calendar S/D Zones"
ZONE VISUAL OVERHAUL
• See-through fills so candles stay readable
• Neon borders on all zone types (thin, width 1)
• Strength-based hierarchy: x5 elite brightest → x4 box → x2–x3 small cross markers
• ★ LEAD badge on the #1 priority magnet; lower-ranked zones fade progressively
• Weak magnets use cross markers instead of heavy boxes
ZONE FLIP & COLORS
• Zones flip role on close-through (demand ↔ supply) with distinct flipped palette
• Retest-confirmed flips get stronger neon border glow
• Full color customization: demand, supply, flipped, and HTF zone colors
• Optional Zone Flipped alert (off by default)
NOISE REDUCTION
• Aggressive pivot clustering (1.0× ATR default) — fewer, stronger levels
• Max key zones reduced to 4 by default
• Improved draw-priority scoring (strength², proximity, HTF confluence, staleness fade)
SETUP DISPLAY
• Thin entry/stop/target lines (width 1)
• More transparent setup boxes
• Active trade SL/TP distance % only — past trades stay off chart
STRENGTH → REVERSAL LOGIC
• Brighter zones score higher in confidence engine and diamond confluence
• Elite (x5) and strong (x4) magnets get tiered scoring bonuses
Notas de prensa
NewCalendar S/D Zones — Daily, Weekly, MTD, YTD supplyHigh / demandlow bands (all off by default)
Regime Coloring — zone-aware bull/bear/neutral candle tint with white reversal candles at S/D zone character changes
Regime flip marks — small × instead of BOS/CHoCH text labels
Zone Upgrades — ★ LEAD priority tag, MAJOR gold glow (x5 + HTF stacked), 🎯 TARGET label, % distance on zones
Custom zone colors — demand, supply, flipped, and HTF palettes (SRUS defaults when off)
Zone flip tracking — role change on close-through with muted flipped styling and optional alert
Visual overhaul — neon borders, see-through fills, weak zones as crosses, rank-based fade, strength² priority scoring
Improved
LEAD zone label consolidated into one line (no more overlapping % / LEAD / strength text)
Zone distance shows 1.2% instead of 1.2% away
HTF zones use separate cyan/orange defaults
White reversal logic tightened — only structural reversals and regime flips inside zones, not every bar
Removed (chart cleanup)
Pre-trade setup boxes, entry/stop/target lines
Diamond entry markers and guide lines
Confidence scoring engine and setup alerts
Risk Management and Account settings (risk %, R/R, leverage, etc.)
Approaching zone / long / short setup alerts
Fix
max_labels_count capped at 500 (TradingView limit)
Notas de prensa
Changelog — Zones & layout
Single LEAD magnet — only one zone gets the LEAD label (highest return-probability score); removed competing above/below LEAD labels
Max zones per side (default 2 above + 2 below) replaces flat zone cap
Anti-stack spacing — new Min Zone Spacing (xATR) prevents magnets stacking on the same price
Stronger defaults — min zone strength 3, wider cluster merge (1.25× ATR), strength capped at x6 for display
HTF dedupe — hides HTF zone when a key magnet overlaps the same level
Removed triple-box “major glow” stacking; major zones use gold border + subtle fill emphasis only
Liquidity levels off by default (max 6 when enabled)
Regime & candles
Chop markets no longer go all-grey — faint bull/bear tint even without strong conviction score
Noise candles lightened to #4A4A4A (visible but not dominant)
Removed wick linebr overlays that fought chart candle styling
Vivid reversal zone fill toggle — green demand / purple supply on major reversal bars
Reversals & diamonds
Diamonds off by default (master toggle + bull/bear sub-toggles)
Diamonds require hard structural signals at proven key magnets (strength ≥ 4, wick at zone)
Removed soft/grey reversal spam and generic candle-pattern scoring from diamond logic
Major reversal threshold raised to 5 by default
White reversal candles tied to same structural gate as diamonds
Calendar zones
New style options: Outline Only, Faint Boxes, Dotted Line
Smart fade dims calendar zones far from current price
Configurable border style, fill transparency, lookback, and near-price %
Trade visualizer (new, optional)
Simulated one-active-trade overlay with entry / SL / TP lines and risk box
Active trade info panel (middle-right table)
Completed trade history toggle
All trade features off by default — enable under Trade Visualizer
Trend extras (optional, off by default)
Trend banner, trend background tint, trend-colored price line
Fixes
Fixed tradePanel scope compile error (CE10272)
Fixed revScore reassignment (:=)
Fixed lScore float type in LEAD scoring
Restored showRegimeVolume toggle
Alert conditions preserved: zone flip, major reversal, liq sweep proxy
Notas de prensa
What’s new in v6.3- Previous Calendar Zones — new muted, dashed historical reference zones for the previous completed Daily, Weekly, Monthly, and Quarterly periods. Each period has its own toggle.
- Quarterly zones now red by default for stronger visual separation.
- Calendar zones stay fixed — MTD, QTD, and YTD zones now use the prior completed period range instead of updating daily.
- Brighter calendar zones — improved visibility with lighter fill and wider borders.
- Regime candle overlay off by default — price candles are no longer recolored unless you explicitly enable “Color Candles by Regime.”
- General stability and cleanup fixes.
Key features
- Dynamic key magnet zones ranked by strength, recency, and HTF confluence.
- Lead-zone label highlighting the most likely near-term magnet.
- Major-zone gold border highlighting when HTF S/D stacks align.
- Calendar S/D zones: Daily, Weekly, Monthly, Quarterly, Yearly.
- Previous calendar-period reference zones.
- Regime coloring, conviction tiers, session shading, and reversal diamonds.
- Volume spike and liquidity sweep detection.
Changelog
v6.3
- Added Previous Calendar Zones (D/W/M/Q) with independent toggles.
- Quarterly calendar zone color changed to red.
- MTD/QTD/YTD zones now use previous completed-period range for stability.
- Increased calendar zone brightness and border width.
- “Color Candles by Regime” default changed to off.
- Removed redundant pivot-based previous-zone logic.
- Various compiler/performance cleanups.
Notas de prensa
Breakout v6.4 — ChangelogZones
Order-block confluence now boosts existing S/D magnets (no separate OB boxes)
Sticky zones: levels lock and hold until price closes through them — no more 1m flicker
Zones price is inside stay visible for bounce/reversal reads (· IN)
LEAD magnets refined for the next level price is most likely to trade into
HTF boxes get LEAD glow on the magnet you’re most likely to trade back into
Major zones shade by reversal bias: demand = bullish, supply = bearish
Thinner borders/fills so candles stay readable
Chart labels cleaned up (no version tags); original demand/supply colors restored
Signals & Regime
Regime flips require confluence scoring (less noise)
Major reversals factor in OB boost + ultimate top/bottom
Candles stay full trend color until regime flips
Ultimate Top / Bottom
Climax rejection markers built into the candle overlay (× marks, no labels)
Bottom = white (bullish), Top = red (bearish)
Top detection improved for buying-climax / distribution at supply (bottoms unchanged)
Fixes
Sticky-zone array crash on takeout resolved
plotshape size compile error fixed
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que cualquier republicación del código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que cualquier republicación del código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.