Working with candles

To get candles by sequence numbers, it is necessary to call the GetCandle(int bar) function, which will return ATAS.Indicators.IndicatorCandle

protected override void OnCalculate(int bar, decimal value)
 {
     var candle = GetCandle(bar);
     this[bar] = candle.High;
 }

Every candle has properties, which allow obtaining the price levels that correspond to the level of maximum volume, maximum Bids, Asks and so on: MaxVolumePriceInfo, MaxTimePriceInfo, MaxTickPriceInfo, MaxPositiveDeltaPriceInfo, MaxNegativeDeltaPriceInfo, MaxBidPriceInfo and MaxAskPriceInfo.

Apart from that, it is also possible to get data about volumes of a specific price level with the help of the GetPriceVolumeInfo(decimal price) function:

protected override void OnCalculate(int bar, decimal value)
{
      var candle = GetCandle(bar);
      var volumeinfo = candle.GetPriceVolumeInfo(candle.High);
}

Information about volumes at the price level is presented by the ATAS.Indicators.PriceVolumeInfo.

This article was helpful for 3 people. Is this article helpful for you?