Wave Breath MT4
- Indicators
- Kestutis Balciunas
- Version: 1.0
Wave Breath Indicator is a non-repainting adaptive trend-flow tool for MetaTrader 4. It tracks market direction with a fast and slow exponential moving average pair on the typical price (HLC/3), wraps the resulting basis line with volatility-scaled sensitivity bands, and latches a stateful trend that flips only when price closes through the opposite band. The output is a clean, color-coded picture of the dominant flow: a bicolor basis line, a level line that hugs the active band, a translucent cloud filled between them, color-painted bars, a background gradient that deepens with each consecutive same-trend bar, and ASCII L (long) and S (short) labels that mark every confirmed reversal.
Check MT5 version at: Wave Breath MT5
See more products at: All Products
Check MT5 version at: Wave Breath MT5
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 Trend-Flow Engine
The indicator builds its core view in five stages. First, it computes the typical price for every bar (high + low + close, divided by three). Second, it runs two exponential moving averages on that series, one with the configured length and one at twice the length, then averages them into a single smooth basis line. Third, it computes the population standard deviation of the typical price over the same length and applies a second exponential moving average, with its own configurable smoothing length, to remove tick-to-tick noise. Fourth, it builds upper and lower sensitivity bands by adding and subtracting the smoothed volatility (multiplied by the user sensitivity) to and from the basis. Fifth, the trend state machine watches the close: while in an uptrend, the active level latches to the lower band, and the trend flips to bear only when the close crosses below that lower band; while in a downtrend, the active level latches to the upper band, and the trend flips to bull only when the close crosses above that upper band.
Bicolor Cloud and Lines
The basis line and the active level line both inherit the trend color: bull green during uptrends, bear red during downtrends. The space between them is filled with a translucent cloud in the same color, giving an immediate visual sense of the current flow direction and how far price has compressed inside the band. When the trend flips, the basis and level switch sides instantly; the new color appears on the next confirmed bar.
Paint Bars and Background Gradient
Every closed bar gets a colored overlay matching the current trend, using paired histogram buffers. The background gradient is drawn per bar as a translucent rectangle anchored from chart top to chart bottom; intensity ramps from 5 percent opacity to 20 percent over the first 20 bars of a streak and then holds, resetting to zero on every flip. This produces a calm, low-intensity look on choppy markets and a deep, saturated look on sustained moves.
Non-Repainting Architecture
Every closed bar's trend, level, basis, upper, lower, and color values are committed exactly once and never recomputed. The forming live bar mirrors the prior closed bar's display values to keep the line continuous, but no signal can fire on the live bar; signals only fire when a new bar appears and the just-closed bar's trend differs from the bar before it. Switching timeframes, recompiling, or scrolling history does not change any historical output.
Key Features
- Adaptive basis line built from a fast and slow exponential moving average pair on the typical price (HLC/3)
- Sensitivity bands placed at basis plus and minus smoothed volatility multiplied by the user sensitivity
- Stateful trend latch: long while close stays above the lower band, short while close stays below the upper band
- Bicolor basis line and level line that switch color on every confirmed flip
- Translucent cloud fill drawn between basis and level using DRAW_FILLING with bull and bear colors
- Color-painted candle bars overlaid via paired histogram buffers
- Per-bar background gradient that builds intensity over consecutive same-trend bars and resets on flip
- Plain ASCII L and S text labels at every confirmed trend reversal
- Full alert package: popup, mobile push, email, and sound, each toggleable independently
- History scan on first attach: every historical signal label is rendered immediately
- Non-repainting by design: signals fire only after bar close and never reposition
- Works on every symbol, every timeframe, every broker
