OPEN-SOURCE SCRIPT
Updated

Date Range Performance

250

  • Calculates total change and percentage change between two dates.
  • Computes average change per bar and per day.
  • Offers arithmetic and geometric daily %.
  • Supports auto mode (last N trading days) and manual date range.
  • Displays results as a watermark on the chart.
Release Notes
Cleaned up the code.
Updated the chart and name.
Release Notes
Fixed the "Per Bar" metric and hiding it in case of auto mode (number of Trading days)
Release Notes
Removed unnecessary code.
Release Notes
Recent Updates
UI/UX Improvements:

Added 📅 PERFORMANCE header for better visual identification
Changed default text color to white for improved visibility across all chart themes
Shortened date range label from "Date range:" to "Range:" to prevent horizontal text overflow in compact displays
Enhanced Control:

Improved vertical offset behavior: now uses 0-100 range with finer granularity (divides by 10 internally for precise positioning)
Renamed "Extra Line Spacing" parameter (previously "Line Gap") with better tooltip explanation
Set default line spacing to 1 for improved readability between metrics
Better Alignment:

Vertical positioning now consistent with companion indicators (Trading Toolkit, Sector Flow)
All three indicators can now be stacked vertically with matching offset behavior for a unified dashboard experience
What This Indicator Does:
Calculates comprehensive performance metrics for any date range:

Total dollar and percentage change
Average change per bar and per day
Both arithmetic and geometric daily % (for better period comparability)
Supports auto mode (last N trading days) or manual date selection
Perfect for tracking performance across specific periods and comparing returns across different timeframes.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.