Table of Contents

Method GetTimeFrameCandleCount

Namespace
WhalesSecret.TradeScriptLib.Entities.MarketData
Assembly
WhalesSecret.TradeScriptLib.dll

GetTimeFrameCandleCount(CandleWidth, DateTime, DateTime)

Calculates the number of candles of the given width in the specified time frame. A candle is counted as in the time frame if its timestamp (i.e. the start time of the candle) is greater or equal to startTime and less than endTime.

public static int GetTimeFrameCandleCount(this CandleWidth candleWidth, DateTime startTime, DateTime endTime)

Parameters

candleWidth CandleWidth

Width of the candles to calculate for.

startTime DateTime

Inclusive UTC start time of the time frame.

endTime DateTime

Exclusive UTC end time of the time frame.

Returns

int

Number of candles that exist in the given time frame.