OPEN-SOURCE SCRIPT
Cập nhật

RevertEdge V2

424
RevertEdge V2 — Mean Reversion Confidence Engine

RevertEdge answers a question that most indicators ignore: price IS extended, but should you trust the snap-back? It measures the probability that an overextended price will revert to the mean rather than continue into a new range. It does not tell you where price is extended (pair it with ATR envelopes, Bollinger Bands, or Donchian channels for that). RevertEdge tells you how confident to be in the reversion once extension is identified.

HOW IT WORKS

RevertEdge combines six independent factors into a single confidence score from 0 to 100. Each factor captures a different dimension of exhaustion or continuation, and all six must be considered together for reliable assessment.

Volume Exhaustion measures whether participation is drying up at the extreme. When volume declines at extension, the move is running out of fuel and reversion probability increases. When volume surges at extension, the trend may be accelerating and reversion is less likely.

Momentum Fade tracks whether trend energy (ADX) is declining or strengthening at the extreme. A strong trend that is losing steam at extension is prime reversion territory. A strong trend that is still accelerating warns that the move may continue.

Displacement Depth measures how far beyond the extension threshold price has traveled. Deeper displacement means more distance to revert and a stronger gravitational pull back toward the mean.

Activity and Basis Divergence (crypto mode only) uses a volume-times-volatility proxy for open interest participation. When activity declines while price extends, participants are not supporting the move. A basis proxy (price vs VWMA spread) detects squeeze fuel from funding imbalances.

Extension Duration counts how many consecutive bars price has spent beyond the extension threshold. Brief spikes beyond envelopes revert far more reliably than sustained extensions, which may represent a new range being established. The score decays exponentially as bars accumulate.

Volatility Compression detects whether candle ranges (ATR) are shrinking at the extreme. Declining ATR at extension means the bars themselves are exhausting, a mechanical signal that the move is losing energy at the most fundamental level.

READING THE OUTPUT

The output is a bipolar histogram centered on zero. Negative bars (buy-side) indicate lower extension with reversion confidence pointing toward a bounce. Positive bars (sell-side) indicate upper extension with reversion confidence pointing toward a pullback. The magnitude tells you how confident to be.

Scores above 70 indicate very high reversion confidence where most factors align. Scores from 50 to 70 indicate a favorable setup with multiple factors present. Scores from 25 to 50 represent moderate confidence where some factors support reversion but others do not. Scores below 25 suggest the extension may continue and reversion is not well supported.

The histogram color transitions from white (low) through yellow and orange to red (very high) as confidence increases, regardless of direction.

A reversion momentum line (toggleable) overlays the histogram showing whether confidence is accelerating or decelerating. When the histogram is elevated and the momentum line is turning in the reversion direction, that is a timing signal.

IMPORTANT: The score is only meaningful when price is actually extended beyond its normal range. A high score near the midline means nothing. Always confirm extension first using envelope or channel indicators before reading the RevertEdge confidence level.

KEY FEATURES

All six component weights are adjustable and auto-normalize to sum to 100 by default, so you can emphasize the factors most relevant to your asset class without accidentally breaking the score scale.

Crypto Mode enables the activity and basis divergence factor. Equities Mode disables it and redistributes the weight proportionally across the other five factors.

The adaptive Donchian midline adjusts its period based on ATR velocity, matching the adaptive behavior used in complementary indicators.

The component table shows each factor's individual score, percentage contribution, and current state. This lets you see exactly what is driving the composite reading rather than relying on a single number.

Alerts fire when high confidence setups appear at extension (score above 70 at upper or lower extension) and when extended price shows low reversion confidence (warning that the move may continue).

BEST USED WITH

RevertEdge is designed as a companion indicator. It pairs naturally with ATR envelope overlays, Donchian channels, Bollinger Bands, or any system that identifies where price is statistically extended. Use those to find the extension. Use RevertEdge to decide whether to fade it.
Phát hành các Ghi chú
cosmetic

Thông báo miễn trừ trách nhiệm

Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.