ZigZag Maturity Optimized
- Indicatori
-
Marian Beceanu
My Atlas Enterprise Matrix:
https://www.mql5.com/en/market/product/183575?source=Site+Profile+Seller - Versione: 1.11
- Attivazioni: 10
Overview
ZigZag Maturity is a multi-timeframe indicator for MetaTrader 5 that answers a single question, one that matters for any technical trader: “How ‘mature’ (close to exhaustion) is the current swing, on every timeframe I follow?”
Instead of a classic ZigZag that just draws lines on the chart, this indicator builds its own ZigZag on every activated timeframe, compares it statistically against its own history of swings, and turns everything into a 0–100% maturity score — displayed visually through a “barometer”-style dashboard right on the chart, with automatic alerts when price enters risk zones.
It’s built for traders who work with multi-timeframe confluence and want to avoid entering on a signal that, statistically, has already “run out of steam.”
What problem it solves
A swing (a price impulse between two ZigZag pivots) doesn’t move indefinitely in the same direction. Every instrument and every timeframe has its own historical pattern: an average price length, an average duration in bars, an average ATR multiple covered. When the current swing significantly exceeds these historical averages, the statistical probability of a reversal or a pause increases.
ZigZag Maturity automates exactly this type of analysis — across any number of timeframes at once — and centralizes the result into a single visual panel, so you no longer need to manually switch between charts to “feel” whether a move is still early or already stretched.
Key Features
1. Proprietary ZigZag, fully configurable
-
Does not use the standard MetaQuotes ZigZag; it has its own pivot-detection engine, with the classic Depth / Deviation / Backstep parameters, calculated independently on each timeframe.
-
Optimized recalculation: the full bar rescan only happens when a new bar closes on that timeframe (per-TF caching), not on every tick — a smooth indicator even with many timeframes active at once.
-
Configurable cap on scanned bars (CPU/memory protection for aggressive parameter sets).
2. Full multi-timeframe support (21 timeframes)
-
From M1 all the way to MN1 — each timeframe is activated individually via a simple checkbox in the inputs.
-
Run the indicator on a single TF or on all 21 at once, for the most robust possible “consensus.”
-
More TFs checked = more possible confirmations, but also slightly longer recalculation time (adjustable via performance settings).
3. Maturity Score — the indicator’s central score
A combined 0–100% score, calculated from four weighted components (weights are adjustable via inputs and are automatically renormalized to sum to 1.0):
| Component | What it measures |
|---|---|
| Price Score | How much the current swing has traveled in price, relative to the EMA of the last N historical swings on the same TF |
| Time Score | How many bars the current swing has already lasted, relative to the historical average duration |
| ATR Score | How many ATR multiples the current swing has covered, relative to the historical average ATR multiple per swing |
| Sync Score | The degree of agreement (direction + maturity level) between this timeframe and the other active timeframes |
The result: a single percentage per timeframe, along with the current direction (BUY/SELL), easy to read at a glance.
4. Sync Score & Sync Groups (Scalping / Intraday / Swing / Global)
-
Sync Score quantifies the agreement between timeframes, both in direction (all BUY or all SELL) and in closeness of maturity level.
-
Active timeframes are automatically organized into predefined groups:
-
Scalping → M5 + M15 + H1
-
Intraday → M15 + H1 + H4
-
Swing → H1 + H4 + D1
-
Global → all checked timeframes
-
Each group produces a status (e.g., STRONG BUY / STRONG SELL / MIXED / N/A) based on configurable thresholds.
-
ENTRY SCORE: a dedicated score for scalping entries, calculated from the Scalping group.
-
Built-in philosophy: disagreement between large timeframes (D1/W1/MN1) and small ones (M5/M15) does not block scalping signals — the Global group is treated as an informational filter, not a “NO TRADE” signal.
-
Dedicated alert on group signal change.
5. On-chart visual dashboard
-
A “barometer” panel with color-coded bars for risk zones, displayed directly on the chart, fully configurable: anchor corner, X/Y offset, spacing, bar dimensions, font, font size.
-
Separate configurable colors for BUY and SELL signals.
-
Optional yellow warning dot (“possible reversal”) next to each timeframe’s bar.
-
Separate debug/status text panel with all detailed scores (Price/Time/ATR/Sync) per timeframe.
6. Complete alert system
-
Alert on entering the WARNING zone (default ≥85% maturity).
-
Alert on entering the HIGH RISK zone (default ≥95% maturity).
-
Alert on confirmed swing (100%).
-
Alert on multi-timeframe status change (e.g., all TFs mature at once, or all fresh).
-
Alert on group signal change (Scalping/Intraday/Swing/Global).
-
Three independently toggleable delivery channels: popup ( Alert() ), mobile push ( SendNotification() ), sound (configurable file).
-
Configurable cooldown (seconds) per timeframe, to prevent alert spam on the same zone.
7. Optimized for performance and stability
-
The proprietary ZigZag is cached per timeframe and recalculated only on a new bar — not on every tick.
-
A single ChartRedraw() per full recalculation cycle (not 3-4 redundant calls).
-
Instant reaction to price: live scores (Price/Time/ATR) are recalculated on every tick, with no artificial lag, while the expensive part (ZigZag scanning) stays protected by caching.
-
Hard cap on scanned bars per timeframe, as extra protection for CPU/memory.
-
Internal guards for error conditions (invalid ATR handle, insufficient data, point=0, etc.), so the indicator doesn’t hang the terminal even under unusual symbol/broker conditions.
Who this indicator is for
-
Multi-timeframe traders who want confluence confirmation before entry/exit.
-
Swing/position traders who want to avoid entering “late,” on a swing that is already statistically exhausted.
-
Scalpers who need a fast ENTRY SCORE, calculated from the short-timeframe group, without being blocked by disagreement with the larger TFs.
-
Anyone who uses ZigZag as a technical analysis tool and wants a quantified, objective layer on top of classic visual interpretation.
Compatibility
-
Platform: MetaTrader 5
-
Type: custom indicator, drawn on the main price window ( indicator_chart_window )
-
Instruments: any tradable symbol (Forex, indices, metals, crypto CFDs, stocks, etc.)
-
Timeframes: independent of the chart’s own timeframe — the indicator manages its own internal timeframes, configured via inputs
-
Requires no external indicators or additional files (uses only native ATR handles, managed internally)
Available input groups
-
Active timeframes — 21 individual checkboxes (M1 → MN1)
-
Proprietary ZigZag — Depth, Deviation, Backstep
-
Maturity Score — number of historical swings for the base, ATR period, Price/Time/ATR/Sync weights
-
Sync Score — weight of direction agreement vs. weight of maturity level closeness
-
Multi-TF Status — thresholds for “mature” and “new/fresh”
-
Sync Groups — enable toggle, STRONG/CONFIRMED/CONFLICT thresholds, group alert
-
Dashboard — visibility, positioning, spacing, dimensions, font
-
Dashboard: Signal Colors — BUY / SELL color
-
Alerts — channels (popup/push/sound), sound file, alert types, cooldown
-
Performance / Stability — recalculation interval, scanned-bars cap
-
Debug — on-chart comment with detailed results, font, color
Note
Like any tool based on technical analysis of historical price, ZigZag Maturity provides a statistical probability, not a guarantee, of a reversal or of a move’s continuation. It is recommended as a confluence tool, alongside proper risk management and your own trading strategy, not as a standalone automated entry/exit signal.
