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
CandleWidthWidth of the candles to calculate for.
startTime
DateTimeInclusive UTC start time of the time frame.
endTime
DateTimeExclusive UTC end time of the time frame.
Returns
- int
Number of candles that exist in the given time frame.