OPEN-SOURCE SCRIPT
Percentile Rank Oscillator (Price + VWMA)

A statistical oscillator designed to identify potential market turning points using percentile-based price analytics and volume-weighted confirmation.
What is PRO?
Percentile Rank Oscillator measures how extreme current price behavior is relative to its own recent history. It calculates a rolling percentile rank of price midpoints and VWMA deviation (volume-weighted price drift). When price reaches historically rare levels – high or low percentiles – it may signal exhaustion and potential reversal conditions.
How it works
Why percentile rank?
Median-based percentiles ignore outliers and read the market statistically – not by fixed thresholds. Instead of guessing “overbought/oversold” values, the indicator adapts to current volatility and structure.
Key features
How to use
Tip: Look for percentile spikes at key HTF levels, after extended moves, or where liquidity sweeps occur. Strong moves into rare percentile territory may precede mean reversion.
Suggested settings
Important note
This tool does not predict direction or guarantee outcomes. It provides statistical context for price extremes to help traders frame probability and timing. Always combine with sound risk management and other tools.
What is PRO?
Percentile Rank Oscillator measures how extreme current price behavior is relative to its own recent history. It calculates a rolling percentile rank of price midpoints and VWMA deviation (volume-weighted price drift). When price reaches historically rare levels – high or low percentiles – it may signal exhaustion and potential reversal conditions.
How it works
- Takes midpoint of each candle ((H+L)/2)
- Ranks the current value vs previous N bars using rolling percentile rank
- Maps percentile to a normalized oscillator scale (-1..+1 or 0–100)
- Optionally evaluates VWMA deviation percentile for volume-confirmed signals
- Highlights extreme conditions and confluence zones
Why percentile rank?
Median-based percentiles ignore outliers and read the market statistically – not by fixed thresholds. Instead of guessing “overbought/oversold” values, the indicator adapts to current volatility and structure.
Key features
- Rolling percentile rank of price action
- Optional VWMA-based percentile confirmation
- Adaptive, noise-robust structure
- User-selectable thresholds (default 95/5)
- Confluence highlighting for price + VWMA extremes
- Optional smoothing (RMA)
- Visual extreme zone fills for rapid signal recognition
How to use
- High percentile values –> statistically extreme upward deviation (potential top)
- Low percentile values –> statistically extreme downward deviation (potential bottom)
- Price + VWMA confluence strengthens reversal context
- Best used as part of a broader trading framework (market structure, order flow, etc.)
Tip: Look for percentile spikes at key HTF levels, after extended moves, or where liquidity sweeps occur. Strong moves into rare percentile territory may precede mean reversion.
Suggested settings
- Default length: 100 bars
- Thresholds: 95 / 5
- Smoothing: 1–3 (optional)
Important note
This tool does not predict direction or guarantee outcomes. It provides statistical context for price extremes to help traders frame probability and timing. Always combine with sound risk management and other tools.
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。