Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: aider (openrouter/anthropic/claude-sonnet-4) <aider@aider.chat> Co-authored-by: Warp <agent@warp.dev>
8.4 KiB
STARCHANNEL: Stoller Average Range Channel
Overview and Purpose
The Stoller Average Range Channel (STARCHANNEL) is a volatility-based channel indicator that creates an adaptive price envelope using the Average True Range (ATR) to determine the band width around a simple moving average centerline. Developed by Manning Stoller, this indicator provides dynamic support and resistance levels that automatically adjust to changing market volatility conditions. Unlike fixed percentage envelopes, STARCHANNEL expands during volatile periods and contracts during calmer markets, offering more relevant and responsive trading signals.
The implementation uses efficient circular buffer calculations for both the simple moving average and ATR, ensuring optimal performance while properly handling data gaps and initialization. By combining the stability of a simple moving average with the adaptive nature of ATR-based width calculations, STARCHANNEL creates a volatility-normalized trading framework that adapts to each security's specific volatility characteristics.
Core Concepts
- Volatility-adaptive envelope: Channel automatically widens during volatile periods and narrows during calm markets, providing dynamic support/resistance levels
- SMA-centered structure: Uses a simple moving average of the price as the middle line, providing a stable reference point for mean reversion analysis
- ATR-based width: Calculates channel width using ATR multiplied by a configurable factor, making the bands proportional to actual market volatility
- Customizable sensitivity: Adjustable multiplier allows traders to fine-tune the channel to different trading styles, timeframes, and market conditions
STARCHANNEL improves upon traditional percentage-based channels by incorporating the ATR, which measures volatility based on a security's true range (accounting for gaps and limit moves). This approach ensures that the channel expands precisely when it should—during periods of high volatility—creating a more responsive and market-adaptive trading framework that reflects actual price movement characteristics.
Common Settings and Parameters
| Parameter | Default | Function | When to Adjust |
|---|---|---|---|
| Period | 20 | Lookback period for both SMA and ATR calculations | Shorter (10-15) for more responsiveness to recent volatility; longer (30-50) for more stable channel and filtered signals |
| ATR Multiplier | 2.0 | Determines channel width as a multiple of ATR | Higher (2.5-3.0) for wider channel and fewer signals; lower (1.0-1.5) for tighter channel and more frequent signals |
| Source | Close | Price data for the centerline calculation | Can be modified to use typical price (hlc3) for a more balanced view of price action |
Pro Tip: For a comprehensive trading framework, try using multiple STARCHANNEL settings simultaneously. A narrower channel (1.0-1.5× ATR) can help identify minor retracements and short-term entry points, while a wider channel (2.5-3.0× ATR) can be used for major support/resistance zones and stop placement.
Calculation and Mathematical Foundation
Simplified explanation: STARCHANNEL first calculates a middle line using a simple moving average of the source price. It then creates upper and lower channel boundaries by adding or subtracting the ATR (multiplied by a factor) from this middle line.
Technical formula:
Middle Line = SMA(Source, Period) Upper Channel = Middle Line + ATR(Period) × Multiplier Lower Channel = Middle Line - ATR(Period) × Multiplier
Where:
- SMA = Simple Moving Average
- ATR = Average True Range calculated using Wilder's smoothing
- Period = Lookback period for calculations
- Multiplier = Factor for channel width
🔍 Technical Note: The implementation uses optimized circular buffers to maintain rolling sums for SMA calculations and Wilder's smoothing method for ATR, ensuring O(1) computational complexity regardless of the lookback period. The ATR calculation includes proper initialization handling for early bars, with bias correction that prevents the common "warm-up effect" seen in many ATR implementations.
Interpretation Details
STARCHANNEL provides several analytical frameworks for trading decisions:
- Mean reversion opportunities: Price touching or briefly exceeding a channel boundary often suggests a potential reversal toward the middle line, especially in range-bound markets
- Trend strength assessment: In strong trends, price will regularly touch or slightly exceed the channel in the trend direction while respecting the opposite boundary
- Breakout confirmation: Sustained price movement beyond a channel boundary after a period of contraction often signals a genuine breakout rather than a false move
- Volatility shifts: Sudden expansion of channel width indicates increasing volatility that may precede significant price moves
- Support and resistance framework: The middle line often acts as the first support/resistance level, while the outer boundaries represent more significant levels
- Stop placement guide: The channel boundaries provide logical stop-loss placement points based on a security's actual volatility
- Timeframe alignment: Comparing STARCHANNEL across multiple timeframes can identify high-probability setups where support/resistance aligns
- Channel position analysis: Price position within the channel (upper third, middle third, lower third) can indicate potential reversal zones
Performance Profile
Operation Count (Streaming Mode, per Bar)
STARCHANNEL combines SMA (centerline) with ATR (band width):
| Operation | Count | Cost (cycles) | Subtotal |
|---|---|---|---|
| ADD/SUB | 6 | 1 | 6 |
| MUL | 3 | 3 | 9 |
| DIV | 2 | 15 | 30 |
| CMP/ABS/MAX | 3 | 1 | 3 |
| Total | 14 | — | ~48 cycles |
Breakdown:
- SMA update (running sum): 2 ADD + 1 DIV = 17 cycles
- True Range (3-way max): 2 SUB + 3 CMP = 5 cycles
- ATR (Wilder smoothing): 1 ADD + 1 MUL + 1 DIV = 19 cycles
- Band calculation: 1 ADD + 1 SUB + 2 MUL = 8 cycles
Complexity Analysis
| Mode | Complexity | Notes |
|---|---|---|
| Streaming | O(1) | Running sums for SMA, EMA for ATR |
| Batch | O(n) | Linear scan |
Memory: ~32 bytes (SMA sum, ATR state, previous close)
SIMD Analysis
| Optimization | Applicable | Notes |
|---|---|---|
| AVX2 vectorization | Partial | True Range calculation vectorizable |
| FMA | ✅ | Wilder smoothing: prev + alpha * (tr - prev) |
| Batch parallelism | ❌ | ATR recursive dependency |
Quality Metrics
| Metric | Score | Notes |
|---|---|---|
| Accuracy | 8/10 | ATR provides accurate volatility measure |
| Timeliness | 6/10 | SMA lag + ATR smoothing delay |
| Overshoot | 7/10 | Bands lag during volatility spikes |
| Smoothness | 8/10 | SMA centerline provides smooth reference |
Limitations and Considerations
- Lagging nature: As a moving average-based indicator incorporating ATR, the channel reacts to volatility changes with some delay
- Parameter sensitivity: Performance varies significantly based on period and multiplier settings, requiring optimization for specific securities
- False signals in trending markets: Channel touches may not indicate reversals during strong trends, potentially leading to premature position exits
- Complementary tool requirement: Most effective when combined with trend identification and momentum indicators
- Volatility regime changes: During sudden extreme volatility spikes, channel may widen with a delay, potentially after the optimal entry/exit point
- Lookback period trade-offs: Shorter periods increase responsiveness but also noise; longer periods provide stability but increase lag
- Mean reversion assumption: Implicitly assumes prices will revert to the mean (middle line), which doesn't always hold in strongly trending markets
- Gap handling: While ATR accounts for gaps, sudden large gaps can temporarily distort channel calculations
References
- Stoller, M. (1980s). Development of the Stoller Average Range Channel concept
- Wilder, J. W. (1978). New Concepts in Technical Trading Systems. Trend Research.
- Kaufman, P. J. (2013). Trading Systems and Methods (5th ed.). John Wiley & Sons.
- Murphy, J. J. (1999). Technical Analysis of the Financial Markets. New York Institute of Finance.
- Brooks, A. (2006). Reading Price Charts Bar by Bar. John Wiley & Sons.
- Elder, A. (2014). The New Trading for a Living. John Wiley & Sons.