OPEN-SOURCE SCRIPT
Keltner Hull Suite [QuantAlgo]

🟢 Overview
The Keltner Hull Suite combines Hull Moving Average positioning with double-smoothed True Range banding to identify trend regimes and filter market noise. The indicator establishes upper and lower volatility bounds around the Hull MA, with the trend line conditionally updating only when price violates these boundaries. This mechanism distinguishes between genuine directional shifts and temporary price fluctuations, providing traders and investors with a systematic framework for trend identification that adapts to changing volatility conditions across multiple timeframes and asset classes.

🟢 How It Works
The calculation foundation begins with the Hull Moving Average, a weighted moving average designed to minimize lag while maintaining smoothness:
Pine Script®
The indicator then calculates true range and applies dual exponential smoothing to create a volatility measure that responds more quickly to volatility changes than traditional ATR implementations while maintaining stability through the double-smoothing process:
Pine Script®
Dynamic support and resistance boundaries are constructed by applying the multiplier-scaled volatility deviation to the Hull MA, creating upper and lower bounds that expand during volatile periods and contract during consolidation:
Pine Script®
The trend line employs a conditional update mechanism that prevents premature trend reversals. The system maintains the current trend line until price action violates the respective boundary, at which point the trend line snaps to the violated bound:
Pine Script®
Directional bias determination compares the current trend line value against its previous value, establishing bullish conditions when rising and bearish conditions when falling. Signal generation occurs on state transitions, triggering alerts when the trend state shifts from neutral or opposite direction:
Pine Script®
The visualization layer creates a trend band by plotting both the current trend line and a two-bar shifted version, with the area between them filled to create a visual channel that reinforces directional conviction.

🟢 How to Use This Indicator
▶ Long and Short Signals: The indicator generates long/buy signals when the trend state transitions to bullish (trend line begins rising) and short/sell signals when transitioning to bearish (trend line begins falling). These state changes represent structural shifts in momentum where price has broken through the adaptive volatility bands, confirming directional commitment.

▶ Trend Band Dynamics: The spacing between the main trend line and its shifted counterpart creates a visual band whose width reflects trend strength and momentum consistency. Expanding bands indicate accelerating directional movement and strong trend persistence, while contracting or flattening bands suggest decelerating momentum, potential trend exhaustion, or impending consolidation. Monitoring band width provides early warning of regime transitions from trending to range-bound conditions.

▶ Preconfigured Presets: Three optimized parameter sets accommodate different trading styles and timeframes. Default (14, 20, 2.0) provides balanced trend identification suitable for daily charts and swing trading, Fast Response (10, 14, 1.5) delivers aggressive signal generation optimized for intraday scalping and momentum trading on 1-15 minute timeframes, while Smooth Trend (18, 30, 2.5) offers conservative trend confirmation ideal for position trading on 4-hour to daily charts with enhanced noise filtration.
▶ Built-in Alerts: Three alert conditions enable automated monitoring - Bullish Trend Signal triggers on long setup confirmation, Bearish Trend Signal activates on short setup confirmation, and Trend Change alerts on any directional transition. These notifications allow you to respond to regime shifts without continuous chart monitoring.
▶ Color Customization: Five visual themes (Classic, Aqua, Cosmic, Ember, Neon, plus Custom) accommodate different chart backgrounds and display preferences, ensuring optimal contrast and visual clarity across trading environments.





The Keltner Hull Suite combines Hull Moving Average positioning with double-smoothed True Range banding to identify trend regimes and filter market noise. The indicator establishes upper and lower volatility bounds around the Hull MA, with the trend line conditionally updating only when price violates these boundaries. This mechanism distinguishes between genuine directional shifts and temporary price fluctuations, providing traders and investors with a systematic framework for trend identification that adapts to changing volatility conditions across multiple timeframes and asset classes.
🟢 How It Works
The calculation foundation begins with the Hull Moving Average, a weighted moving average designed to minimize lag while maintaining smoothness:
hullMA = ta.hma(priceSource, hullPeriod)
The indicator then calculates true range and applies dual exponential smoothing to create a volatility measure that responds more quickly to volatility changes than traditional ATR implementations while maintaining stability through the double-smoothing process:
tr = ta.tr(true)
smoothTR = ta.ema(tr, keltnerPeriod)
doubleSmooth = ta.ema(smoothTR, keltnerPeriod)
deviation = doubleSmooth * keltnerMultiplier
Dynamic support and resistance boundaries are constructed by applying the multiplier-scaled volatility deviation to the Hull MA, creating upper and lower bounds that expand during volatile periods and contract during consolidation:
upperBound = hullMA + deviation
lowerBound = hullMA - deviation
The trend line employs a conditional update mechanism that prevents premature trend reversals. The system maintains the current trend line until price action violates the respective boundary, at which point the trend line snaps to the violated bound:
if upperBound < trendLine
trendLine := upperBound
if lowerBound > trendLine
trendLine := lowerBound
Directional bias determination compares the current trend line value against its previous value, establishing bullish conditions when rising and bearish conditions when falling. Signal generation occurs on state transitions, triggering alerts when the trend state shifts from neutral or opposite direction:
trendUp = trendLine > trendLine[1]
trendDown = trendLine < trendLine[1]
longSignal = trendState == 1 and trendState[1] != 1
shortSignal = trendState == -1 and trendState[1] != -1
The visualization layer creates a trend band by plotting both the current trend line and a two-bar shifted version, with the area between them filled to create a visual channel that reinforces directional conviction.
🟢 How to Use This Indicator
▶ Long and Short Signals: The indicator generates long/buy signals when the trend state transitions to bullish (trend line begins rising) and short/sell signals when transitioning to bearish (trend line begins falling). These state changes represent structural shifts in momentum where price has broken through the adaptive volatility bands, confirming directional commitment.
▶ Trend Band Dynamics: The spacing between the main trend line and its shifted counterpart creates a visual band whose width reflects trend strength and momentum consistency. Expanding bands indicate accelerating directional movement and strong trend persistence, while contracting or flattening bands suggest decelerating momentum, potential trend exhaustion, or impending consolidation. Monitoring band width provides early warning of regime transitions from trending to range-bound conditions.
▶ Preconfigured Presets: Three optimized parameter sets accommodate different trading styles and timeframes. Default (14, 20, 2.0) provides balanced trend identification suitable for daily charts and swing trading, Fast Response (10, 14, 1.5) delivers aggressive signal generation optimized for intraday scalping and momentum trading on 1-15 minute timeframes, while Smooth Trend (18, 30, 2.5) offers conservative trend confirmation ideal for position trading on 4-hour to daily charts with enhanced noise filtration.
▶ Built-in Alerts: Three alert conditions enable automated monitoring - Bullish Trend Signal triggers on long setup confirmation, Bearish Trend Signal activates on short setup confirmation, and Trend Change alerts on any directional transition. These notifications allow you to respond to regime shifts without continuous chart monitoring.
▶ Color Customization: Five visual themes (Classic, Aqua, Cosmic, Ember, Neon, plus Custom) accommodate different chart backgrounds and display preferences, ensuring optimal contrast and visual clarity across trading environments.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
🚨 70% OFF Cyber Monday with code CM70 (ends Dec 5) ▶ whop.com/quantalgo/
📩 DM if you need any custom-built indicators or strategies.
📩 DM if you need any custom-built indicators or strategies.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
🚨 70% OFF Cyber Monday with code CM70 (ends Dec 5) ▶ whop.com/quantalgo/
📩 DM if you need any custom-built indicators or strategies.
📩 DM if you need any custom-built indicators or strategies.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.