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
candleWidthCandleWidthWidth of the candles to calculate with.
startTimeDateTimeStart time of a candle set.
nextTimeDateTime?If the function succeeds, this is filled with the start time of a candle set that follows a candle set starting at
startTimefor the givencandleWidth.lengthTimeSpan?If the function succeeds, this is filled with the length of the candle set starting at
startTimefor the givencandleWidth.
Returns
- bool
trueif the next candle set time can be calculated,falseifstartTimeis not a valid start time of a candle set for the givencandleWidth.