Table of Contents

Method FromTimeSpan

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

FromTimeSpan(TimeSpan)

Converts TimeSpan to CandleWidth .

public static CandleWidth FromTimeSpan(TimeSpan timeSpan)

Parameters

timeSpan TimeSpan

Time span to convert.

Returns

CandleWidth

The candle width that corresponds to the input time span or Other if the conversion is not possible. All candle widths have their precise corresponding time span except for Month1, which is defined as 31 days long time span. This is to make sure that the returned time span is the longest possible time span for the input candle width.