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.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.