Stealth Vein MT5
- Indicators
- Kestutis Balciunas
- Version: 1.0
Stealth Vein Indicator is an adaptive dynamic-length moving average for MetaTrader 5. Instead of a fixed-period SMA, the indicator expands its length automatically based on a nine-mode reset engine: Slope, RSI, Volume, Bollinger, MACD, Stochastic, CCI, Momentum, or None. The length grows during persistent regimes (producing a smoother line) and resets at every regime change (producing instant responsiveness). A two-pole adaptive filter applied to the dynamic MA produces a smoother trend reference, ATR-banded circles confirm sustained trend periods, transition triangles mark the start of each new run, and two on-chart info tables display the current state and reset-mode guidance. Five alert events covering trend flips, confirmed-trend starts, counter breaks, and reset-state changes are deliverable through popup, push, email, and sound channels. Every value is computed from closed bars only, so the indicator never repaints.
Check MT4 version at: Stealth Vein MT4
See more products at: All Products
Check MT4 version at: Stealth Vein MT4
See more products at: All Products
For live examples and new tools, visit my profile and send a Friend request so you don’t miss updates!
How It Works
Adaptive Dynamic-Length MA
The indicator's signature feature is the counter-driven moving-average length. Each bar, the active reset mode produces a state value (+1, 0, or -1). When the state matches the prior bar's state, the counter increments. When it flips, the counter resets to 1. The dynamic MA length is computed as BaseLen + (counter - 1) , capped by MaxDynLen . With defaults of 50 and 350, the moving-average length ranges from 50 (immediately after a reset) to 350 (after a long persistent regime). An optional reverse-counter mode lets the length oscillate between 1 and a configurable break value, producing a pulsing responsiveness during long trends.
Nine Reset Modes
- Slope (default) — tracks dynamic MA slope direction
- RSI — uses overbought/oversold extremes
- Volume — uses sustained above-average volume
- Bollinger — uses sustained price excursions outside the bands
- MACD — uses MACD-vs-signal-line crossovers
- Stochastic — uses %K extremes
- CCI — uses CCI deviation from midpoint
- Momentum — uses rate-of-change sign
- None — counter resets every bar (fixed-length SMA)
The active mode determines the indicator's character. Slope produces smooth trend-following behaviour; RSI and Stochastic produce sharp pulses around momentum extremes; Volume anchors the dynamics to actual market participation. The bottom-right Reset Mode Guidance table updates automatically when the mode changes.
Two-Pole Adaptive Filter
A two-stage cascade filter applied to the dynamic MA produces the filteredTrend series used by all confirmation logic. The first stage is a single-pole low-pass; the second stage damps overshoots that the single-pole alone would produce during sharp turns. The filter has two inputs: dominant cycle period (default 20) and damping coefficient (default 0.8).
Confirmation Layers
- Three-color MA line. Lime when up-stride exceeds Trending Confirmation Length (default 10), red when down-stride exceeds it, yellow otherwise.
- ATR-banded circles. Plot at filteredTrend ± ATR(200) when up-stride or down-stride exceeds Trending Periods (default 20). Mapping is intentionally inverted, faithful to the Pine Script source.
- Transition triangles. Single markers fired at the bar where each confirmed trend run begins.
- Trend cloud fill. Auto-coloured fill between the dynamic MA and EMA(close, 10). Green when MA below EMA (up-bias), red when MA above (down-bias). Colours locked at compile time for MT4↔MT5 parity.
On-Chart Tables
Top-right Trend Strength table shows reset condition, counter value, normalized trend score (0-100), highest score, and average score. The Trend Strength row uses linear RGB interpolation to colour-shade based on stride magnitude. Bottom-right Reset Mode Guidance table shows the active mode's intended audience and key benefit.
Key Features
- Adaptive dynamic-length moving average driven by nine selectable reset modes
- Counter mechanism with optional reverse-counter ping-pong mode
- Two-pole adaptive trend filter for smooth confirmation logic
- ATR-banded confirmation circles at filteredTrend ± ATR(200) during sustained trends
- Transition triangles marking the start of each new confirmed trend
- Three-color MA line (up, down, neutral) with separate stride-based threshold
- Auto-coloured trend cloud fill against EMA(close, 10)
- Trend Strength info table (top-right) with current state and historical statistics
- Reset Mode Guidance table (bottom-right) with audience and benefit reference
- Five alert events x four channels: trend flip, confirmed up start, confirmed down start, counter break, reset state change via popup, sound, push notification, email
- Non-repainting — all values computed from closed bars only
