Percentile
The level a chosen fraction of the last N values sit at or below; 0.9 gives the 90th percentile.
Percentile sorts the last N values of its input, the current bar included, and reads the value at the chosen level, interpolating between neighbouring values. With the defaults it is the level nine in ten of the last 60 closes sit at or below. Level 0.5 gives the median, 0 the window's lowest value and 1 its highest.
How to read it
- The line sits on the price scale, inside the range of the window's closes.
- A close above the 0.9 line sits in the top tenth of its recent range.
- Two lines at 0.1 and 0.9 make a band that holds the middle 80% of recent closes.
What it outputs
- Percentile
- The value the chosen fraction of the last N closes sit at or below, on the same scale as the candles.
Settings
- Level
- Which fraction of the window sits at or below the line: 0 is the lowest value, 0.5 the median, 1 the highest.
- Window
- How many bars the values are taken from. Longer windows move slowly and hold old extremes; shorter ones follow recent closes.
Pitfalls
- It is a level in the input's units, not a rank: it says where the fraction falls, not where this bar sits.
- At level 1 it equals Max of the same window and at level 0 it equals Min.