Growing or Waning Patterns [Alerts]
Jan 27, 2020

The Growing or Waning Patterns [Alerts] indicator identifies specific sequences of three price bar bodies that are progressively increasing or decreasing in size to highlight shifts in market momentum. This tool helps traders visualize expansion or exhaustion phases within a trend or in isolation through color-coded bar patterns and integrated alert signals.
Usage
The script is used to detect volatility expansion ("Grown") or contraction ("Waned") patterns. A "Grown" pattern occurs when three consecutive candles show increasing body sizes, ending with a significant "Big Bar." Conversely, a "Waned" pattern begins with a large body and follows with two progressively smaller bodies.
Traders can use these patterns to:
- Confirm Momentum: Identify accelerating moves when the "Grown" pattern aligns with the current trend direction.
- Anticipate Exhaustion: Detect fading interest in a trend when "Waned" patterns appear at local extremes.
- Filter by Trend: By enabling the Trending option, the script ensures that the highs and lows are moving in a consistent direction (higher highs/lows for up, lower highs/lows for down) alongside the size patterns.
Details
The indicator calculates a dynamic threshold for a "Big Bar" based on a simple moving average of price body sizes (absolute difference between open and close) over a user-defined sample length.
- Grown Logic: Candle 0 (current) must be >= a percentage of the average body size, while Candle 1 is smaller than Candle 0, and Candle 2 is smaller than Candle 1.
- Waned Logic: Candle 2 (two bars ago) must be >= a percentage of the average, while Candle 1 is smaller than Candle 2, and Candle 0 is smaller than Candle 1.
The script also includes a "Repeat Pattern" filter to prevent multiple signals from firing in rapid succession within a specified bar window.
Settings
- Choose Pattern Of Filter: Select whether to display "Grown" patterns, "Waned" patterns, or both.
- Sample Lengths Of AvgBar: Sets the lookback period for calculating the average bar body size used for comparison.
- BigBar Is Min% Of AvgBar: The minimum percentage the largest bar in the sequence must reach relative to the average size.
- MedBar Is Max% Of BigBar: The maximum percentage the medium-sized bar can be relative to the big bar.
- SmlBar Is Max% Of MedBar: The maximum percentage the small bar can be relative to the medium bar.
- Repeat Pattern If n Bars: Filters signals so they only appear if the pattern hasn't occurred within the last "n" bars.
- Trending: When enabled, requires the pattern to coincide with consecutive higher highs/lows (upward) or lower highs/lows (downward).
- GrayBars: When enabled, colors all bars not part of a pattern gray to highlight the signals.
FAQ
How do I use the alerts for this script?
You can set alerts based on specific growth or wane conditions via the TradingView Alert menu, choosing between trend-aligned signals or pure momentum shifts.
What do the triangle shapes represent?
Triangles denote the specific bar where the pattern criteria are met. Upward triangles indicate bullish alignment or growth, while downward triangles indicate bearish alignment or waning, depending on the text labels ("G" for grown, "w" for waned).
How can I access Growing or Waning Patterns [Alerts]?
You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
Free indicator
Get free access to this indicator on the platforms below.
Unlock the entire LuxAlgo Library
Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.