Percentile Close Position Oscillator (PCPO)
by @rocco_no_piet
R
Rocco Ferrante-Salis
@rocco_no_pietOpen sourceformulaMIT
Ranks the current close within the recent closes over a user-defined lookback window, outputting a percentile from 0 to 100. Values near 0 indicate the close is at the low extreme of recent distribution (potential support/oversold), near 100 indicate the high extreme (potential resistance/overbought). Useful for intraday Forex on 5m-30m timeframes during London and New York sessions.
❤ 0 likes💬 0 comments👁 0 views🔖 0 saves⑂ 0 forks0 in use
Sign in to interact.
Try it live
Run the preview to see this indicator plotted on a real chart.
Inputs
Lookback Lengthint · default 50
Overbought Thresholdfloat · default 80
Oversold Thresholdfloat · default 20
Outputs / plots
PCPO Value (series)Overbought Event (event)Oversold Event (event)
Latest changelog
Initial release.
Version history
v17/24/2026, 6:05:46 PM
Source code
formulalet closes = src("close")
let len_closes = len
let rank = percentrank(closes, len_closes)
let pcpo = rank * 100
plot("pcpo", pcpo)
event("overbought", pcpo >= overbought_threshold)
event("oversold", pcpo <= oversold_threshold)Comments (0)
Sign in to leave a comment.
No comments yet.
Related indicators
Want to use this?
Sign in to preview it live on a chart, fork it into your own Indicators Lab, or use it in a strategy.