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
CandleWidthWidth of the candles to calculate with.
startTime
DateTimeStart 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 givencandleWidth
.length
TimeSpan?If the function succeeds, this is filled with the length of the candle set starting at
startTime
for the givencandleWidth
.
Returns
- bool
true
if the next candle set time can be calculated,false
ifstartTime
is not a valid start time of a candle set for the givencandleWidth
.