Functions.Maximum
method · Functions · cAlgo.API
DesktopCLICloud
Finds the maximum value in a data series for a given period.
Definition
public static double Maximum(DataSeries series, int period)
Functions.Maximum(series: DataSeries, period: int) -> float
Parameters
| Name | C# type | Python type | Description |
|---|---|---|---|
series | DataSeries | DataSeries | Input data series |
period | int | int | Input period |
Returns double — The maximum value in the data series in this period
Examples
var highestHigh = Bars.HighPrices.Maximum(20);
Print("Highest high of the last 20 bars: {0}", highestHigh);
highestHigh = Functions.Maximum(api.Bars.HighPrices, 20)
api.Print(f"Highest high of the last 20 bars: {highestHigh}")