PROTECTED SOURCE SCRIPT
1-Year Median ₹ Turnover (Cr)

# 1-Year Median ₹ Turnover (Cr) - Pine Script Description
## Overview
This Pine Script indicator calculates and displays the median turnover value in Indian Rupees (₹) over a customizable lookback period, expressed in crores for better readability. The indicator helps traders analyze the typical trading activity levels by showing the middle value of turnover distribution rather than simple averages, providing a more robust measure that's less affected by extreme values.
## Key Features
- **Median Calculation**: Uses median instead of mean to provide a more stable representation of typical turnover levels
- **Customizable Lookback Period**: Default 252 bars (approximately 1 trading year) with minimum 20 bars
- **Indian Rupee Format**: Displays values in crores (₹ Cr) for easier interpretation in Indian markets
- **Visual Label**: Optional on-chart label showing current median value
- **Clean Visualization**: Plots in a separate pane with clear formatting
## How It Works
1. **Turnover Calculation**: Multiplies volume by closing price to get turnover in rupees
2. **Data Collection**: Gathers turnover data for the specified lookback period
3. **Median Computation**: Sorts the data array and calculates the true median value
4. **Format Conversion**: Converts the result to crores (÷ 10^7) for readability
5. **Display**: Plots the median turnover as a teal line with optional labeling
## Input Parameters
- **Lookback Period**: Number of bars to include in median calculation (default: 252)
- **Show Label**: Toggle to display/hide the current value label on chart
## Technical Notes
- Uses Pine Script v5 for optimal performance
- Displays in separate pane (overlay=false) for clear visualization
- Handles edge cases for even/odd array lengths in median calculation
- Efficient array operations for real-time calculation
*This indicator is designed specifically for Indian equity markets where turnover analysis in rupees provides meaningful insights for traders and analysts.*
## Overview
This Pine Script indicator calculates and displays the median turnover value in Indian Rupees (₹) over a customizable lookback period, expressed in crores for better readability. The indicator helps traders analyze the typical trading activity levels by showing the middle value of turnover distribution rather than simple averages, providing a more robust measure that's less affected by extreme values.
## Key Features
- **Median Calculation**: Uses median instead of mean to provide a more stable representation of typical turnover levels
- **Customizable Lookback Period**: Default 252 bars (approximately 1 trading year) with minimum 20 bars
- **Indian Rupee Format**: Displays values in crores (₹ Cr) for easier interpretation in Indian markets
- **Visual Label**: Optional on-chart label showing current median value
- **Clean Visualization**: Plots in a separate pane with clear formatting
## How It Works
1. **Turnover Calculation**: Multiplies volume by closing price to get turnover in rupees
2. **Data Collection**: Gathers turnover data for the specified lookback period
3. **Median Computation**: Sorts the data array and calculates the true median value
4. **Format Conversion**: Converts the result to crores (÷ 10^7) for readability
5. **Display**: Plots the median turnover as a teal line with optional labeling
## Input Parameters
- **Lookback Period**: Number of bars to include in median calculation (default: 252)
- **Show Label**: Toggle to display/hide the current value label on chart
## Technical Notes
- Uses Pine Script v5 for optimal performance
- Displays in separate pane (overlay=false) for clear visualization
- Handles edge cases for even/odd array lengths in median calculation
- Efficient array operations for real-time calculation
*This indicator is designed specifically for Indian equity markets where turnover analysis in rupees provides meaningful insights for traders and analysts.*
Mã được bảo vệ
Tập lệnh này được đăng dưới dạng mã nguồn đóng. Tuy nhiên, bạn có thể tự do sử dụng tập lệnh mà không có bất kỳ hạn chế nào – tìm hiểu thêm tại đây.
Thông báo miễn trừ trách nhiệm
Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.
Mã được bảo vệ
Tập lệnh này được đăng dưới dạng mã nguồn đóng. Tuy nhiên, bạn có thể tự do sử dụng tập lệnh mà không có bất kỳ hạn chế nào – tìm hiểu thêm tại đây.
Thông báo miễn trừ trách nhiệm
Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.