Dip and Rally Market Structure Levels MT5
- Indicatori
-
Koji Saito
nice to meet you!
Trader focused on developing indicators built on market structure and price action analysis logic.
Designed with zero repainting, strict risk management, and a focus on reproducibility. - Versione: 1.0
Dip and Rally Market Structure Levels MT5 is a clean, non-repainting single-timeframe Dow Theory market structure indicator for MetaTrader 5 with an interactive dark-card control panel.
Core Highlights: Automatic Dip (Protected Low) & Rally (Protected High) Levels | Single-Timeframe MTF Panel (M1 to MN1) | Strict Closed-Bar Non-Repainting | Close or Wick Break Modes | 3 EA-Ready Buffers ( iCustom / CopyBuffer )
Instead of crowding your chart with cluttered zones or lagging signals, it automatically tracks confirmed swing pivots and highlights the exact Protected Low (Dip) in an uptrend and Protected High (Rally) in a downtrend—complete with one-click timeframe switching and live trend bias badge.
Key Features
- Automatic Dip & Rally (Protected Low / High) Tracking: Identifies confirmed Dow Theory structural defense levels in real time, complete with an optional right-extended live price label.
- Interactive Dark-Card Control Panel: Switch timeframes ( M1 – MN1 or CUR ) in one click, toggle ZigZag and Dip/Rally visibility, monitor the live TREND: BULL / BEAR / WAIT status badge, drag smoothly by the header, or collapse/expand anytime. Panel position and settings are preserved across chart timeframe switches.
- Strict Closed-Bar Non-Repainting & Strategy Tester Ready: All pivots and Dip/Rally transitions are evaluated strictly on confirmed closed bars with zero future-bar leakage in both live charts and MetaTrader 5 Strategy Tester.
- Flexible Break & Structure Modes:
- Break Detection Mode: Switch between Candle Close confirmation and Candle Wick (High/Low) breakout detection.
- Post-Break Structure Mode: Choose Instant Flip (continuous bullish/bearish bias) or Trendless / Neutral Zone (waits in neutral state until clear opposite structural confirmation).
- High-Speed Viewport Rendering: Historical swings and base-point levels are stored in memory while only objects visible in your chart window are rendered and pooled, keeping scrolling smooth across up to 30,000 bars.
- EA-Ready Architecture (3 Output Buffers & Automatic iCustom Mode): Core calculation inputs are grouped at the top, and headless iCustom execution automatically skips chart objects and panel UI so Expert Advisors can read trend bias cleanly.
Input Parameters (12 Total)
- Maximum Bars to Calculate (default: 30000 ) — History depth for calculation.
- Break Detection Mode (default: Candle Close ) — Candle Close or Candle Wick (High/Low).
- Post-Break Structure Mode (default: Instant Flip ) — Instant Flip or Trendless / Neutral Zone.
- Timeframe (default: Current ) — Target timeframe for market structure (Current or M1 to MN1).
- ZigZag Swing Period (default: 12 ) — Swing detection period.
- Show Control Panel (default: true ) — Show or hide the interactive chart panel.
- Show ZigZag Swings (default: true ) — Initial ZigZag swing visibility.
- Show Active Protected Price Label (default: true ) — Show right-extended price label for the current Protected Low / High.
- Dip (Protected Low) Color (default: Aqua )
- Rally (Protected High) Color (default: Magenta )
- ZigZag Color (default: Gray )
- Instance ID (0-9) (default: 0 ) — Set unique IDs (0-9) when attaching multiple instances to the same chart.
EA / iCustom Integration Guide (3 Buffers)
- Buffer 0: Dip (Protected Low) — Active support level price (Empty = EMPTY_VALUE )
- Buffer 1: Rally (Protected High) — Active resistance level price (Empty = EMPTY_VALUE )
- Buffer 2: Trend — 1.0 = Bullish, -1.0 = Bearish, 0.0 = Neutral/None
Minimal MQL5 iCustom + CopyBuffer Example (using the top 5 calculation inputs):
// Create handle once in OnInit() int handle = iCustom(_Symbol, _Period, "Market\\Dip and Rally Market Structure Levels MT5", 5000, // MaxBars 0, // BreakMode: 0=Close, 1=Wick 0, // StructureMode: 0=InstantFlip, 1=Trendless 0, // Timeframe: 0=Current, 60=H1, 240=H4... 12); // ZigPeriod // In OnTick(), read Buffer 2 (Trend) at closed bar (shift = 1): double trendArr[1]; if(CopyBuffer(handle, 2, 1, 1, trendArr) == 1) { double trend = trendArr[0]; // 1.0=Bull, -1.0=Bear, 0.0=Neutral }
Need Dual-Timeframe MTF, BOS/CHoCH, Clean Mode & Alerts?
If you want full Dual-Timeframe MTF (TF1 + TF2 with ALIGNED/MIXED badge), automatic BOS & CHoCH break labeling, Clean Mode, Break Filter (ATR %), Popup / Push / Email Alerts, and 8 EA buffers, check out the full MT5 version:
