Skip to content
All library documents

Tracking All-Time Highs and Lows with Distance and Age Statistics

Article TradingView scripts

Summary

This indicator tracks the highest high and lowest low across the available daily price history, along with the dates those extremes occurred. Users can choose whether to display each level and a chart table. The table reports the date, days elapsed, extreme price, and the current price’s absolute and percentage distance from each record. Alert conditions are also included for moves through the all-time high or low.

The document describes a reference and monitoring tool, not a trading strategy or evidence of profitable signals. Its readings depend on the symbol’s available historical data and the daily series used to calculate the records. The age statistic is computed from the current time, while distance is compared with the current close; neither metric predicts whether a breakout will continue or a record will hold. The release notes mention a formatting update and a fix for an all-time high on the first historical bar, underscoring that implementation details can affect reported extremes.

Key ideas

  • The indicator calculates running all-time high and low values from daily bars.
  • It records when each extreme occurred and displays its age in days.
  • A table can show the extreme price and its absolute and percentage distance from the current close.
  • Optional alerts signal price crossing the tracked record levels.
  • The tool summarizes historical extremes but does not establish their predictive value.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.