Skip to content

IndicatorBars.HighPrices

property · IndicatorBars · cAlgo.API Since 5.4

DesktopCLICloud

Gets the High price bars data.

Definition

DataSeries HighPrices {get;}
indicatorBars.HighPrices: DataSeries

Returns DataSeries

Examples

public partial class BarsCopy : Indicator
{
    public override void Calculate(int index)
    {
        var bar = Bars[index];
        Result[index] = new OhlcvBar(bar.Open, bar.High, bar.Low, bar.Close, bar.TickVolume);
        if (IsLastBar)
            Print("Highest output high of 20 bars: {0}", Result.HighPrices.Maximum(20));
    }
}
def calculate(self, index):
    bar = api.Bars[index]
    api.Result[index] = OhlcvBar(bar.Open, bar.High, bar.Low, bar.Close, bar.TickVolume)
    if api.IsLastBar:
        api.Print(f"Highest output high of 20 bars: {Functions.Maximum(api.Result.HighPrices, 20)}")
{
  "AccessRights": "None",
  "IsOverlay": false,
  "BarOutputs": [
    {
      "Name": "Result",
      "DisplayName": "Main"
    }
  ]
}