Table of Contents

Method TryGetNextCandleSetTime

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

TryGetNextCandleSetTime(CandleWidth, DateTime, out DateTime?, out TimeSpan?)

Calculates the start time of the following candle set. For candle widths up to Day1 a candle set always represents 1 day.

public static bool TryGetNextCandleSetTime(this CandleWidth candleWidth, DateTime startTime, out DateTime? nextTime, out TimeSpan? length)

Parameters

candleWidth CandleWidth

Width of the candles to calculate with.

startTime DateTime

Start time of a candle set.

nextTime DateTime?

If the function succeeds, this is filled with the start time of a candle set that follows a candle set starting at startTime for the given candleWidth.

length TimeSpan?

If the function succeeds, this is filled with the length of the candle set starting at startTime for the given candleWidth.

Returns

bool

true if the next candle set time can be calculated, false if startTime is not a valid start time of a candle set for the given candleWidth.