OPEN-SOURCE SCRIPT

Swing Structure Bands [ChartPrime]

16 360
⯁ OVERVIEW
Swing Structure Bands is a structure-based trend and reaction indicator that builds adaptive price bands directly from swing highs and swing lows.
Instead of using fixed-length moving averages, the bands dynamically adjust their length based on how long price has been forming higher highs or lower lows, allowing the indicator to naturally align with real market structure.

스냅샷
This makes the tool especially effective for identifying swing-based support and resistance, trend continuation zones, and exhaustion reactions.

⯁ CORE CONCEPT
The indicator continuously tracks:
  • The most recent swing high and swing low over a configurable swing window.
  • How long price has been developing since each swing point.
  • Dynamic moving averages whose length grows with the swing itself.
    스냅샷


As long as price respects the current swing direction, the bands extend and adapt.
When structure breaks, the system resets and starts forming new swing-based bands.

⯁ SWING DETECTION LOGIC
  • A Swing High is detected when price forms a local maximum relative to the swing lookback.
  • A Swing Low is detected when price forms a local minimum relative to the swing lookback.
  • Direction flips when price transitions from forming highs to forming lows, or vice versa.

스냅샷
Each confirmed swing is marked on the chart, giving clear structural context.

⯁ ADAPTIVE BAND CONSTRUCTION
  • Upper bands are derived from swing highs.
  • Lower bands are derived from swing lows.
  • Band length dynamically increases as the swing develops.
  • Multiple MA types can be used (SMA, EMA, SMMA/RMA, WMA, VWMA).
    스냅샷


ATR is applied as an offset to create upper and lower envelopes around each band, forming a volatility-aware structure channel.
스냅샷


⯁ VOLATILITY FILTERING
  • If the band moves too aggressively relative to ATR, it is temporarily disabled.
  • This prevents unstable or noisy bands during sudden expansions.
  • Bands only remain active when price structure is stable.
    스냅샷


This logic keeps the indicator focused on meaningful swings rather than short-term spikes.

⯁ REACTION & SIGNAL LOGIC
  • Sell signals appear when price crosses down from the upper swing band after sufficient stabilization.
    스냅샷
  • Buy signals appear when price crosses up from the lower swing band after sufficient stabilization.
    스냅샷
  • Cooldown logic prevents signal clustering.


Signals are designed as structure reactions, not momentum breakouts.

⯁ VISUAL STRUCTURE CLARITY
  • Separate bullish and bearish bands with customizable colors.
  • Optional band envelopes for visual depth.
  • Clear swing labels marking structural turning points.
  • Diamond markers highlight reaction zones.
    스냅샷


The visualization emphasizes where price reacts to structure rather than where it accelerates.

⯁ HOW TO USE
  • Use upper bands as dynamic resistance during bearish or corrective phases.
  • Use lower bands as dynamic support during bullish phases.
  • Combine band reactions with higher-timeframe trend direction.
  • Look for confirmations near bands rather than mid-range entries.


The indicator works best as a structure framework rather than a standalone signal generator.

⯁ IDEAL MARKET CONDITIONS
  • Trending markets with clear swing development.
  • Markets transitioning from impulse to correction.
  • Crypto, forex, indices, and liquid stocks.


⯁ CONCLUSION
Swing Structure Bands offers a structurally grounded alternative to traditional moving average channels.
By anchoring bands to real swing behavior and adapting dynamically over time, it provides traders with a clearer view of where price is reacting, pausing, or potentially reversing within the broader market structure.

면책사항

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