Scanner Divergence RSI Dash Pro All Pair Timeframe
- Индикаторы
- Версия: 3.1
- Обновлено: 23 сентября 2026
- Активации: 5
### 1. General Overview
Breakout Divergent Scanner is an automated multi-currency and multi-timeframe analytical dashboard developed for the MetaTrader 5 (MT5) platform. The indicator functions as an operational technical scanner designed to detect momentum divergence between price action and the Relative Strength Index (RSI) across multiple financial instruments and chart periods simultaneously.
In technical analysis, identifying momentum exhaustion and trend-continuation setups across multiple assets typically requires manual chart switching, leading to analytical latency and missed trade opportunities. Breakout Divergent Scanner continuously monitors a configurable basket of instruments, evaluates swing structures, and presents validated setups within a centralized on-screen dashboard.
The indicator architecture consists of three integrated operational modules:
1. Multi-Symbol Scanner Engine: A timer-driven background processor that systematically extracts bar data, computes indicator buffers across user-defined symbol and timeframe matrices, and evaluates signal validity.
2. Interactive Graphical User Interface (GUI): A lightweight, draggable, and sortable on-screen dashboard providing real-time signal telemetry, directional classification, price levels (Entry, Stop Loss, Take Profit 1, Take Profit 2, Take Profit 3), and one-click chart navigation.
3. On-Chart Technical Projector: An active visual rendering module that plots price divergence trendlines, directional execution arrows, horizontal level projections, and automatically syncs the native RSI oscillator into a dedicated chart subwindow.
The system incorporates 16 modular filter layers, allowing traders to confirm divergence signals with trend filters, volatility metrics, momentum thresholds, and structural price barriers without requiring external chart overlays.
### 2. Operating Principles and Algorithmic Logic
The indicator detects momentum discrepancies by evaluating the mathematical relationship between price swing extremes (peaks and troughs) and the corresponding values of the Relative Strength Index (RSI).
#### 2.1. Mathematical Foundation of RSI
The oscillator utilizes the standard Relative Strength Index formula developed by J. Welles Wilder:
- Upward price change: U = Current Close - Previous Close (if positive, else 0)
- Downward price change: D = Previous Close - Current Close (if positive, else 0)
- Smoothed Average Up (Smoothed_U) and Down (Smoothed_D) calculated using Wilder's exponential smoothing over the user-defined period (RSI_Period).
- Relative Strength: RS = Smoothed_U / Smoothed_D
- Relative Strength Index: RSI = 100 - (100 / (1 + RS))
#### 2.2. Swing Pivot Detection Methodology
To prevent false divergence signals from single-bar noise, the system uses a structural fractal swing algorithm:
- Swing High Pivot: Identified at bar i when High[i] is strictly higher than the high of Swing_Left bars to the left and strictly higher than the high of Swing_Right bars to the right.
- Swing Low Pivot: Identified at bar i when Low[i] is strictly lower than the low of Swing_Left bars to the left and strictly lower than the low of Swing_Right bars to the right.
- Pivot Confirmation: Because a swing pivot mathematically requires Swing_Right bars to form after the extreme point, the pivot is evaluated over historical bars from index Swing_Right + 1 up to Swing_Right + 15. The prior reference pivot is searched backward up to Lookback depth.
#### 2.3. Divergence Classification Rules
The algorithm monitors two distinct classes of technical divergence:
1. Regular Divergence (Trend Reversal):
- Regular Bullish: Price forms a lower low (Low[i] < Low[prev_pivot]) while RSI forms a higher low (RSI[i] > RSI[prev_pivot]), signaling potential upward exhaustion and reversal.
- Regular Bearish: Price forms a higher high (High[i] > High[prev_pivot]) while RSI forms a lower high (RSI[i] < RSI[prev_pivot]), signaling potential downward exhaustion and reversal.
2. Hidden Divergence (Trend Continuation):
- Hidden Bullish: Price forms a higher low (Low[i] > Low[prev_pivot]) while RSI forms a lower low (RSI[i] < RSI[prev_pivot]), signaling upward continuation during pullbacks.
- Hidden Bearish: Price forms a lower high (High[i] < High[prev_pivot]) while RSI forms a higher high (RSI[i] > RSI[prev_pivot]), signaling downward continuation during temporary rallies.
#### 2.4. Signal Timing and Repainting Characteristics
- Calculation Reference: Signals are generated and confirmed exclusively on the close of the completed candle (Bar 1). The scanner registers entry conditions at Close[1].
- Non-Repainting Behavior: Once a bar closes and a signal satisfies all swing conditions and active filters, signal coordinates, dashboard rows, and on-chart trendlines do not repaint, disappear, or shift.
- Pivot Latency: Because swing validation mathematically requires Swing_Right bars to confirm a localized peak or trough, signals appear once the pivot structure is established.
#### 2.5. Protective Stop and Profit Target Formulations
- Entry Price: Closing price of the signal bar (Close[1]).
- Structural Stop Loss (SL): For Bullish signals, SL is placed at the swing low pivot price (Low[i]). For Bearish signals, SL is placed at the swing high pivot price (High[i]).
- Fallback Stop Loss (ATR): If swing data is invalid or equal to entry, the system calculates an Average True Range protective stop: Bullish ATR SL = Entry - (ATR * InpATRMult); Bearish ATR SL = Entry + (ATR * InpATRMult).
- Risk Calculation: Base Risk = |Entry - SL|
- Multi-Stage Take Profit (TP) Levels:
- Take Profit 1 (TP1): Entry +/- (Base Risk * 1.0) -> Risk-to-Reward Ratio 1:1
- Take Profit 2 (TP2): Entry +/- (Base Risk * 2.0) -> Risk-to-Reward Ratio 1:2
- Take Profit 3 (TP3): Entry +/- (Base Risk * 3.0) -> Risk-to-Reward Ratio 1:3
### 3. Modular Multi-Filter Confirmation Suite
The scanner incorporates 16 optional filter modules to confirm setups against prevailing market conditions. Each filter can be independently toggled:
- RSI Cross Filter (Use_RSI_Cross_Filter): Requires secondary RSI (14) to cross above oversold (30) for Buy, or below overbought (70) for Sell.
- ADX Filter (Use_ADX_Filter): Filters low-momentum conditions by requiring ADX to exceed ADX_Min_Level (Default: 20.0).
- Single Moving Average (Use_MA_Filter): Requires candle closing price above MA for Buy, and below MA for Sell.
- Ichimoku Cloud Filter (Use_Ichimoku_Filter): Requires candle closing price above Senkou Span B for Buy, and below Senkou Span B for Sell.
- RSI 75 Filter (Use_RSI75_Filter): Requires macro RSI (75) above 50.0 for Buy, and below 50.0 for Sell.
- Double Moving Average (Use_DoubleMA_Filter): Confirms directional bias when fast MA (30 EMA) is above slow MA (140 EMA) for Buy, and below for Sell.
- Awesome Oscillator (Use_AO_Filter): Supports volume thresholds (AO_Buy_Min / AO_Sell_Max), bar color slope, and zero-line positioning.
- Parabolic SAR (Use_SAR_Filter): Confirms direction relative to trailing SAR dots (Close > SAR for Buy, Close < SAR for Sell).
- Heiken Ashi (Use_HeikenAshi_Filter): Validates trend consistency using synthetic Heiken Ashi candlestick body color.
- CCI Trend (Use_CCI_Filter): Requires Commodity Channel Index (50) to be positive for Buy, and negative for Sell.
- CCI Overbought/Oversold (Use_CCI_OBOS_Filter): Requires cyclical CCI (14) beyond extreme levels (-100 / +100).
- RVI Trend (Use_RVI_Filter): Requires Relative Vigor Index main line above zero for Buy, and below zero for Sell.
- RVI Signal Cross (Use_RVI_Signal_Filter): Validates momentum alignment via RVI main line crossover with the signal line.
- MACD Filter (Use_MACD_Filter / Use_MACD_Zero_Filter): Confirms momentum via MACD histogram polarity or main line zero-line position.
- Support & Resistance (Use_SR_Filter): Verifies if price interacts with recent structural support (Buy) or resistance (Sell) within SR_Zone_Points.
- Fibonacci Filter (Use_Fib_Filter): Confirms confluence between 38.2% and 61.8% Fibonacci retracement levels derived from ZigZag swings.
### 4. Interactive Graphical User Interface and Chart Visuals
The indicator includes an on-chart graphical interface designed for streamlined operational analysis:
#### 4.1. Dashboard Telemetry Matrix
The panel displays signals across a 12-column grid:
1. PAIR: Monitored asset symbol (e.g., EURUSD, GBPJPY, XAUUSD).
2. TF: Timeframe of the identified setup (M1 to D1).
3. DIV TYPE: Pattern identification (Reg Bullish, Reg Bearish, Hid Bullish, Hid Bearish).
4. DIR: Operational direction (BUY in green, SELL in red).
5. TIME: Candle opening timestamp corresponding to the confirmed signal.
6. ENTRY: Calculated execution price (Close[1]).
7. SL: Structural or ATR protective stop-loss price.
8. TP1: First target level (1:1 Risk-to-Reward).
9. TP2: Second target level (1:2 Risk-to-Reward).
10. TP3: Third target level (1:3 Risk-to-Reward).
11. AGE: Elapsed time since signal confirmation (seconds, minutes, hours, days).
12. OPEN: Interactive button that switches the current chart directly to the target symbol and timeframe.
#### 4.2. UI Controls and Customization
- Sorting: Column buttons sort rows dynamically by Symbol, Timeframe, Direction, or Time.
- Draggable Header: Left-click and drag the title area to position the panel anywhere on the chart. Coordinates persist across sessions via Global Variables (RSI_DASH_POS_X, RSI_DASH_POS_Y).
- Panel Collapse: Minimize the dashboard to a compact title bar via the MIN/MAX button (RSI_DASH_MINIMIZED).
- Manual Reset: REFRESH reloads symbol data and resets indicator handles; CLEAR removes graphical objects.
#### 4.3. On-Chart Visual Annotations
- Divergence Trendlines: Automatically connects swing pivots on price (Green for Bullish, Red for Bearish).
- Execution Arrows: Places directional Wingdings arrows (Code 233 Buy / 234 Sell) on the signal candle.
- Level Projections: Renders extended horizontal price lines for Entry (dotted blue), Stop Loss (dashed orange), and TP1/TP2/TP3 targets (solid teal/cyan/purple) with numerical price and RR annotations.
- RSI Subwindow Synchronization: When InpShowRSIOnChart is enabled, the program automatically embeds a matching RSI subwindow on the chart.
### 5. Operation Recommendations and System Specifications
- Supported Instruments: Functions across liquid instruments supported by MetaTrader 5, including Forex pairs, Gold (XAUUSD), Silver, Crude Oil, equity indices, and cryptocurrency CFDs.
- Recommended Timeframes:
- Intraday & Scalping: M5, M15, and M30 provide frequent divergence formations.
- Swing Trading: H1, H4, and D1 offer higher structural stability with wider target projections.
- Account Type: Compatible with Hedging and Netting accounts. ECN or raw spread accounts are recommended for lower timeframes to minimize spread impact on 1:1 risk-to-reward targets.
- Computational Efficiency: The scanner runs on a timer interval (InpScanSec), preventing chart lag during rapid tick updates. History depth per timeframe is controlled by InpBarsCopy (Default: 300 bars) to maintain low CPU and memory utilization.
### 6. Multi-Tier Alert Framework
The scanner provides real-time alerts upon signal confirmation on a closed bar:
- Pop-Up Alert: Native MetaTrader 5 dialog window showing symbol, timeframe, pattern, entry, SL, and TP targets.
- Audio Alert: Plays the standard acoustic chime (alert.wav).
- Push Notifications: Sends real-time notifications to mobile devices via MetaQuotes ID.
- Duplicate Filter: An internal tracking array (g_lastAlert) ensures that each confirmed bar only alerts once.
### 7. Input Parameters Documentation
Every input parameter declared in the indicator source code is documented below:
#### 7.1. Scanner Settings
- InpSymbols (Default: "EURUSD,GBPUSD,USDJPY,AUDUSD,USDCAD,USDCHF,NZDUSD,EURJPY,GBPJPY,XAUUSD") [string]: Pairs list (empty = Market Watch).
- InpTimeframes (Default: "M1,M5,M15,M30,H1,H4,D1") [string]: Comma-separated list of timeframes.
- InpUseWatch (Default: true) [bool]: Use all Market Watch pairs.
- InpMaxSymbols (Default: 10) [int]: Maximum pairs scanned to manage memory.
- InpScanSec (Default: 5) [int, seconds]: Scan interval in seconds.
- InpBarsCopy (Default: 300) [int, bars]: Bars analyzed per timeframe.
#### 7.2. Divergence Settings
- RSI_Period (Default: 8) [int, bars]: RSI Period for divergence detection.
- RSI_Price (Default: PRICE_CLOSE) [ENUM_APPLIED_PRICE]: RSI applied price data source.
- Swing_Left (Default: 3) [int, bars]: Bars to the left for pivot high/low validation.
- Swing_Right (Default: 3) [int, bars]: Bars to the right for pivot confirmation.
- Lookback (Default: 80) [int, bars]: Maximum bars to search for previous pivot.
- Show_Regular (Default: true) [bool]: Detect Regular Divergence.
- Show_Hidden (Default: true) [bool]: Detect Hidden Divergence.
#### 7.3. RSI Visualization Settings
- InpShowRSIOnChart (Default: true) [bool]: Show active pair RSI on chart subwindow.
#### 7.4. ATR SL Fallback Settings
- InpATRPeriod (Default: 14) [int, bars]: ATR period for volatility calculation.
- InpATRMult (Default: 1.5) [double]: ATR multiplier for Stop Loss if no swing point exists.
#### 7.5. Filter Settings
- Use_RSI_Cross_Filter (Default: false) [bool]: Enable RSI level crossing filter.
- RSI_Length (Default: 14) [int, bars]: Secondary RSI calculation period.
- RSI_Price_Source (Default: PRICE_CLOSE) [ENUM_APPLIED_PRICE]: Secondary RSI applied price.
- Oversold (Default: 30.0) [double]: RSI oversold threshold for Buy.
- Overbought (Default: 70.0) [double]: RSI overbought threshold for Sell.
- Use_ADX_Filter (Default: false) [bool]: Enable ADX trend strength filter.
- ADX_Period (Default: 10) [int, bars]: ADX calculation period.
- ADX_Min_Level (Default: 20.0) [double]: Minimum ADX level required for trade validation.
- Use_MA_Filter (Default: false) [bool]: Enable single Moving Average trend filter.
- MA_Period (Default: 50) [int, bars]: Single Moving Average calculation period.
- MA_Method (Default: MODE_SMA) [ENUM_MA_METHOD]: Moving average calculation method.
- MA_Shift (Default: 0) [int, bars]: Moving average horizontal bar shift.
- Use_Ichimoku_Filter (Default: false) [bool]: Enable Ichimoku Senkou Span B filter.
- Ichimoku_SenkouB (Default: 52) [int, periods]: Senkou Span B calculation period.
- Ichimoku_Kijun (Default: 26) [int, periods]: Kijun-sen calculation period.
- Use_RSI75_Filter (Default: false) [bool]: Enable macro RSI 75 filter.
- RSI_Filter_Period (Default: 75) [int, bars]: Macro RSI period.
- Use_DoubleMA_Filter (Default: false) [bool]: Enable Double MA trend filter.
- MA_A_Period (Default: 30) [int, bars]: Period of fast Moving Average A.
- MA_A_Method (Default: MODE_EMA) [ENUM_MA_METHOD]: Smoothing method of MA A.
- MA_A_Applied (Default: PRICE_CLOSE) [ENUM_APPLIED_PRICE]: Applied price of MA A.
- MA_A_Shift (Default: 0) [int, bars]: Horizontal bar shift of MA A.
- MA_B_Period (Default: 140) [int, bars]: Period of slow Moving Average B.
- MA_B_Method (Default: MODE_EMA) [ENUM_MA_METHOD]: Smoothing method of MA B.
- MA_B_Applied (Default: PRICE_CLOSE) [ENUM_APPLIED_PRICE]: Applied price of MA B.
- MA_B_Shift (Default: 0) [int, bars]: Horizontal bar shift of MA B.
- Use_AO_Filter (Default: false) [bool]: Enable Awesome Oscillator filter.
- Use_AO_Volume_Filter (Default: false) [bool]: Enable AO volume magnitude check.
- AO_Buy_Min (Default: 4.0) [double]: Minimum AO value required for Buy.
- AO_Sell_Max (Default: -4.0) [double]: Maximum AO value required for Sell.
- Use_AO_Color_Filter (Default: false) [bool]: Enable AO bar color/slope filter.
- Use_AO_Zero_Filter (Default: false) [bool]: Enable AO zero-line position filter.
- Use_SAR_Filter (Default: false) [bool]: Enable Parabolic SAR filter.
- SAR_Step (Default: 0.02) [double]: Parabolic SAR incremental step factor.
- SAR_Maximum (Default: 0.2) [double]: Parabolic SAR maximum step ceiling.
- Use_HeikenAshi_Filter (Default: false) [bool]: Enable synthetic Heiken Ashi trend filter.
- Use_CCI_Filter (Default: false) [bool]: Enable CCI zero-line trend filter.
- CCI_Period (Default: 50) [int, bars]: Trend CCI period.
- CCI_Applied (Default: PRICE_CLOSE) [ENUM_APPLIED_PRICE]: Trend CCI applied price.
- Use_CCI_OBOS_Filter (Default: false) [bool]: Enable CCI overbought/oversold filter.
- CCI_OBOS_Period (Default: 14) [int, bars]: Cyclical CCI calculation period.
- CCI_OBOS_Applied (Default: PRICE_CLOSE) [ENUM_APPLIED_PRICE]: Cyclical CCI applied price.
- CCI_Overbought (Default: 100.0) [double]: Cyclical CCI overbought threshold.
- CCI_Oversold (Default: -100.0) [double]: Cyclical CCI oversold threshold.
- Use_RVI_Filter (Default: false) [bool]: Enable RVI zero-line trend filter.
- RVI_Period (Default: 75) [int, bars]: Trend RVI calculation period.
- Use_RVI_Signal_Filter (Default: false) [bool]: Enable RVI main and signal cross filter.
- RVI_Signal_Period (Default: 20) [int, bars]: RVI signal cross period.
- Use_MACD_Filter (Default: false) [bool]: Enable MACD histogram filter.
- MACD_FastEMA (Default: 12) [int, periods]: Fast EMA period for MACD.
- MACD_SlowEMA (Default: 26) [int, periods]: Slow EMA period for MACD.
- MACD_SignalSMA (Default: 9) [int, periods]: Signal SMA period for MACD.
- MACD_Applied (Default: PRICE_CLOSE) [ENUM_APPLIED_PRICE]: Applied price for MACD.
- Use_MACD_Zero_Filter (Default: false) [bool]: Enable MACD zero-line filter.
- Use_SR_Filter (Default: false) [bool]: Enable Support and Resistance zone filter.
- SR_Period (Default: 50) [int, bars]: Lookback period for S/R levels.
- SR_Zone_Points (Default: 80) [double, points]: Proximity zone buffer in points.
- Use_Fib_Filter (Default: false) [bool]: Enable Fibonacci retracement filter.
- Fib_Level_1 (Default: 0.382) [double]: First Fibonacci ratio level.
- Fib_Level_2 (Default: 0.618) [double]: Second Fibonacci ratio level.
- ZigZag_Depth (Default: 12) [int, bars]: ZigZag depth parameter for Fibonacci swings.
- ZigZag_Deviation (Default: 5) [int, points]: ZigZag deviation parameter in points.
- ZigZag_Backstep (Default: 3) [int, bars]: ZigZag backstep parameter.
#### 7.6. Alert Settings
- InpAlertPopup (Default: true) [bool]: Show pop-up alert dialog on terminal.
- InpAlertSound (Default: true) [bool]: Play sound file on signal ("alert.wav").
- InpAlertPush (Default: false) [bool]: Send push notification to mobile terminal.
- InpAlertOnlyNew (Default: false) [bool]: Alert only on newly formed signals.
#### 7.7. Dashboard Display Settings
- InpX (Default: 12) [int, pixels]: Panel X position on chart.
- InpY (Default: 28) [int, pixels]: Panel Y position on chart.
- InpScale (Default: 110) [int, percent]: Panel scale percentage (80 to 160).
- InpRowH (Default: 18) [int, pixels]: Row height in pixels.
- InpFont (Default: 7) [int, points]: Font size for table labels.
- InpPadX (Default: 7) [int, pixels]: Left cell padding in pixels.
- InpWPair (Default: 55) [int, pixels]: Column width for pair name.
- InpWTF (Default: 30) [int, pixels]: Column width for timeframe.
- InpWPola (Default: 65) [int, pixels]: Column width for pattern type.
- InpWArah (Default: 45) [int, pixels]: Column width for trade direction.
- InpWTime (Default: 100) [int, pixels]: Column width for signal timestamp.
- InpWEntry (Default: 55) [int, pixels]: Column width for entry price.
- InpWSL (Default: 55) [int, pixels]: Column width for Stop Loss price.
- InpWTP1 (Default: 55) [int, pixels]: Column width for Take Profit 1.
- InpWTP2 (Default: 55) [int, pixels]: Column width for Take Profit 2.
- InpWTP3 (Default: 55) [int, pixels]: Column width for Take Profit 3.
- InpWUmur (Default: 45) [int, pixels]: Column width for signal age.
- InpWOpen (Default: 46) [int, pixels]: Column width for chart open button.
- InpShowEmpty (Default: false) [bool]: Show pairs/timeframes without active signal.
- InpMaxRows (Default: 17) [int, rows]: Maximum visible table rows.
- InpSortBy (Default: SORT_TIME) [ENUM_HMD_SORT]: Column sort criteria.
- InpSortNewest (Default: true) [bool]: Sort newest signals first.
#### 7.8. Chart Drawing Settings
- InpDrawOnChart (Default: true) [bool]: Draw trendlines and target levels on chart.
- InpShowArrow (Default: true) [bool]: Display directional entry arrows on chart.
- InpShowLevels (Default: true) [bool]: Display Entry, SL, TP1, TP2, TP3 lines.
- InpExtendBars (Default: 25) [int, bars]: Extension bars forward for level lines.
- InpArrowCodeBuy (Default: 233) [int]: Wingdings arrow code for Buy signals.
- InpArrowCodeSell (Default: 234) [int]: Wingdings arrow code for Sell signals.
- InpArrowSize (Default: 2) [int]: Size of directional arrows on chart.
- InpArrowShiftPts (Default: 20) [int, points]: Vertical arrow offset in points.
#### 7.9. Color Settings
- InpColBg (Default: C'18,22,28') [color]: Dashboard background color.
- InpColHead (Default: C'32,38,48') [color]: Dashboard header background color.
- InpColRow (Default: C'24,28,36') [color]: Table row background color.
- InpColRow2 (Default: C'28,33,42') [color]: Alternate table row background color.
- InpColText (Default: C'220,225,230') [color]: Standard text color.
- InpColBull (Default: C'0,200,83') [color]: Bullish setup highlight color.
- InpColBear (Default: C'255,82,82') [color]: Bearish setup highlight color.
- InpColMute (Default: C'120,128,140') [color]: Subdued status text color.
- InpColAccent (Default: C'41,98,255') [color]: Accent highlight color for active sort.
- InpColEntry (Default: C'41,98,255') [color]: Entry level line and text color.
- InpColSL (Default: C'255,109,0') [color]: Stop Loss level line and text color.
- InpColTP1 (Default: C'0,191,165') [color]: Take Profit 1 line and text color.
- InpColTP2 (Default: C'0,172,193') [color]: Take Profit 2 line and text color.
- InpColTP3 (Default: C'124,77,255') [color]: Take Profit 3 line and text color.
### 8. Risk Disclaimer
Trading foreign exchange, commodities, and other financial instruments involves significant risk of loss and is not suitable for all investors. Past performance does not guarantee future results. This software is an analytical and operational tool designed to assist traders in technical analysis; it does not guarantee financial profit or provide investment advice. Always thoroughly test the product on a demo account to understand its operational behavior before considering deployment in live trading environments.
