Docs

ta.max

Track the highest level a series has reached, such as the peak of an equity curve.

itm
ta.max(source)

The highest value the series has taken since the first bar of the run. It never falls. It has no window, so it differs from ta.highest.

Parameters

A series parameter takes a value on every bar. A constant parameter must be known before the first bar, such as a number or an input.

NameKindTypeDefaultRangeDescription
sourceSeriesnumber--The series to read.

Output

NameType
valuenumber

Warm-up and missing values

Warm-up
1 bar.
Missing values
na until the first non-na observation. An na input leaves the value standing.

Example

itm
ta.max(close)
itm
peak = ta.max(close)
plot(peak, "Run high")