Dip and Rally Market Structure Levels
- 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 is a clean, non-repainting single-timeframe Dow Theory market structure indicator for MetaTrader 4 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 )
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 & Tester-Safe Pseudo-MTF: All pivots and Dip/Rally transitions are evaluated strictly on confirmed closed bars. Higher timeframes in the Strategy Tester are reconstructed sequentially from chart bars to prevent future-bar look-ahead leakage.
- 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 MQL4 iCustom Example (using the top 5 calculation inputs, shift = 1):
string indName = "Market\\Dip and Rally Market Structure Levels"; double trend = iCustom(_Symbol, PERIOD_CURRENT, indName, 5000, // MaxBars 0, // BreakMode: 0=Close, 1=Wick 0, // StructureMode: 0=InstantFlip, 1=Trendless 0, // Timeframe: 0=Current, 60=H1, 240=H4... 12, // ZigPeriod 2, // Buffer 2 = Trend (1=Bull, -1=Bear, 0=Neutral) 1); // Shift = 1 (closed bar)
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 version:
Dip and Rally Market Structure: https://www.mql5.com/en/market/product/212552
