Systemicalpha

Vortex

systemic:core-viIndicatorsfunction1 cr

Inputs

NameTypeDescription
WindowintegerThe number of periods over which to sum the Vortex Movements and True Range.
Price HighfloatarrayThe highest price reached during each period. This is essential for calculating **Positive Vortex Movement** ($VM^+$).
Price LowfloatarrayThe lowest price reached during each period. This is essential for calculating **Negative Vortex Movement** ($VM^-$).
Price ClosefloatarrayThe closing price at the end of each period. This is essential for calculating the **True Range** (TR) component.

Outputs

NameTypeDescription
+VIfloatarrayMeasures the strength of upward price movement over the specified window.
-VIfloatarrayMeasures the strength of downward price movement over the specified window.
DifferencefloatarrayThe difference between +VI and -VI, providing a single-line view of trend direction and strength.

The Vortex Indicator detects the start of new trends or the continuation of existing ones. Developed by Etienne Botes and Douglas Siepman (published January 2010 in Technical Analysis of Stocks & Commodities), it draws inspiration from an unexpected source: the spiraling motion of water observed by Austrian naturalist Viktor Schauberger. Just as water forms vortex patterns flowing around obstacles, price movements in financial markets exhibit similar rotational dynamics between buyers and sellers.

Two oscillating lines—VI+VI^+ (positive vortex) and VI−VI^- (negative vortex)—capture upward and downward directional pressure:

VI+=∑i=1nVMi+∑i=1nTRiVI−=∑i=1nVMi−∑i=1nTRiVI^+ = \frac{\sum_{i=1}^{n} VM^+_i}{\sum_{i=1}^{n} TR_i} \qquad VI^- = \frac{\sum_{i=1}^{n} VM^-_i}{\sum_{i=1}^{n} TR_i}

Where nn is the lookback window (commonly 14 periods).


The Mathematics: Why It Works

Understanding why the Vortex Indicator captures trend direction requires examining each component:

Step 1: Vortex Movement (VM)

The vortex movement measures directional thrust by connecting price extremes across consecutive bars:

VM+=∣Hightoday−Lowyesterday∣VM^+ = |High_{today} - Low_{yesterday}| VM−=∣Lowtoday−Highyesterday∣VM^- = |Low_{today} - High_{yesterday}|

Why absolute values? — We care about the magnitude of directional movement, not whether it's positive or negative. A large VM+VM^+ indicates strong upward thrust regardless of whether price closed higher.

The visual pattern: If you connect each bar's low to the next bar's high (and vice versa), you trace a spiral pattern resembling a vortex—hence the name.

Step 2: True Range (TR)

True Range normalizes the vortex movement against overall volatility:

TR=max⁡(High−Low,  ∣High−Closeprev∣,  ∣Low−Closeprev∣)TR = \max\left(High - Low, \; |High - Close_{prev}|, \; |Low - Close_{prev}|\right)

Why normalize by TR? — Without normalization, VMVM values would be meaningless across different price levels. A 5movementmeansmorefora5 movement means more for a 50 stock than a $500 stock. TR-normalization makes VI comparable across assets and time periods.

Step 3: Summation and Ratio

Summing over nn periods smooths noise:

VI+=∑VM+∑TRVI−=∑VM−∑TRVI^+ = \frac{\sum VM^+}{\sum TR} \qquad VI^- = \frac{\sum VM^-}{\sum TR}

Both lines oscillate around 1.0, with values typically ranging from 0.7 to 1.3. The ratio represents what fraction of total range is attributable to each directional movement.


Calculation Pipeline

flowchart TD
    subgraph Input["Price Inputs"]
        H["High"]
        L["Low"]
        C["Close"]
    end
    
    subgraph VM["Vortex Movement"]
        VMP["VM+ = |High - Prior Low|"]
        VMM["VM- = |Low - Prior High|"]
    end
    
    subgraph TR["True Range"]
        TRC["TR = max(H-L, |H-PC|, |L-PC|)"]
    end
    
    subgraph Sum["Sum over n periods"]
        SVP["Σ VM+"]
        SVM["Σ VM-"]
        STR["Σ TR"]
    end
    
    subgraph Output["Final Indicators"]
        VIP["VI+ = Σ VM+ / Σ TR"]
        VIM["VI- = Σ VM- / Σ TR"]
        DIFF["Difference = VI+ - VI-"]
    end
    
    H --> VMP & TRC
    L --> VMM & TRC
    C --> TRC
    H --> VMM
    L --> VMP
    VMP --> SVP
    VMM --> SVM
    TRC --> STR
    SVP --> VIP
    SVM --> VIM
    STR --> VIP & VIM
    VIP --> DIFF
    VIM --> DIFF

