PROTECTED SOURCE SCRIPT
업데이트됨 MA Distance Percentile - HighQ Tools

HighQTools — MA Distance Percentile (MADP)
As always, if anyone has any tips or additional features they'd like to see, feel free to reach out!
MA Distance Percentile (MADP) measures how far price is from its moving average relative to its own recent history.
Instead of showing raw distance (which varies by symbol, volatility, and timeframe), MADP normalizes price-to-MA distance into a 0–100 percentile rank over a rolling lookback window. This allows traders to quickly identify when price is relatively extended or compressed compared to recent conditions.
🔍 How It Works
A moving average is calculated (EMA by default, configurable).
The ratio of price / MA is computed.
That ratio is percentile-ranked over a user-defined lookback window.
The result is optionally smoothed for clarity.
High values (e.g., 80–100): Price is more extended above its MA than it has been recently.
Low values (e.g., 0–20): Price is relatively compressed or discounted vs its MA.
🧭 How to Use It
MADP is best used as a context tool, not a standalone signal:
Identify mean-reversion potential at relative extremes
Distinguish trend continuation vs exhaustion
Filter entries taken near highs/lows vs those taken in compression
Combine with structure, volume, delta, or VWAP-based tools
Optional visual levels (20 / 50 / 80) are provided for quick reference. Simple signals are included but disabled by default to encourage discretionary use.
⚙️ Defaults & Notes
Default MA: 20-period EMA
Default lookback: 200 bars
Designed for intraday and swing analysis
Does not repaint
Percentile-based normalization makes it robust across symbols and timeframes
This indicator is part of the HighQTools framework: clean, transparent tools designed to provide context first, not overfitted signals.
As always, if anyone has any tips or additional features they'd like to see, feel free to reach out!
MA Distance Percentile (MADP) measures how far price is from its moving average relative to its own recent history.
Instead of showing raw distance (which varies by symbol, volatility, and timeframe), MADP normalizes price-to-MA distance into a 0–100 percentile rank over a rolling lookback window. This allows traders to quickly identify when price is relatively extended or compressed compared to recent conditions.
🔍 How It Works
A moving average is calculated (EMA by default, configurable).
The ratio of price / MA is computed.
That ratio is percentile-ranked over a user-defined lookback window.
The result is optionally smoothed for clarity.
High values (e.g., 80–100): Price is more extended above its MA than it has been recently.
Low values (e.g., 0–20): Price is relatively compressed or discounted vs its MA.
🧭 How to Use It
MADP is best used as a context tool, not a standalone signal:
Identify mean-reversion potential at relative extremes
Distinguish trend continuation vs exhaustion
Filter entries taken near highs/lows vs those taken in compression
Combine with structure, volume, delta, or VWAP-based tools
Optional visual levels (20 / 50 / 80) are provided for quick reference. Simple signals are included but disabled by default to encourage discretionary use.
⚙️ Defaults & Notes
Default MA: 20-period EMA
Default lookback: 200 bars
Designed for intraday and swing analysis
Does not repaint
Percentile-based normalization makes it robust across symbols and timeframes
This indicator is part of the HighQTools framework: clean, transparent tools designed to provide context first, not overfitted signals.
릴리즈 노트
HighQTools — MA Distance Percentile (MADP)As always, if anyone has any tips or additional features they'd like to see, feel free to reach out!
MA Distance Percentile (MADP) measures how far price is from its moving average relative to its own recent history.
Instead of showing raw distance (which varies by symbol, volatility, and timeframe), MADP normalizes price-to-MA distance into a 0–100 percentile rank over a rolling lookback window. This makes it easier to spot when price is relatively extended or compressed compared to recent conditions.
🔍 How It Works
A moving average is calculated (EMA by default, configurable).
The ratio of price / MA is computed.
That ratio is percentile-ranked over a user-defined lookback window.
The result is optionally smoothed for clarity.
High values (80–100): Price is more extended above its MA than it has been recently.
Low values (0–20): Price is relatively compressed or discounted vs its MA.
🧭 How to Use It
MADP is best used as a context tool, not a standalone system:
Identify mean-reversion potential at relative extremes
Distinguish trend continuation vs exhaustion
Filter entries taken near highs/lows vs those taken in compression
Combine with structure, volume, delta, or VWAP-based tools
Optional visual levels (20 / 50 / 80) are provided for quick reference.
🟢 Signal Settings (Optional)
MADP includes optional signals to help highlight “reversion completed → expansion begins” type moments. Signals are OFF by default.
Enable via Show Simple Signals, then choose a Signal Mode:
1) Cross Levels
This mode triggers when MADP crosses key levels (Low/Mid/High). It can be used to confirm a shift in regime:
A cross up through the Low (e.g., 20) suggests price may be leaving a discounted / compressed condition and reverting back toward “normal.”
A cross down through the High (e.g., 80) suggests price may be leaving an overextended condition and reverting.
2) Extremes Revert (recommended for mean reversion use)
This mode is designed specifically to catch the moment when price stops pressing the extreme and begins moving away from it:
After MADP spends time near the Low level, a bullish signal prints when MADP crosses back up through the Low level (e.g., 20). Conceptually: reversion away from the downside extreme has begun.
After MADP spends time near the High level, a bearish signal prints when MADP crosses back down through the High level (e.g., 80). Conceptually: reversion away from the upside extreme has begun.
Practical entry concept:
Rather than fading an extreme immediately, many traders prefer waiting for confirmation that the extreme has stopped expanding and price has started moving back toward balance. These signals aim to highlight that “turning point” behavior, which can then be combined with your execution triggers (structure, volume, delta, VWAP, etc.).
⚙️ Defaults & Notes
Default MA: 20-period EMA
Default lookback: 200 bars
Designed for intraday and swing analysis
Does not repaint
Percentile-based normalization makes it robust across symbols and timeframes
보호된 스크립트입니다
이 스크립트는 비공개 소스로 게시됩니다. 하지만 이를 자유롭게 제한 없이 사용할 수 있습니다 – 자세한 내용은 여기에서 확인하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
보호된 스크립트입니다
이 스크립트는 비공개 소스로 게시됩니다. 하지만 이를 자유롭게 제한 없이 사용할 수 있습니다 – 자세한 내용은 여기에서 확인하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.