MarketHours
public MarketHours()public MarketHours(TimeSpan mktOpen, TimeSpan mktClose)MarketHours has a parameterless constructor, and one that initializes the OpenTime and CloseTime properties using the mktOpen and mktClose parameters.
API documentation, members, signatures, and C# examples.
Find classes, members, and documentation.
The MarketHours class represents the open and close times of a market, and is used to represent market trading hours in the MarketDetails class.
public MarketHours()public MarketHours(TimeSpan mktOpen, TimeSpan mktClose)MarketHours has a parameterless constructor, and one that initializes the OpenTime and CloseTime properties using the mktOpen and mktClose parameters.
public bool AlwaysOpenReturns true if the market is open 24 hours. A market is considered always open when its OpenTime and CloseTime are equal.
public MarketHours Clone()Returns a new MarketHours instance with the same OpenTime and CloseTime values as this instance.
public TimeSpan CloseTimeContains the market's closing time.
public bool IsPrePostMarketTime(DateTime dt, HistoryScale scale)Returns true if the specified DateTime (dt) is considered to be outside the market's regular trading hours. The scale parameter is used when determining the starting time of a bar. This allows the method to correctly classify bars whose DateTime represents the end of a HistoryScale interval. For markets that are AlwaysOpen, this method always returns false. The method also handles markets whose trading sessions extend through midnight.
public TimeSpan OpenTimeContains the market's opening time.
public TimeSpan OpenTimeBaseLineReturns the baseline market opening time used by the Strategy Monitor.
For markets that do not trade through midnight, this returns OpenTime. For markets that trade through midnight, it returns OpenTime, except for markets that are AlwaysOpen, where it returns midnight (00:00).
public bool TradesThroughMidnightReturns true if the market's trading session extends through midnight. A market is considered to trade through midnight when its CloseTime is earlier than its OpenTime.
Ask the community or explore custom development services.