Boom Crash Divergence Tool
- Indicatori
- Stephen Muriithi Muraguri
- Versione: 1.0
An MT5 divergence scanner that automatically finds divergence / hidden divergence between price and a chosen oscillator, then draws the matching trendlines/channels in the indicator window and can alert you when the line is crossed.
Key features (simple)
-
Auto Divergence Detection
-
Bullish divergence: price makes a lower low while oscillator makes a higher low (possible reversal up).
-
Bearish divergence: price makes a higher high while oscillator makes a lower high (possible reversal down).
-
-
Hidden divergence (called “convergence” in settings)
-
Finds continuation-style setups (useful for trend trading).
-
-
Works with many oscillators
-
RSI (default), MACD, Stochastic, CCI, Momentum, ADX, ATR, AO/AC, OBV, etc.
-
-
Clear visuals
-
Draws trendlines and optional channels (parallel / regression / std-dev channel).
-
Shows buy/sell arrows on detected swing points.
-
-
Noise reduction
-
Uses T3 smoothing on the oscillator line to reduce false pivots on volatile markets (handy for Boom/Crash).
-
-
Alerts
-
Popup, push notification, email, sound, optional external program launch, plus optional advanced alerts (Telegram/Discord/etc via DLL).
-
-
Performance controls
-
Limits bars processed to keep the indicator fast.
-
How it works (logic overview)
-
Calculates the selected oscillator (or selected price source).
-
Applies T3 smoothing to produce a cleaner oscillator curve.
-
Detects swing highs/lows using “left/right strength” (how many bars on each side must be lower/higher).
-
Compares recent swings:
-
For regular divergence and hidden divergence
-
-
Draws trendlines/channels for the detected setups and optionally triggers alerts when the line is crossed.
Note: swing points are confirmed only after the “right-side” bars are complete, which helps reduce noise.
Oscillator selector (Osc)
Use Osc to choose what the tool compares against price:
1 AC, 2 AD, 3 ADX, 4 ATR, 5 AO, 6 BearsPower, 7 BullsPower, 8 CCI, 9 DeMarker, 10 Force, 11 Momentum, 12 MFI, 13 MACD, 14 MAO, 15 OBV, 16 RVI, 17 StdDev, 18 Stochastic, 19 Volume, 20 Close, 21 Open, 22 High, 23 Low, 24 (H+L)/2, 25 (H+L+C)/3, 26 (H+L+2C)/4, 27 (O+C+H+L)/4, 28 (O+C)/2, 29 RSI, 30 RBCI, 31 FTLM, 32 STLM, 33 JRSX, 34 RSI, 35 Williams %R.
Inputs (parameters) — with plain-English descriptions
A) Core detection
-
Osc (int, default: 29) — Which oscillator/source to use for divergence (see list above).
-
TH (bool, default: true) — Enable high-side (bearish) divergence checks.
-
TL (bool, default: true) — Enable low-side (bullish) divergence checks.
-
trend (bool, default: true) — Draw basic oscillator trendlines (not only divergence).
-
convergen (bool, default: true) — Enable hidden divergence detection.
-
Complect (int, default: 1) — Visual set/slot used in object names & styling (helps separate drawings).
-
_qSteps (int, default: 1) — How many “recent setups” to draw/scan (max 3).
-
_BackSteph (int, default: 0) — Skip this many swing points back before starting (highs).
-
_BackStepl (int, default: 0) — Skip this many swing points back before starting (lows).
-
BackStep (int, default: 0) — One value to override both back-step settings above.
B) Swing-point (pivot) sensitivity
-
LevDPl (int, default: 5) — Left-side strength: bars to the left that must confirm a swing point.
-
LevDPr (int, default: 1) — Right-side strength: bars to the right that must confirm a swing point.
-
LeftStrong (bool, default: false) — If true , equal-values on the left are treated as “strong” (fewer duplicate pivots).
-
RightStrong (bool, default: true) — If true , equal-values on the right are treated as “strong”.
C) Indicator calculation settings
-
period (int, default: 8) — Main period used by many oscillators (and RSI used for alerts).
-
applied_price (int, default: 4) — Price type used by some indicators (commonly Close).
-
mode (int, default: 0) — Buffer/line index for multi-line indicators (example: MACD line vs signal).
-
ma_method (ENUM_MA_METHOD, default: MODE_SMA) — MA method used by some calculations (e.g., StdDev).
-
ma_shift (int, default: 0) — MA shift used by some calculations.
MACD-only
-
fast_ema_period (int, default: 12) — MACD fast EMA.
-
slow_ema_period (int, default: 26) — MACD slow EMA.
-
signal_period (int, default: 9) — MACD signal SMA/EMA period.
Stochastic-only
-
Kperiod (int, default: 13) — %K period.
-
Dperiod (int, default: 5) — %D period.
-
slowing (int, default: 3) — Slowing factor.
-
price_field (ENUM_STO_PRICE, default: 0) — Price field for Stochastic.
Smoothing
-
T3_Period (int, default: 1) — T3 smoothing length (higher = smoother).
-
b (double, default: 0.7) — T3 smoothing factor (controls smoothness/lag).
D) Drawing options (look & behavior)
-
TrendLine (bool, default: true) — Master switch for drawing the lines.
-
Trend_Down (bool, default: true) — Show downtrend/bearish-side drawings.
-
Trend_Up (bool, default: true) — Show uptrend/bullish-side drawings.
-
HandyColour (bool, default: true) — Auto-color lines based on setup/step.
-
Highline (color, default: Red) — Manual color for high-side lines (if auto-color off).
-
Lowline (color, default: DeepSkyBlue) — Manual color for low-side lines (if auto-color off).
-
ChannelLine (bool, default: true) — Draw a parallel “channel” style line.
-
Trend (int, default: 0) — Direction filter: 1 only up, -1 only down, 0 both.
-
Channel (bool, default: false) — Use a classic channel object style.
-
Regression (bool, default: false) — Use regression channel mode.
-
RayH (bool, default: true) — Extend high-side channel/line to the right.
-
RayL (bool, default: true) — Extend low-side channel/line to the right.
-
ChannelH (color, default: Red) — High-side channel color.
-
ChannelL (color, default: DeepSkyBlue) — Low-side channel color.
-
STDwidthH (double, default: 1.0) — StdDev channel width (high-side).
-
STDwidthL (double, default: 1.0) — StdDev channel width (low-side).
-
Back (int, default: -1) — Reserved/legacy parameter (not essential for normal use).
-
code_buy (int, default: 159) — Wingdings code for the “buy” arrow symbol.
-
code_sell (int, default: 159) — Wingdings code for the “sell” arrow symbol.
E) Performance
-
_showBars (int, default: 1000) — Bars to visually work with.
-
bars_limit (int, default: 1000) — Bars to calculate per tick (speed control).
F) Alerts
-
SIGNAL_BAR (int, default: 1) — Which bar is used to confirm/trigger alerts ( 1 = closed bar).
-
popup_alert (bool, default: false) — MT5 popup alert.
-
notification_alert (bool, default: false) — Push notification.
-
email_alert (bool, default: false) — Email alert.
-
play_sound (bool, default: false) — Play a sound.
-
sound_file (string, default: "") — Sound file name.
-
start_program (bool, default: false) — Launch an external program on alert.
-
program_path (string, default: "") — Path to the program executable.
-
advanced_alert (bool, default: false) — Advanced alert via DLL (Telegram/Discord/etc).
-
advanced_key (string, default: "") — Key for advanced alert service.
-
AlertsSection / Comment2 / Comment3 / Comment4 (string) — UI separators/info text (no trading logic impact).
Practical advantages for Boom/Crash traders
-
Saves time: no manual divergence drawing.
-
Cleaner signals on fast, spiky markets thanks to pivot confirmation + smoothing.
-
Flexible: switch oscillator types without changing the workflow.
-
No alert spam: it tracks last alerted line/time to avoid duplicates.