Multi-Frequency Input Handling

The Vortex Indicator requires three synchronized price series: High, Low, and Close. When these inputs come from different data sources or frequencies, Systemic automatically aligns them through upsampling and padding.

How Alignment Works

ScenarioSystem Behavior
Different frequencies (e.g., 1h High, 15m Low)Lower-frequency data is upsampled by repeating the last value until the next data point
Different lengthsShorter series are padded by repeating their final value
Gaps in dataThe previous valid value is carried forward

Impact on VI Calculations

Upsampling artifacts: When High/Low/Close data are sampled at different rates, the calculated VM+VM^+ and VM−VM^- may show artificial stability during periods where one series is being repeated. This can:

  • Delay crossover signals
  • Understate volatility in the True Range calculation
  • Create false consolidation patterns

Best practice: Use High, Low, and Close from the same data source and frequency whenever possible. If mixing frequencies is unavoidable, prefer lower-frequency inputs (e.g., daily over hourly) to minimize upsampling distortion.


Missing Data

VI needs High, Low, and Close on a bar for it to count; a missing bar (data gap, weekend, holiday) never gets a fabricated value — it shows as a gap on all three outputs (+VI, -VI, Difference), never a stale carried-forward ratio or a sentinel 0. The Window setting means N bars actually observed, not N calendar slots: on a market-closed gap, the True Range and Vortex Movement sums keep counting back through real bars, bridging straight from the last session before the gap to the first session after it. Until the first window+1 observed bars accumulate (the extra bar covers the prior-bar reference every Vortex Movement needs), +VI/-VI/Difference have no value yet. A flat window (High, Low, and Close all constant) makes True Range and both Vortex Movements zero every bar — the ratio is an honest 0/0, which surfaces as a gap rather than a divide-by-zero artifact.


Interpreting the Vortex Indicator

Crossover Signals

flowchart LR
    subgraph Bullish["Bullish Signal"]
        B1["VI+ crosses above VI-"]
        B2["Uptrend beginning"]
    end
    
    subgraph Bearish["Bearish Signal"]
        R1["VI- crosses above VI+"]
        R2["Downtrend beginning"]
    end
    
    B1 --> B2
    R1 --> R2
EventInterpretationAction
VI+ crosses above VI-Bullish momentum dominatesConsider long positions
VI- crosses above VI+Bearish momentum dominatesConsider short positions or exit longs
Lines divergingTrend strengtheningHold current position
Lines convergingTrend weakeningPrepare for potential reversal

Trend Strength via Spread

The difference between VI+ and VI- quantifies trend conviction:

Spread (VI+ − VI-)Interpretation
> +0.10Strong bullish trend
+0.05 to +0.10Moderate bullish trend
-0.05 to +0.05Neutral / consolidation
-0.10 to -0.05Moderate bearish trend
< -0.10Strong bearish trend

Parameter Selection

WindowBehaviorBest For
7-10Sensitive, more signals, more noiseShort-term / day trading
14 (default)Balanced sensitivity and reliabilitySwing trading
21-34Smoother, fewer false signalsPosition trading, macro trends
55+Very smooth, only major trend changesLong-term investing

The original authors recommend longer periods (21+) on shorter timeframes to filter noise—for example, a 34-period VI on 5-minute charts.


Real-World Applications

1. Cryptocurrency Trend Regime Detection

Cryptocurrency markets exhibit strong trending behavior punctuated by violent reversals. The Vortex Indicator excels in these conditions because:

  • High volatility produces clear VI+/VI- separation during trends
  • Momentum-driven moves create sustained crossovers (unlike mean-reverting assets)
  • 24/7 trading means trends develop without overnight gaps distorting signals

