all_time_high

All-Time High (Maximum value from inception)

all_time_high(source)

Parameters

All-Time High - all_time_high(source)

Returns the highest value ever reached for a given field from the first

trading day to the current bar.

  • source (field, required): Field to track maximum value - typically high, close, or other price field

Formula


all_time_high(field) = MAX(field) from first trading day to current bar

Examples


all_time_high(high);  # Highest price ever reached
all_time_high(close);  # Highest closing price ever
close > all_time_high(high) * 0.95;  # Within 5% of all-time high
weekly_ath = mtf("1W") { all_time_high(high); };  # Weekly ATH for cross-timeframe analysis

Returns

The maximum value of the specified field from inception to current bar.