OPEN-SOURCE SCRIPT
W-MREI (Weekly Mean-Reversion Exhaustion Index)

W-MREI — Weekly Mean-Reversion Exhaustion Index
Description
The Weekly Mean-Reversion Exhaustion Index (W-MREI) is a statistical indicator designed to identify potential top and bottom zones in equities by measuring how far price has moved away from its long-term equilibrium.
The indicator operates on the weekly timeframe and is intended to be used as a structural exhaustion tool, not as a short-term trading signal.
W-MREI combines three key elements of market behavior:
Price deviation from the mean (Z-Score)
Position inside Bollinger Bands
Volatility regime (ATR expansion)
These components together help detect trend exhaustion conditions, which often occur before cyclical turning points.
How to use it
The indicator oscillates around zero, which represents market equilibrium.
Typical interpretation:
Above +2 → bullish exhaustion zone
Below −2 → bearish exhaustion zone
Near 0 → price near equilibrium
The indicator works best when used together with:
RSI
cycle analysis
structural support/resistance
W-MREI is designed as a confirmation tool, not a standalone entry system.
Indicator components (visible in settings)
These checkboxes correspond to internal components of the model:
W-MREI Score
The main composite oscillator.
This is the only line typically needed on the chart.
It combines:
Z-Score (price extension)
Bollinger position
volatility context
This line represents the overall exhaustion level of price.
Z-Score
Measures how far price is from its statistical mean:
(price − moving average) / standard deviation
High positive values indicate overextension above the mean,
negative values indicate compression below it.
This is the core mean-reversion component of the indicator.
%B (Bollinger Position)
Shows where price sits inside Bollinger Bands.
Typical values:
0.5 → middle band
1 → upper band
0 → lower band
1 → breakout above bands
<0 → below bands
This helps confirm extreme price positioning.
ATR Expansion
Measures whether volatility is expanding relative to its longer-term average.
High values indicate:
mature trends
strong directional moves
possible exhaustion phases
This acts as a regime filter.
Description
The Weekly Mean-Reversion Exhaustion Index (W-MREI) is a statistical indicator designed to identify potential top and bottom zones in equities by measuring how far price has moved away from its long-term equilibrium.
The indicator operates on the weekly timeframe and is intended to be used as a structural exhaustion tool, not as a short-term trading signal.
W-MREI combines three key elements of market behavior:
Price deviation from the mean (Z-Score)
Position inside Bollinger Bands
Volatility regime (ATR expansion)
These components together help detect trend exhaustion conditions, which often occur before cyclical turning points.
How to use it
The indicator oscillates around zero, which represents market equilibrium.
Typical interpretation:
Above +2 → bullish exhaustion zone
Below −2 → bearish exhaustion zone
Near 0 → price near equilibrium
The indicator works best when used together with:
RSI
cycle analysis
structural support/resistance
W-MREI is designed as a confirmation tool, not a standalone entry system.
Indicator components (visible in settings)
These checkboxes correspond to internal components of the model:
W-MREI Score
The main composite oscillator.
This is the only line typically needed on the chart.
It combines:
Z-Score (price extension)
Bollinger position
volatility context
This line represents the overall exhaustion level of price.
Z-Score
Measures how far price is from its statistical mean:
(price − moving average) / standard deviation
High positive values indicate overextension above the mean,
negative values indicate compression below it.
This is the core mean-reversion component of the indicator.
%B (Bollinger Position)
Shows where price sits inside Bollinger Bands.
Typical values:
0.5 → middle band
1 → upper band
0 → lower band
1 → breakout above bands
<0 → below bands
This helps confirm extreme price positioning.
ATR Expansion
Measures whether volatility is expanding relative to its longer-term average.
High values indicate:
mature trends
strong directional moves
possible exhaustion phases
This acts as a regime filter.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.