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
CandleWidthWidth of the candles to calculate with.
startTime
DateTimeStart time of a valid candle set.
length
TimeSpanIf the function succeeds, this is filled with the length of the candle set starting at
startTime
for the givencandleWidth
.
Returns
- DateTime
Time of a candle set that follows a candle set starting at
startTime
for the givencandleWidth
.
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
CandleWidthWidth of the candles to calculate with.
startTime
DateTimeStart time of a valid candle set.
Returns
- DateTime
Time of a candle set that follows a candle set starting at
startTime
for the givencandleWidth
.