OPEN-SOURCE SCRIPT
Descriptive Statistics [Range, Interquartile Range, Range Ratio]

This indicator compares two measures of price spread: Range and Interquartile Range (IQR). It is designed to describe market structure and volatility without predicting direction.
Range measures the total distance between the highest and lowest values in the dataset. It captures the full extent of price movement, including extreme spikes and wicks.
IQR (Interquartile Range) measures the spread of the middle 50% of data, from Q1 to Q3. It represents the core structure of price movement while reducing the influence of extreme values.
What it shows
1. Range: The total observed price movement over the selected period.
2. IQR: The spread of the central portion of price data (middle 50%).
3. Range / IQR Ratio: A comparison between total movement and core movement.
Key concept
Range reflects total market movement including extremes.
IQR reflects the typical or core movement of price.
Comparing the two helps describe how much of the market movement is driven by extremes versus structured behavior.
The range can be used to determine significant pivot points that once broken can lead to potential continuation after a pull back. Watch for those pivots at the point where the range starts to remain constant after three or more bars.
⚠️ Note
This indicator is for analytical and educational purposes only and does not provide trading signals or directional predictions.
Range measures the total distance between the highest and lowest values in the dataset. It captures the full extent of price movement, including extreme spikes and wicks.
IQR (Interquartile Range) measures the spread of the middle 50% of data, from Q1 to Q3. It represents the core structure of price movement while reducing the influence of extreme values.
What it shows
1. Range: The total observed price movement over the selected period.
2. IQR: The spread of the central portion of price data (middle 50%).
3. Range / IQR Ratio: A comparison between total movement and core movement.
Key concept
Range reflects total market movement including extremes.
IQR reflects the typical or core movement of price.
Comparing the two helps describe how much of the market movement is driven by extremes versus structured behavior.
The range can be used to determine significant pivot points that once broken can lead to potential continuation after a pull back. Watch for those pivots at the point where the range starts to remain constant after three or more bars.
⚠️ Note
This indicator is for analytical and educational purposes only and does not provide trading signals or directional predictions.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.