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提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。