Application: Use VI crossovers to identify regime shifts between trending and consolidating phases. When |VI+ − VI-| > 0.15, the asset is likely in a strong trend; when the spread collapses below 0.05, expect range-bound behavior.

Research opportunity: Compare VI crossover performance across different crypto market cap tiers. Do large-caps (BTC, ETH) produce cleaner signals than small-caps?

2. Sector Rotation Timing

Sector ETFs (Technology, Healthcare, Energy, Financials, etc.) rotate in and out of favor based on economic cycles. The Vortex Indicator can help time these rotations:

Strategy concept:

  1. Monitor VI+ and VI- on major sector ETFs (e.g., XLK, XLV, XLE, XLF)
  2. When a sector's VI+ crosses above VI- while others show VI- dominance, capital may be rotating into that sector
  3. Confirm with relative strength against the broad market (SPY)

Why this works: Sector rotation is fundamentally about trend changes—money flowing from one sector to another. VI captures precisely this transition point.

Caution: Sector moves can be slow (weeks to months). Use longer VI windows (21-34 periods) on daily charts to filter noise.


VI vs. Alternative Trend Indicators

AspectVortex IndicatorADX/DMIMACD
Lines2 (VI+, VI-)3 (ADX, DI+, DI-)3 (MACD, Signal, Histogram)
Crossover signalsDirect from VI+/VI-Requires DI+/DI- crossoverMACD/Signal crossover
Trend strengthImplied by spreadExplicit ADX value (0-100)Histogram height
InspirationNatural vortex motionDirectional movementPrice momentum
ComplexityLowMediumMedium
Best forTrend identificationTrend strength filteringMomentum divergences

When to prefer VI: You want a simple, dual-line system with clear crossover signals and minimal complexity.

When to prefer ADX: You need an explicit trend strength threshold (e.g., "only trade when ADX > 25").

When to prefer MACD: You're looking for momentum divergences or confirmation of trend exhaustion.


When VI Works Well

  • Trending markets — VI crossovers capture directional moves effectively
  • High-volatility assets — Clear separation between VI+ and VI-
  • Breakout identification — Crossover often occurs near breakout points
  • Multi-asset screening — Normalized values allow comparison across assets

When VI Struggles

  • Sideways/choppy markets — Frequent crossovers create whipsaws
  • Low-volatility environments — VI+ and VI- cluster together, signals unclear
  • Fast reversals — Lagging nature means you enter/exit late
  • News-driven moves — Sudden gaps can cause erratic readings

Advantages

  • Dual perspective — Simultaneously tracks bullish and bearish pressure
  • Clear entry signals — Crossovers provide unambiguous trade triggers
  • Universal applicability — Works across stocks, forex, crypto, commodities
  • Theoretically grounded — Based on observable market dynamics, not arbitrary smoothing

Limitations

  • Lagging indicator — Signals confirm trends rather than predict them
  • Whipsaw prone — False crossovers in consolidating markets
  • No price targets — Indicates direction but not magnitude
  • Parameter sensitive — Different windows yield different results; requires optimization

Further Reading


Indicator Assessment

%%{init: {'theme': 'base', 'themeVariables': { 'cScale0': '#2563eb', 'cScale1': '#7c3aed'}}}%%
quadrantChart
    title Vortex Indicator Assessment
    x-axis Low Complexity --> High Complexity
    y-axis Low Reliability --> High Reliability
    quadrant-1 Complex & Reliable
    quadrant-2 Simple & Reliable
    quadrant-3 Simple & Unreliable
    quadrant-4 Complex & Unreliable
    Stocks: [0.45, 0.70]
    Crypto: [0.45, 0.65]
DimensionStocksCryptoNotes
Popularity5/106/10Moderately known; less popular than ADX/DMI but gaining awareness
Reliability7/106/10Strong in trending markets; prone to whipsaws during consolidation
Complexity4/104/10Straightforward calculation; easy crossover interpretation
Versatility7/107/10Works across timeframes and asset classes; normalized for comparison
Recent Interest6/107/10Growing interest in crypto trading communities; sector rotation applications emerging
Rendering diagrams...
© 2026 WanoLabs. All rights reservedAlpha build v0.1.5