OPEN-SOURCE SCRIPT

Structural Volatility Expansion Strategy

164
Structural Volatility Expansion Strategy
Purpose

This strategy studies the relationship between confirmed market structure breaks and volatility regime shifts. Its objective is to participate in directional expansions that occur after structural confirmation, while filtering out low-volatility consolidations and false breakouts.

The script is intended for research and systematic evaluation, not predictive claims.

Methodology

The model combines three interacting components:

1. Confirmed Structural Break Logic

Market structure is derived using confirmed pivot highs and pivot lows.

A bullish structural break is defined as a close above the most recent confirmed pivot high.
A bearish structural break is defined as a close below the most recent confirmed pivot low.
Pivots require full bar confirmation, which prevents forward-looking bias and repainting.

This approach differs from simple rolling highest/lowest calculations by using structurally validated turning points.

2. Volatility Regime Classification

Volatility is measured using ATR relative to its moving average baseline.

Two regimes are defined:

Compression: ATR below its historical baseline.
Expansion: ATR above its historical baseline.

Trades are only allowed during expansion phases. This attempts to reduce participation during statistically lower-momentum environments.

3. Liquidity Sweep Filter

Breakouts that wick beyond structural levels but fail to close beyond them are treated as liquidity sweeps and are excluded.

This reduces exposure to stop-run reversals where structure appears broken intrabar but fails on close.

4. Higher Timeframe Alignment

Directional bias is determined using a higher timeframe moving average.

Long entries require higher timeframe close above its MA.
Short entries require higher timeframe close below its MA.
Lookahead is disabled to avoid repainting.

This introduces multi-timeframe confirmation without using future data.

Risk Management

Default strategy properties:

Initial capital: 10,000
Position sizing: 2% of equity per trade
Commission: 0.04%
Slippage: 2 ticks
Pyramiding: Disabled

Stops are ATR-based and targets use a fixed risk-reward multiple (default 2:1).

The position sizing is intentionally conservative and does not exceed commonly accepted sustainable risk thresholds.

Backtesting Transparency

When evaluating results:

Use markets with sufficient liquidity.
Ensure a dataset that generates a meaningful number of trades (ideally 100+).
Keep default commission and slippage settings unchanged.
Avoid optimizing inputs solely to maximize historical performance.

Performance results are dependent on instrument, timeframe, and historical period tested.

This script does not guarantee profitability and should be forward-tested before any live use.

Intended Use

This strategy is designed for:

Studying structural continuation patterns
Researching volatility regime transitions
Comparing breakout performance during expansion vs compression
Systematic strategy development

It is not intended as financial advice.

Originality Notes

The script:

Uses confirmed pivot-based structure rather than raw lookback highs/lows
Filters entries by volatility regime classification
Excludes wick-only structural violations
Applies non-repainting higher timeframe bias
Uses realistic transaction cost modeling

The logic emphasizes interaction between structure and volatility rather than indicator stacking.

Limitations & Responsible Use

This strategy has several important limitations:

Lag From Pivot Confirmation
Structural pivots require confirmation, which introduces delay. Signals may occur after a portion of the move has already developed.

ATR Sensitivity
Volatility classification depends on ATR relative to its baseline. During regime transitions, expansion signals may appear slightly late or briefly revert to compression.

Trend Dependency
The strategy performs best during directional market phases. Extended sideways environments may reduce performance even with volatility filtering.

Higher Timeframe Influence
The higher timeframe moving average is a smoothing mechanism and may not capture sudden macro shifts immediately.

Market Specific Behavior
Different asset classes (crypto, forex, equities, indices) exhibit different volatility cycles. Parameters may require testing across multiple datasets rather than optimization for a single instrument.

Backtest Limitations
Historical testing does not account for:

Liquidity variations
Execution delays
Psychological decision-making factors
Structural market changes over time

Forward testing and risk control are recommended before any real capital deployment.

Suggested Evaluation Approach

For objective evaluation:

Test across multiple years of data.
Use instruments with consistent liquidity.
Maintain realistic commission and slippage settings.
Avoid curve-fitting inputs to a specific historical window.
Compare results across trending and ranging environments.

Risk Disclaimer

This script is provided for research and educational purposes only.
It does not constitute investment advice.
All trading involves risk, and past performance does not guarantee future results.

Haftungsausschluss

Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.