Picture of the author

TradingView-RU

06/20 16:00

Adaptive Swing Timing Engine [AlgoPoint]

Adaptive Swing Timing Engine

Most swing indicators explain where a market reversal occurred after it has already happened.

Adaptive Swing Timing Engine focuses on a different dimension: time.

The indicator studies the number of bars between confirmed swing highs and swing lows, learns how bullish and bearish price legs have behaved historically, and projects statistical timing windows in which the next meaningful turn may become more likely.

Instead of presenting a single deterministic reversal date, the engine displays a probable timing range, a central estimate, a confidence score, and a near-term reversal probability.

HOW IT WORKS

1. VOLATILITY-ADAPTIVE SWING DETECTION

The engine identifies meaningful swing highs and lows using a hybrid reversal threshold based on:

• Average True Range
• Minimum percentage movement
• Minimum swing duration
• Confirmed candle closes

This allows the detector to adapt automatically as market volatility expands or contracts.

Three ready-to-use sensitivity profiles are included:

• Responsive — Detects smaller and more frequent market turns
• Balanced — Designed for general swing analysis
• Major Moves — Focuses on larger structural rotations
• Custom — Gives full control over the detection threshold

2. DIRECTIONAL CYCLE MEMORY

Bullish and bearish price legs are analyzed separately.

The model maintains independent historical distributions for:

• Swing Low → Swing High durations
• Swing High → Swing Low durations
• Swing High → Swing High full cycles
• Swing Low → Swing Low full cycles

This matters because bullish and bearish legs do not always develop at the same speed.

A market may rise gradually but decline rapidly, or behave in the opposite way. The engine preserves this timing asymmetry instead of forcing every movement into a single average.

3. ROBUST STATISTICAL MODEL

Simple averages can be distorted by unusually long trends or abnormal market events.

To reduce this problem, the engine uses:

• Median-based cycle estimation
• Median Absolute Deviation outlier control
• Recency-weighted observations
• Direction-specific cycle history
• Full-cycle agreement analysis

Recent market behavior receives greater influence, while extreme historical durations are prevented from dominating the forecast.

4. AGE-MATCHED CYCLE ANALYSIS

A confirmed swing may already be several bars old by the time the reversal threshold is completed.

The engine accounts for this confirmation delay.

When enough history is available, it only compares the current movement with previous cycles that survived beyond the current cycle age.

This prevents the model from projecting a reversal point that has already passed before the swing was confirmed.

5. PROBABILISTIC TIMING PROJECTION

The indicator can project up to three possible future swing turns.

Each projection contains:

• Main Timing Window — The central historical reversal range
• Wider Uncertainty Zone — An optional broader probability range
• Dashed Center Line — The model’s central timing estimate
• Expected Turn Type — Possible Swing High or Possible Swing Low
• Confidence Score — A 0–100 assessment of model quality

Later projections are displayed with reduced confidence because uncertainty naturally increases as the forecast horizon expands.

READING THE CHART

H / L MARKERS

H identifies a confirmed Swing High.

L identifies a confirmed Swing Low.

The marker is placed on the actual historical extreme, but only after the swing has been confirmed.

CONFIRMATION DOTS

Optional confirmation dots show the exact candle on which the indicator had enough information to confirm the swing.

This makes the difference between the historical extreme and the real-time confirmation moment fully transparent.

SWING PATH

The swing path connects confirmed market turning points and provides a clean visual representation of the active cycle structure.

COLORED TIMING WINDOW

The projected colored area represents the main period in which the next swing turn may become statistically more likely.

It should be treated as an attention zone, not as an automatic entry signal.

DASHED CENTER LINE

The dashed vertical line represents the center of the projected timing distribution.

It is not a guaranteed reversal bar.

SUMMARY PANEL

The dashboard provides a simplified real-time overview of:

• Expected next swing type
• Estimated timing
• Main reversal window
• Confidence level
• Current cycle age
• Near-term reversal chance
• Number of learned cycles
• Historical model error and coverage

NEAR-TERM REVERSAL CHANCE

The near-term percentage is calculated from comparable historical cycles.

For example, if the current cycle has lasted 20 bars, the model checks previous cycles that also lasted beyond 20 bars and measures how many ended within the selected future horizon.

This is an empirical historical probability, not a guaranteed forecast.

CONFIDENCE SCORE

The confidence score evaluates the quality of the timing model using several factors:

• Number of available cycle samples
• Stability of historical cycle durations
• Direction-specific data availability
• Agreement between half-cycle and full-cycle models
• Historical forecast calibration
• Availability of age-matched observations

Confidence measures model consistency. It does not represent the probability that the market must reverse.

HOW TO USE

1. Start with the Balanced sensitivity profile.

2. Allow the indicator to collect the required number of confirmed cycles.

3. Monitor the projected timing window as the current cycle matures.

4. Treat an active timing window as a period of increased attention.

5. Look for independent price confirmation such as:

• Market structure change
• Support or resistance reaction
• Liquidity sweep
• Momentum exhaustion
• Volume expansion
• Rejection candle
• Higher-timeframe confluence

6. Use Responsive mode for shorter market rotations and Major Moves mode for broader structural swings.

The timing model is designed as an analytical context tool. It should not be used as a standalone buy or sell system.

NON-REPAINTING AND CONFIRMATION

The swing engine processes confirmed candle closes.

Confirmed swing events are not continuously moved or recalculated after completion.

Historical H and L labels are positioned on the actual swing extremes only after sufficient reversal movement has confirmed them.

Optional confirmation dots reveal when those swing points became known to the model.

The script does not use future price data or lookahead calculations.

Because swing confirmation requires price to move away from an extreme, every confirmed swing system naturally contains some detection delay. The indicator displays this process transparently rather than hiding it.

ALERTS

The script includes alert conditions for:

• Main Reversal Window Started
• Projection Center Reached
• Projection Became Overdue
• Swing High Confirmed
• Swing Low Confirmed

LIMITATIONS

Market cycles are not fixed.

A sudden volatility expansion, news event, structural breakout, or persistent directional trend can cause the current movement to last significantly longer or shorter than its historical average.

The model also requires a minimum number of completed cycles before producing a meaningful projection.

On newly listed assets, limited chart histories, or very high swing thresholds, the learning phase may take longer.

The indicator forecasts timing conditions only. It does not provide a price target, guarantee a reversal, or predict the direction and magnitude of the next move.

Adaptive Swing Timing Engine is a probabilistic analysis framework — not a promise of future market behavior.

Elevate Your Trading ▶ qalphatrade.com
Trade with mathematical certainty,
not emotional guesswork.
#HTXCommunity4thAnniversary
LikeShare

All Comments0LatestHot

avatar
LatestHot