已更新
[MAD] WaveBuilder

Get this and other exclusive indicators in Premium selection
This indicator is part of djmad's Paid Space. Subscribe for $19.00/month to use it on your charts along with the author's other exclusive indicators. You pay right on TradingView and get access straight away.
Explore Premium selection1. OVERVIEW
The WaveBuilder is a sophisticated multi-timeframe oscillator that combines the TCI (Trading Channel Index) calculation method with advanced smoothing techniques, dynamic channel formation, and customizable weighting systems. Rather than analyzing a single timeframe in isolation, this indicator synthesizes price momentum across multiple timeframes simultaneously, creating a composite signal that reveals both short-term volatility and longer-term trend strength.
TCI calculation
At its core, the indicator uses a lightly modified version of the TCI calculation
a technical indicator developed by AIQ Systems in 1986 as a smoothed evolution of Donald Lambert's Commodity Channel Index (CCI) from 1980. The TCI measures how far price has deviated from its average, normalized by volatility, then smoothed to reduce noise.
The calculation uses customizable periods: default values are n1 is 10 (channel periods) and n2 is 21 (average periods).
It processes the average price AP = (high + close + low) / 3, calculates ESA = exponential average of AP over n1 periods, measures deviation D = exponential average of |AP - ESA| over n1 periods, computes CI = (AP - ESA) / (0.015 * D), and finally produces TCI = exponential average of CI over n2 periods.
Pine Script®
What makes the WaveBuilder unique is how it treats timeframes. Instead of simply displaying the TCI from one period, it calculates the indicator across four different timeframe multipliers, then blends them together using weighted factors. You define a base timeframe, then specify multipliers for three additional timeframes (commonly 2x, 4x, and 8x the base). Each timeframe receives a weight factor that determines its influence - higher weights mean that timeframe dominates the calculation. This flexibility allows you to tune the indicator for scalping (emphasizing short timeframes) or swing trading (emphasizing longer timeframes) without changing your chart timeframe.
The Williams %R Component
The counter oscillator in the WaveBuilder (Timeframe 5) uses Williams %R (Williams Percent Range), a momentum indicator developed by Larry Williams in 1973. Williams, a legendary commodity trader and author, created this indicator to identify overbought and oversold market conditions by measuring where the current close sits relative to the high-low range over a given period.
The Williams %R calculation is elegantly simple yet powerful:
Pine Script®
This produces values between -100 (most oversold) and 0 (most overbought). The indicator essentially asks: "How close is the current price to the top of its recent range?" When price is at the highest high, %R equals 0. When price is at the lowest low, %R equals -100. Most trading occurs between these extremes.
In the WaveBuilder's implementation, the Williams %R calculation is transformed through a normalized percentage range function:
Pine Script®
The resulting wave passes through a dual smoothing system with various methods available (SMA, EMA, HMA, and advanced Ehlers filters). You mix these two averages using a configurable blend factor, then apply an optional power compression factor to normalize the signal range.
Pine Script®
The channel system provides overbought/oversold context through static boundaries, with an optional dynamic channel that adapts to recent wave behavior. Alert generation offers multiple modes from simple threshold crossings to sophisticated direction-change detection in extreme zones.
The complete signal flow: price data transforms into TCI values across timeframes → weighted combination with counter oscillator → dual averaging smoothing → power compression → comparison against channels → signal generation. This multi-timeframe synthesis helps you see when all timeframes align (high-conviction setups) versus mixed messages (low-conviction periods).
2. WAVE SETTINGS
The Wave Settings control how multiple timeframes are calculated and weighted to create the composite signal.
Base Timeframe Configuration:
Additional Timeframe Multipliers:
Wave Calculation Periods:
How Weighting Works:
Higher weights give that timeframe more influence. For day trading, you might use: F1=4 (base), F2=3 (2x), F3=2 (4x), F4=1 (8x). For swing trading, consider reversing: F1=1, F2=2, F3=3, F4=4 to emphasize longer timeframes.
3. COUNTER OSCILLATOR
The Counter Oscillator adds mean-reversion characteristics using Williams %R calculation to balance the primary TCI wave.
Settings:
Purpose:
The negative weight creates a counterbalancing effect. When the primary wave reaches extremes, the counter oscillator helps identify when the move has gone too far, providing early warning of potential reversals.
4. WAVE SMOOTHING AND MIXING
Controls how the raw wave signal is smoothed and refined before display.
Dual Averaging System:
Mixing Controls:
Available Smoothing Methods:
POW Factor Behavior:
5. CHANNEL LEVELS AND ALERT MODE
Defines overbought/oversold boundaries and signal generation conditions.
Static Channel:
Channel calculation: Upper = Width/2 + Shift, Lower = -Width/2 + Shift
Alert Modes:
Alert Display:
The "ChangeDir-Outside" mode is particularly effective - it waits for the wave to reach extremes, then alerts when five consecutive bars move one direction followed by a reversal bar, suggesting exhaustion and potential turning points.
6. DYNAMIC CHANNEL
Creates adaptive channel boundaries that respond to recent wave behavior rather than fixed levels.
Dynamic Averaging System:
Mixing and Integration:
How It Works:
The dynamic channel calculates smoothed averages of the wave signal itself, creating boundaries that adapt to recent volatility. The "mixin" parameter blends this dynamic channel back into the static channel, allowing hybrid operation where fixed thresholds adjust based on recent behavior.
7. SPEED OF CHANGE RATE
Visualizes momentum by showing how quickly the wave signal is moving.
Settings:
Interpretation:
The speed indicator is color-coded: green when accelerating, red when decelerating.
8. MULTIBIT SYSTEM
Allows the indicator to communicate with other indicators through encoded bit channels, enabling complex multi-indicator strategies.
Use Case Example:
A trend filter indicator sends a bullish signal through bit channel 1. The WaveBuilder receives this on "Input Bull = 1" and shifts its oversold threshold down by 10 points (Bull Offset = 10), making it harder to generate countertrend signals during strong uptrends. The WaveBuilder then outputs its own signals through different channels for consumption by other indicators.
9. SIGNAL PIPELINE
Understanding the complete data flow helps you know which settings affect what:
Stage 1 - Wave Calculation:
Price data → TCI calculation across 4 timeframes → Williams %R counter oscillator → Weighted combination
Stage 2 - Smoothing:
Combined wave → Average 1 smoothing → Average 2 smoothing → Mixed result
Stage 3 - Refinement:
Mixed wave → Power compression (POW factor) → Final wave signal
Stage 4 - Channel Formation:
Static channel boundaries → Dynamic channel calculation → Multibit modification → Final channel levels
Stage 5 - Signal Generation:
Wave position vs channels → Alert mode logic → Buy/sell signals → Multibit output
Stage 6 - Visualization:
Wave signal plot → Channel boundaries plot → Speed indicator plot → Alert markers
10. PRACTICAL CONFIGURATION EXAMPLES
Day Trading Setup (Fast Response):
Swing Trading Setup (Balanced):
Position Trading Setup (Smooth):
11. TROUBLESHOOTING & TIPS
Signal too noisy:
Signal too slow:
Too many false signals:
Not enough signals:
Best Practices:
The WaveBuilder is a sophisticated multi-timeframe oscillator that combines the TCI (Trading Channel Index) calculation method with advanced smoothing techniques, dynamic channel formation, and customizable weighting systems. Rather than analyzing a single timeframe in isolation, this indicator synthesizes price momentum across multiple timeframes simultaneously, creating a composite signal that reveals both short-term volatility and longer-term trend strength.
TCI calculation
At its core, the indicator uses a lightly modified version of the TCI calculation
a technical indicator developed by AIQ Systems in 1986 as a smoothed evolution of Donald Lambert's Commodity Channel Index (CCI) from 1980. The TCI measures how far price has deviated from its average, normalized by volatility, then smoothed to reduce noise.
The calculation uses customizable periods: default values are n1 is 10 (channel periods) and n2 is 21 (average periods).
It processes the average price AP = (high + close + low) / 3, calculates ESA = exponential average of AP over n1 periods, measures deviation D = exponential average of |AP - ESA| over n1 periods, computes CI = (AP - ESA) / (0.015 * D), and finally produces TCI = exponential average of CI over n2 periods.
What makes the WaveBuilder unique is how it treats timeframes. Instead of simply displaying the TCI from one period, it calculates the indicator across four different timeframe multipliers, then blends them together using weighted factors. You define a base timeframe, then specify multipliers for three additional timeframes (commonly 2x, 4x, and 8x the base). Each timeframe receives a weight factor that determines its influence - higher weights mean that timeframe dominates the calculation. This flexibility allows you to tune the indicator for scalping (emphasizing short timeframes) or swing trading (emphasizing longer timeframes) without changing your chart timeframe.
The Williams %R Component
The counter oscillator in the WaveBuilder (Timeframe 5) uses Williams %R (Williams Percent Range), a momentum indicator developed by Larry Williams in 1973. Williams, a legendary commodity trader and author, created this indicator to identify overbought and oversold market conditions by measuring where the current close sits relative to the high-low range over a given period.
The Williams %R calculation is elegantly simple yet powerful:
This produces values between -100 (most oversold) and 0 (most overbought). The indicator essentially asks: "How close is the current price to the top of its recent range?" When price is at the highest high, %R equals 0. When price is at the lowest low, %R equals -100. Most trading occurs between these extremes.
In the WaveBuilder's implementation, the Williams %R calculation is transformed through a normalized percentage range function:
The resulting wave passes through a dual smoothing system with various methods available (SMA, EMA, HMA, and advanced Ehlers filters). You mix these two averages using a configurable blend factor, then apply an optional power compression factor to normalize the signal range.
The channel system provides overbought/oversold context through static boundaries, with an optional dynamic channel that adapts to recent wave behavior. Alert generation offers multiple modes from simple threshold crossings to sophisticated direction-change detection in extreme zones.
The complete signal flow: price data transforms into TCI values across timeframes → weighted combination with counter oscillator → dual averaging smoothing → power compression → comparison against channels → signal generation. This multi-timeframe synthesis helps you see when all timeframes align (high-conviction setups) versus mixed messages (low-conviction periods).
2. WAVE SETTINGS
The Wave Settings control how multiple timeframes are calculated and weighted to create the composite signal.
Base Timeframe Configuration:
- Timeframe 1: Your base timeframe for calculations (e.g., 15m, 1h, 4h)
- Weight (F1): Influence of base timeframe in final calculation (default: 4)
- Factor (F1f): Multiplier applied to base timeframe (default: 1)
Additional Timeframe Multipliers:
- Multiplier 2/3/4: Multiplier values applied to base timeframe (default: 2x, 4x, 8x)
- Weight (F2/F3/F4): Influence of each timeframe (default: 3, 2, 1)
Wave Calculation Periods:
- Average fast (n1): Fast average period for TCI calculation (default: 10, hard-coded in formula)
- Average slow (n2): Slow average period for TCI calculation (default: 21, hard-coded in formula)
How Weighting Works:
Higher weights give that timeframe more influence. For day trading, you might use: F1=4 (base), F2=3 (2x), F3=2 (4x), F4=1 (8x). For swing trading, consider reversing: F1=1, F2=2, F3=3, F4=4 to emphasize longer timeframes.
3. COUNTER OSCILLATOR
The Counter Oscillator adds mean-reversion characteristics using Williams %R calculation to balance the primary TCI wave.
Settings:
- Timeframe multiplier (TF5f): Multiplier for counter oscillator timeframe (default: 1)
- Weight (F5): Influence of counter oscillator, typically negative (default: -0.2)
- Length: Williams %R lookback period (default: 14)
Purpose:
The negative weight creates a counterbalancing effect. When the primary wave reaches extremes, the counter oscillator helps identify when the move has gone too far, providing early warning of potential reversals.
4. WAVE SMOOTHING AND MIXING
Controls how the raw wave signal is smoothed and refined before display.
Dual Averaging System:
- Average 1 Type: Choose smoothing method (WMA, HMA, VWMA, LMA, RMA, SMA, EMA, Ehlers variants)
- Length 1: Period for first average (default: 5)
- Average 2 Type: Choose second smoothing method
- Length 2: Period for second average (default: 50)
Mixing Controls:
- Mixfactor AVG1-AVG2: Blend ratio between averages (default: 3)
- POW - Faktor: Power compression/expansion (default: 1.0)
Available Smoothing Methods:
- OFF (no smoothing)
- WMA, HMA, VWMA, LMA, RMA, SMA, EMA (standard methods)
- Ehlers EMA, Gaussian, Smoother, Supersmoother, Butterworth (advanced filters)
- Chebyshev I & II (specialized filters)
POW Factor Behavior:
- Values < 1.0: Compress extremes toward zero
- Value = 1.0: No change (linear)
- Values > 1.0: Expand extremes away from zero
5. CHANNEL LEVELS AND ALERT MODE
Defines overbought/oversold boundaries and signal generation conditions.
Static Channel:
- Channel Width: Distance between upper and lower boundaries (default: 180)
- Channel Shift Up/Down: Vertical offset for entire channel (default: 0)
Channel calculation: Upper = Width/2 + Shift, Lower = -Width/2 + Shift
Alert Modes:
- Outside: Signal active while wave is beyond channel boundaries
- CrossIn: Signal when wave crosses into oversold/overbought zones
- CrossOut: Signal when wave crosses back toward neutral
- ChangeDir-All: Signal on any momentum reversal (5-bar direction change)
- ChangeDir-Outside: Signal on momentum reversal only when in extreme zones (recommended)
Alert Display:
- Showalerts: Display arrow markers on chart when signals trigger
The "ChangeDir-Outside" mode is particularly effective - it waits for the wave to reach extremes, then alerts when five consecutive bars move one direction followed by a reversal bar, suggesting exhaustion and potential turning points.
6. DYNAMIC CHANNEL
Creates adaptive channel boundaries that respond to recent wave behavior rather than fixed levels.
Dynamic Averaging System:
- Channel Average 1 Type: First smoothing method for dynamic channel
- Length 1: Period for first dynamic average (default: 10)
- Channel Average 2 Type: Second smoothing method
- Length 2: Period for second dynamic average (default: 100)
Mixing and Integration:
- MA 1 / MA 2 mixfactor: Blend ratio between dynamic averages (default: 1)
- Mixin off dynamic in weight: How much dynamic channel affects static channel (default: 0)
- Smoothing Type: Additional smoothing for trend within dynamic channel
- Smoothing Length: Period for trend smoothing (default: 10)
How It Works:
The dynamic channel calculates smoothed averages of the wave signal itself, creating boundaries that adapt to recent volatility. The "mixin" parameter blends this dynamic channel back into the static channel, allowing hybrid operation where fixed thresholds adjust based on recent behavior.
7. SPEED OF CHANGE RATE
Visualizes momentum by showing how quickly the wave signal is moving.
Settings:
- Plot speed: Enable/disable speed visualization
- Speed scaling: Magnification factor for speed display (default: 3.0)
- Speed smoother: Smoothing method for speed calculation
- Speed length: Period for speed smoothing (default: 100)
Interpretation:
- High speed readings indicate rapid momentum changes
- Speed direction (up/down) shows acceleration/deceleration
- Divergences between wave and speed can signal exhaustion
- Fast movements into extremes often precede reversals
The speed indicator is color-coded: green when accelerating, red when decelerating.
8. MULTIBIT SYSTEM
Allows the indicator to communicate with other indicators through encoded bit channels, enabling complex multi-indicator strategies.
Use Case Example:
A trend filter indicator sends a bullish signal through bit channel 1. The WaveBuilder receives this on "Input Bull = 1" and shifts its oversold threshold down by 10 points (Bull Offset = 10), making it harder to generate countertrend signals during strong uptrends. The WaveBuilder then outputs its own signals through different channels for consumption by other indicators.
9. SIGNAL PIPELINE
Understanding the complete data flow helps you know which settings affect what:
Stage 1 - Wave Calculation:
Price data → TCI calculation across 4 timeframes → Williams %R counter oscillator → Weighted combination
Stage 2 - Smoothing:
Combined wave → Average 1 smoothing → Average 2 smoothing → Mixed result
Stage 3 - Refinement:
Mixed wave → Power compression (POW factor) → Final wave signal
Stage 4 - Channel Formation:
Static channel boundaries → Dynamic channel calculation → Multibit modification → Final channel levels
Stage 5 - Signal Generation:
Wave position vs channels → Alert mode logic → Buy/sell signals → Multibit output
Stage 6 - Visualization:
Wave signal plot → Channel boundaries plot → Speed indicator plot → Alert markers
10. PRACTICAL CONFIGURATION EXAMPLES
Day Trading Setup (Fast Response):
- Base Timeframe: 5m or 15m
- Weights: F1=4, F2=3, F3=2, F4=1 (emphasize shorter periods)
- Average 1: EMA, Length 3
- Average 2: SMA, Length 20
- Mixfactor: 2-3
- Channel Width: 120-150
- Alert Mode: ChangeDir-Outside
Swing Trading Setup (Balanced):
- Base Timeframe: 1h or 4h
- Weights: F1=2, F2=2, F3=3, F4=3 (balanced or emphasize longer)
- Average 1: LMA, Length 5
- Average 2: SMA, Length 50
- Mixfactor: 3
- Channel Width: 180-200
- Alert Mode: ChangeDir-Outside or CrossIn
Position Trading Setup (Smooth):
- Base Timeframe: 4h or D
- Weights: F1=1, F2=2, F3=3, F4=4 (emphasize longer periods)
- Average 1: HMA, Length 10
- Average 2: EMA, Length 100
- Mixfactor: 3-4
- Channel Width: 200-250
- Alert Mode: CrossIn or CrossOut
11. TROUBLESHOOTING & TIPS
Signal too noisy:
- Increase Average 2 length
- Move Mixfactor value towards slower average
- Use smoother averaging methods (HMA, Ehlers filters)
- Increase POW factor above 1.0 to compress small movements
Signal too slow:
- Increase weights on shorter timeframes (F1, F2)
- Reduce Average lengths
- Move Mixfactor value towards faster average
- Use more responsive averaging (EMA over SMA)
Too many false signals:
- Widen channel width
- Use "ChangeDir-Outside" alert mode
- Enable dynamic channel with appropriate weighting
- Increase counter oscillator influence (more negative F5)
Not enough signals:
- Narrow channel width
- Use "Outside" or "CrossIn" alert mode
- Reduce counter oscillator influence
Best Practices:
- Start with default settings and adjust incrementally
- Match base timeframe to your trading style
- Use higher weights on the timeframes most relevant to your strategy
- Test alert modes on historical data before live trading
- Consider enabling speed display to see momentum context
- Use dynamic channel for adaptive strategies
- Multibit system is advanced - start without it
版本注释
Cleanup of settingsLibrary Update
New timeframe calculation
版本注释
sry, screenshot was overwritten, new propper screenshot release版本注释
All colors now in setup, Pine script revision 6 update
Internal cleanup and documentation
telegram - @djmad_0815
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
telegram - @djmad_0815
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。