Table of Contents

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 CandleWidth

Width of the candle.

candleStartTime DateTime

Candle start time from exchange.

Returns

DateTime

Adjusted start time of the candle that is aligned with the candle width.