INVITE-ONLY SCRIPT
업데이트됨 Mean Reversion Framework [LTS]

LHAMA Trading Suite's Mean Reversion Framework is a VWAP-centric mean reversion and exhaustion tool that combines volatility regimes, volume-weighted extension zones, and multi-oscillator divergence detection into a single framework. It is designed to help traders quickly answer three questions on any chart:
Core components
1. Adaptive VWAP with standard deviation bands
The framework builds around a dynamically anchored VWAP with statistical bands:
Anchoring is automatic and timeframe-aware. When you change your charts timeframe, this will automatically adjust what VWAP you are looking at to make sure you're always using the anchoring research has shown to be most appropriate and relevant for that timeframe.
2. Reversion candle coloring
To highlight potentially climactic moves:

The ideal reversion setup is a quick extension into the marked zone, which includes a high volume, small body candle at its peak, surrounded by lower volume candles in opposite directions. This shows an energetic push in one direction, followed by exhaustion and a fade back toward the mean.
3. Volatility regime detection
The script classifies the current volatility regime using ATR:
The current regime and ATR percentile are displayed on the dashboard and can be used as context for whether mean-reversion setups may be more or less favorable. Alerts can fire when volatility crosses into high or low regimes so users can adjust expectations or strategies if desired.
4. RSI & Stochastic divergence framework
The indicator includes a combined divergence engine using RSI and Stochastic:
For both RSI and Stochastic, the script looks for:
When conditions are met, the script will:
Divergence labels are based on confirmed pivots, so they appear with a delay relative to the pivot bar. They are not predictive and should be treated as contextual information rather than standalone trade signals.
5. Dashboard overlay
An on-chart dashboard summarizes the most important state variables in a compact table:
The dashboard can be toggled on or off and moved to any corner of the chart (top/bottom, left/right).
6. Alert system & cooldown
The script defines multiple alert conditions so users can build their own rules around mean reversion and volatility changes:
To reduce alert noise around VWAP resets, there is an optional alert cooldown:
Users can disable the cooldown by setting its duration to 0.
- How far is price stretched away from VWAP in standard deviations?
- Is the current environment favorable or hostile to mean reversion?
- Are there momentum divergences supporting a reversal or trend continuation idea?
Core components
1. Adaptive VWAP with standard deviation bands
The framework builds around a dynamically anchored VWAP with statistical bands:
- VWAP line plotted from a rolling anchor point.
- Standard deviation bands: ±1σ, ±2σ, ±2.5σ, and ±3σ around VWAP.
- Extension zones: the area between ±2.5σ and ±3σ is highlighted as an “extension zone,” where price is statistically stretched from its mean.
Anchoring is automatic and timeframe-aware. When you change your charts timeframe, this will automatically adjust what VWAP you are looking at to make sure you're always using the anchoring research has shown to be most appropriate and relevant for that timeframe.
2. Reversion candle coloring
To highlight potentially climactic moves:
- The script tracks a configurable volume average and multiplier.
- When price touches the ±2.5σ extension zone and a candle meets one of these conditions, candles can be recolored:
Has above average volume, but below average candle body size.
Has lower volume than the previous candle. - An optional alert can be triggered when these extension touches occur.
The ideal reversion setup is a quick extension into the marked zone, which includes a high volume, small body candle at its peak, surrounded by lower volume candles in opposite directions. This shows an energetic push in one direction, followed by exhaustion and a fade back toward the mean.
3. Volatility regime detection
The script classifies the current volatility regime using ATR:
- Calculates ATR over a user-defined lookback.
- Computes the percentile rank of current ATR relative to its recent history.
- Labels the environment as:
- HIGH volatility (ATR percentile at or above the high threshold).
- LOW volatility (at or below the low threshold).
- MODERATE otherwise.
- HIGH volatility (ATR percentile at or above the high threshold).
The current regime and ATR percentile are displayed on the dashboard and can be used as context for whether mean-reversion setups may be more or less favorable. Alerts can fire when volatility crosses into high or low regimes so users can adjust expectations or strategies if desired.
4. RSI & Stochastic divergence framework
The indicator includes a combined divergence engine using RSI and Stochastic:
- User-configurable RSI length.
- User-configurable Stochastic K/D parameters.
- Pivot-based detection with left/right lookbacks and a max lookback window.
- Two main categories:
- Regular divergences – potential reversal context.
- Hidden divergences – potential trend continuation context.
- Regular divergences – potential reversal context.
For both RSI and Stochastic, the script looks for:
- Bullish regular: price lower low vs. oscillator higher low.
- Bearish regular: price higher high vs. oscillator lower high.
- Hidden bullish: price higher low vs. oscillator lower low.
- Hidden bearish: price lower high vs. oscillator higher high.
When conditions are met, the script will:
- Plot labels on the price chart:
🔃 icons for regular (reversal) divergences.
⏩ icons for hidden (continuation) divergences. - Combine RSI and Stochastic confirmation into a single label when both agree, with tooltips explaining:
Price structure (HH/HL/LL/LH).
Which oscillator(s) confirmed the divergence.
Whether the pattern suggests potential reversal or continuation. - Optionally trigger alerts for each divergence type when alerts are enabled.
Divergence labels are based on confirmed pivots, so they appear with a delay relative to the pivot bar. They are not predictive and should be treated as contextual information rather than standalone trade signals.
5. Dashboard overlay
An on-chart dashboard summarizes the most important state variables in a compact table:
- VWAP Anchor – shows the effective anchor logic currently in use (“Session/Week/Month”, “5-Day Rolling” or “Yearly (Jan 1)”).
- Alert Status – ACTIVE, COOLDOWN, or DISABLED.
- Volatility Regime – HIGH / MODERATE / LOW with the current ATR percentile.
- VWAP Value – current VWAP price.
- Price vs VWAP – distance of price from VWAP in standard deviations (σ).
- ATR – current ATR value for the selected length.
The dashboard can be toggled on or off and moved to any corner of the chart (top/bottom, left/right).
6. Alert system & cooldown
The script defines multiple alert conditions so users can build their own rules around mean reversion and volatility changes:
- Extension zone alerts:
Price enters upper extension (≥ +2.5σ).
Price enters lower extension (≤ −2.5σ).
Price enters any extension zone.
High-volume candle touching an extension zone. - Divergence alerts:
Regular bullish / bearish divergence.
Hidden bullish / bearish divergence. - Volatility regime alerts:
- ATR percentile crosses into HIGH volatility.
- ATR percentile crosses into LOW volatility.
- ATR percentile crosses into HIGH volatility.
To reduce alert noise around VWAP resets, there is an optional alert cooldown:
- At the start of a new VWAP period (session/5-day/yearly, depending on timeframe), the script can enter a cooldown phase.
- During cooldown, extension-related alerts are temporarily suppressed for a user-defined number of minutes.
- Volatility regime alerts remain active, as they reflect broader structural changes rather than short-term VWAP resets.
Users can disable the cooldown by setting its duration to 0.
릴리즈 노트
Updated to adjust default values for better accuracy for new users.릴리즈 노트
Clarified tooltip wording초대 전용 스크립트
이 스크립트는 작성자가 승인한 사용자만 접근할 수 있습니다. 사용하려면 요청 후 승인을 받아야 하며, 일반적으로 결제 후에 허가가 부여됩니다. 자세한 내용은 아래 작성자의 안내를 따르거나 LHAMA-Trading에게 직접 문의하세요.
트레이딩뷰는 스크립트의 작동 방식을 충분히 이해하고 작성자를 완전히 신뢰하지 않는 이상, 해당 스크립트에 비용을 지불하거나 사용하는 것을 권장하지 않습니다. 커뮤니티 스크립트에서 무료 오픈소스 대안을 찾아보실 수도 있습니다.
작성자 지시 사항
Visit https://lhamatrading.com for access details.
Creators of the LHAMA Trading Suite. Visit lhamatrading.com to unlock all our indicators.
Skip the drama, ride the LHAMA!
Skip the drama, ride the LHAMA!
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
초대 전용 스크립트
이 스크립트는 작성자가 승인한 사용자만 접근할 수 있습니다. 사용하려면 요청 후 승인을 받아야 하며, 일반적으로 결제 후에 허가가 부여됩니다. 자세한 내용은 아래 작성자의 안내를 따르거나 LHAMA-Trading에게 직접 문의하세요.
트레이딩뷰는 스크립트의 작동 방식을 충분히 이해하고 작성자를 완전히 신뢰하지 않는 이상, 해당 스크립트에 비용을 지불하거나 사용하는 것을 권장하지 않습니다. 커뮤니티 스크립트에서 무료 오픈소스 대안을 찾아보실 수도 있습니다.
작성자 지시 사항
Visit https://lhamatrading.com for access details.
Creators of the LHAMA Trading Suite. Visit lhamatrading.com to unlock all our indicators.
Skip the drama, ride the LHAMA!
Skip the drama, ride the LHAMA!
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.