Table of Contents

Method GetNextCandleSetTime

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

GetNextCandleSetTime(CandleWidth, DateTime, out TimeSpan)

Starting with a valid time of a candle set, this method calculates the start time of the following candle set. For candle widths up to Day1 a candle set always represents 1 day.

public static DateTime GetNextCandleSetTime(this CandleWidth candleWidth, DateTime startTime, out TimeSpan length)

Parameters

candleWidth CandleWidth

Width of the candles to calculate with.

startTime DateTime

Start time of a valid candle set.

length TimeSpan

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

Returns

DateTime

Time of a candle set that follows a candle set starting at startTime for the given candleWidth.

GetNextCandleSetTime(CandleWidth, DateTime)

Starting with a valid time of a candle set, this method calculates the start time of the following candle set. For candle widths up to Day1 a candle set always represents 1 day.

public static DateTime GetNextCandleSetTime(this CandleWidth candleWidth, DateTime startTime)

Parameters

candleWidth CandleWidth

Width of the candles to calculate with.

startTime DateTime

Start time of a valid candle set.

Returns

DateTime

Time of a candle set that follows a candle set starting at startTime for the given candleWidth.