Method AdjustCandleTime
- Namespace
- WhalesSecret.TradeScriptLib.Entities.MarketData
- Assembly
- WhalesSecret.TradeScriptLib.dll
AdjustCandleTime(CandleWidth, DateTime)
From the candle time received from the exchange, form a candle time that starts at the time we expect the candle to start. Final start time is always the same as the input time or an earlier time.
public static DateTime AdjustCandleTime(this CandleWidth candleWidth, DateTime candleStartTime)
Parameters
candleWidth
CandleWidthWidth of the candle.
candleStartTime
DateTimeCandle start time from exchange.
Returns
- DateTime
Adjusted start time of the candle that is aligned with the candle width.