Method GetTimeFrameStart
- Namespace
- WhalesSecret.TradeScriptLib.Entities.MarketData
- Assembly
- WhalesSecret.TradeScriptLib.dll
GetTimeFrameStart(CandleWidth, DateTime, out DateTime?)
Determines the start of the time frame that covers the given time for the given candle width. For example, if we have the weekly candle width and the given time is Wednesday morning, the start of the time frame is Monday midnight that precedes the Wednesday morning.
public static bool GetTimeFrameStart(this CandleWidth candleWidth, DateTime time, out DateTime? timeFrameStart)
Parameters
candleWidthCandleWidthWidth of the candle to find the start of the time frame for.
timeDateTimeUTC time to be covered by the candle in the time frame to determine.
timeFrameStartDateTime?If the function succeeds, this is filled with the start of the time frame for the given candle width.
Returns
- bool
trueif the start of the time frame was determined,falseotherwise.