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
CandleWidthWidth of the candle to check.
startTime
DateTimeStart 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.