OPEN-SOURCE SCRIPT

Helion Trend Weave [JOAT]

6 554
Helion Trend Weave [JOAT]

Introduction

The Helion Trend Weave is an open-source volatility-adaptive multi-MA ribbon overlay that self-adjusts its period lengths based on real-time ATR regime. In high-volatility environments, periods shorten for faster response; in calm markets, they lengthen for noise reduction. The ribbon consists of up to 12 moving average filaments with four-state color logic that provides instant trend phase recognition: dominant rise, fading rise, dominant fall, and fading fall. Beyond simple trend direction, HTW measures ribbon spread as a trend strength gauge, detects compression squeezes, identifies ribbon inversions (twists), and generates six distinct signal types — all with cooldown-based anti-overlap to keep the chart clean.

This indicator addresses a fundamental limitation of static moving average systems: fixed periods that work well in one volatility environment fail in another. A 20-period EMA that provides clean signals in a trending market produces whipsaws in a choppy one. HTW solves this by dynamically morphing all ribbon periods through a volatility ratio, while providing a comprehensive suite of trend diagnostics through its dashboard and signal architecture.

תמונת-בזק

Core Engine: Volatility Morphing

The adaptive period system works by computing a volatility ratio between a fast ATR and a slow ATR:

Pine Script®
float volReg = atrL != 0 ? atrS / atrL : 1.0 float adaptMult = adaptive ? math.max(adaptMin, math.min(adaptMax, 1.5 / volReg)) : 1.0


When short-term volatility exceeds long-term volatility (ratio > 1), the multiplier decreases below 1.0, shortening all periods for faster reaction. When volatility contracts (ratio < 1), the multiplier increases above 1.0, lengthening periods for noise filtering. The morph floor and ceiling are configurable to prevent extreme period distortion. Every filament in the ribbon is calculated as:

Period = max(2, round((basePeriod + index * spacing) * adaptMult))

This means the entire ribbon breathes with the market — expanding its lookback during calm periods and contracting it during volatile ones.

Multi-MA Ribbon Architecture

The ribbon supports up to 12 filaments using EMA, SMA, or SMMA calculation types. Each filament is computed with inline EMA/RMA logic at global scope to handle the series-int periods that result from adaptive morphing. The filaments are plotted with progressive transparency — the lead filament is vivid and thick, while trailing filaments fade gradually, creating a visual depth effect.

Four-State Color Logic

Rather than simple bullish/bearish coloring, HTW uses four states based on two conditions — trend direction (lead above/below anchor) and momentum (lead rising/falling):

  • Dominant Rise: Lead filament above anchor AND rising — strong bullish momentum
  • Fading Rise: Lead filament above anchor but NOT rising — bullish trend losing steam
  • Dominant Fall: Lead filament below anchor AND falling — strong bearish momentum
  • Fading Fall: Lead filament below anchor but NOT falling — bearish trend losing steam


The "fading" states are early warnings that a trend may be approaching exhaustion before an actual crossover occurs.

Trend Diagnostics

  • Ribbon Spread: The absolute distance between the fastest and slowest filaments, normalized by ATR. This serves as a volatility-adjusted trend strength gauge. The spread is percentile-ranked against its own history and classified as DOMINANT (>70th), DEVELOPING (30-70th), or DORMANT (<30th).
  • Alignment Score: Measures what percentage of filament segments are in correct sequential order (ascending for bull, descending for bear). LOCKED = 100% alignment, PARTIAL = 50%+, SCATTERED = below 50%. Full alignment is a powerful trend confirmation.
  • Spread Momentum: Rate of change of the normalized spread — EXPANDING, CONTRACTING, or FLAT. Expanding spread after compression often signals the beginning of a significant move.


Compression Chamber (Squeeze Detection)

The indicator percentile-ranks the raw ribbon spread against a configurable lookback. When the spread falls below the compression percentile threshold (default: 10th percentile), the ribbon is considered "squeezed" — a state that often precedes explosive directional moves. A subtle background aura highlights compression periods.

Signal Architecture

HTW generates six signal types, each with independent cooldown timers and a global anti-overlap system that ensures only one label appears per bar (priority: Cross > Surge > Twist > Fan > Snap > Drift):

  • IGNITE / QUENCH (Weave Cross): Lead filament crosses above or below the anchor filament — the core directional signal.
  • SURGE (Momentum Surge): Compression releases into rapid expansion — the ribbon was squeezed and is now expanding with directional conviction. This is a structural breakout signal.
  • TWIST LOCK: Ribbon inversion confirmed after a configurable number of bars of sustained new alignment. More conservative than a simple crossover.
  • FAN (Filament Fan): All filaments achieve perfect sequential order — a powerful trend confirmation that indicates full ribbon alignment.
  • SNAP (Snap Recoil): Price crosses the ribbon midpoint against the current trend direction while the ribbon has meaningful width. This is a mean-reversion signal.
  • DRIFT (Drift Fade): Trend force decays to dormant level — an exhaustion warning when the spread percentile drops below 15%.


