ta.max
Track the highest level a series has reached, such as the peak of an equity curve.
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.
| Name | Kind | Type | Default | Range | Description |
|---|---|---|---|---|---|
source | Series | number | - | - | The series to read. |
Output
| Name | Type |
|---|---|
value | number |
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
ta.max(close)peak = ta.max(close)
plot(peak, "Run high")