Maximum


Summary

Finds the maximum value in a dataseries for a given period.

Syntax

public static double Maximum(DataSeries series, int period)

Parameters

NameDescription

Example 1

public override void Calculate(int index)
{
    if(Functions.Maximum(sma.Result,20) > MarketSeries.Close[index])
    {
        //Do something
    }
    // May be invoked as an extension method
    
    if (sma.Result.Maximum(20) > MarketSeries.Close[index])
    {
        //Do something
    }
}

Example 2

var maxHigh = MarketSeries.High.Maximum(periods);