Method GetThisOrNextTimeFrameStart
- Namespace
- WhalesSecret.TradeScriptLib.Entities.MarketData
- Assembly
- WhalesSecret.TradeScriptLib.dll
GetThisOrNextTimeFrameStart(CandleWidth, DateTime, out DateTime?)
Determines the start of the time frame that follows 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 follows the Wednesday morning.
public static bool GetThisOrNextTimeFrameStart(this CandleWidth candleWidth, DateTime time, out DateTime? timeFrameStart)
Parameters
candleWidth
CandleWidthWidth of the candle to find the start of the time frame for.
time
DateTimeUTC time to be covered by the candle in the time frame to determine.
timeFrameStart
DateTime?If the function succeeds, this is filled with the start of the time frame for the given candle width.
Returns
- bool
true
if the start of the time frame was determined,false
otherwise.