Pine Script®
// Global anti-overlap: only one label per bar (priority order) bool doCross = (bullCross or bearCross) and not barUsed bool doSurge = (surgeUp or surgeDn) and not barUsed and not doCross bool doTwist = (twistBullEdge or twistBearEdge) and not barUsed and not doCross and not doSurge


תמונת-בזק

Command Panel (Dashboard)

A 12-row monospace dashboard displays real-time trend intelligence:

  • PHASE: Current four-state classification (Dominant Rise, Fading Rise, Dominant Fall, Fading Fall)
  • FORCE: Trend strength classification with percentile (DOMINANT / DEVELOPING / DORMANT)
  • APERTURE: Normalized ribbon spread with expansion/contraction direction
  • ALIGNMENT: Filament sequential order score (LOCKED / PARTIAL / SCATTERED)
  • MORPH: Current adaptive period multiplier (e.g., 0.75x in high vol, 1.8x in low vol)
  • COMPRESS: Whether the ribbon is currently in a squeeze state
  • WEAVE: Current MA type and filament count configuration
  • VOL REG: Raw volatility ratio (fast ATR / slow ATR)
  • MIDPOINT: Whether price is above or below the ribbon midpoint, with the midpoint price
  • LEAD PER / ANCHOR PER: Current effective periods after morphing


Input Parameters

Helix Parameters:
  • Filament Type: EMA, SMA, or SMMA (default EMA)
  • Origin Period: Fastest MA period (default 5)
  • Weave Depth: Number of filaments, 3-12 (default 8)
  • Filament Spacing: Period increment between filaments (default 5)
  • Volatility Morphing: Enable/disable adaptive periods (default on)


Morphic Tuning:
  • Impulse ATR / Anchor ATR: Fast and slow ATR periods for volatility ratio
  • Morph Floor / Ceiling: Minimum and maximum period multiplier bounds


Compression Chamber:
  • Compression Aura: Toggle squeeze background highlight
  • Chamber Lookback / Compression Percentile: Squeeze detection parameters


Signal Architecture:
  • Individual toggles for all six signal types
  • Twist Confirmation: Bars of sustained inversion required (default 2)


How to Use This Indicator

  • Watch for SURGE signals after compression periods — these often mark the beginning of significant directional moves.
  • Use the four-state color system to identify trend exhaustion early. "Fading" states warn that momentum is weakening before a crossover occurs.
  • FAN signals (full filament alignment) are powerful trend confirmations — they indicate that all timeframe layers of the ribbon agree on direction.
  • SNAP signals provide counter-trend opportunities when price crosses the ribbon midpoint against a wide ribbon — but use them with caution and additional confirmation.
  • Monitor the MORPH multiplier in the dashboard — extreme values (very low or very high) indicate unusual volatility conditions.
  • The ALIGNMENT metric helps distinguish between clean trends (LOCKED) and choppy conditions (SCATTERED).


Limitations

  • Moving average ribbons are inherently lagging — the adaptive morphing reduces but does not eliminate this lag.
  • Compression detection identifies potential breakout setups but does not predict breakout direction.
  • The adaptive period system can produce rapid period changes during volatile transitions, which may cause visual noise in the ribbon.
  • SNAP (mean reversion) signals are counter-trend and carry higher risk than trend-following signals.
  • The indicator works best on liquid instruments with consistent price action. Thin markets may produce unreliable morphing behavior.
  • Signal cooldowns prevent spam but may also suppress valid signals that occur in rapid succession.


Originality Statement

This indicator is original in its integration of volatility-adaptive period morphing with comprehensive ribbon diagnostics. While moving average ribbons are a known concept, HTW is justified because:

  • The ATR-ratio-based period morphing dynamically adjusts all filament periods simultaneously, creating a ribbon that breathes with market volatility — unlike static ribbon indicators.
  • Four-state color logic (rising/falling crossed with above/below) provides phase recognition beyond simple bullish/bearish classification.
  • The alignment scoring system quantifies ribbon sequential order as a percentage, providing a measurable trend quality metric.
  • Six distinct signal types with priority-based anti-overlap and independent cooldowns create a clean, non-cluttered signal architecture.
  • Compression detection integrated directly into the ribbon spread provides squeeze identification without requiring a separate indicator.
  • The comprehensive 12-row dashboard presents trend diagnostics including effective morphed periods, spread momentum, and alignment state.


Disclaimer

This indicator is provided for educational and informational purposes only. It is not financial advice. Moving average systems identify trends after they begin and cannot predict future price direction. Past trend patterns do not guarantee future behavior. Always use proper risk management and conduct your own analysis before making trading decisions. The author is not responsible for any losses incurred from using this tool.

-Made with passion by officialjackofalltrades

כתב ויתור

המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.