OPEN-SOURCE SCRIPT

Keltner Hull Suite [QuantAlgo]

491
🟢 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®
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:
Pine Script®
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:
Pine Script®
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:
Pine Script®
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:
Pine Script®
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.
스냅샷
스냅샷
스냅샷
스냅샷
스냅샷

면책사항

해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.