Table of Contents

Method ExtractCandleTimeFrame

Namespace
WhalesSecret.TradeScriptLib.Entities.MarketData
Assembly
WhalesSecret.TradeScriptLib.dll

ExtractCandleTimeFrame(CandleWidth, DateTime, out TimeSpan?)

Checks that a candle of the given width can start at the given time and extracts the length of the candle.

public static bool ExtractCandleTimeFrame(this CandleWidth candleWidth, DateTime startTime, out TimeSpan? length)

Parameters

candleWidth CandleWidth

Width of the candle to check.

startTime DateTime

Start time of the candle to check.

length TimeSpan?

If the function succeeds, this is filled with the length of the candle.

Returns

bool

true if the time frame was extracted, false otherwise.