Your interactive trading laboratory!
 • 
21 users online

Quantacula Help

How-To
C# API Reference
Extensions
Development Blog
API-Extensions
Indicator Spotlights

QCommunity Extensions
The open-source GitHub repository of source code for the QCommunity Extensions library. Contains indicators and other extensions submitted by the Quantacula Community. Look for QCommunity indicators when you create a Building Block model, mark the "QCommunity" library check box to expose them.

TASC-Extensions
The open-source GitHub repository of source code for the TASCExtensions Quantacula extension. Contains indicators and other extensions adapted from the Traders' Tips articles in Technical Analysis of Stocks & Commodities magazine.
MarketDetails
Namespace: Quantacula.Core
Parent: Object

The MarketDetails class contains information about a market, such as the US Stock Market, or the Cryptocurrency markets. Historical Data Providers in Quantacula Studio can create MarketDetails instances and assign them to symbols, or you can make such assignments yourself using the Markets & Symbols tool.

Members

BaseTimeZone
public string BaseTimeZone

Contains the time zone that the market trades in. The string is compatible with Windows time zone ID values.


BenchmarkSymbol
public string BenchmarkSymbol

Contains a suggested symbol to use as a benchmark for backtest comparisons. For example, the US Stocks MarketDetails uses SPY, while the CryptoCurrencies MarketDetails uses BTC.USD.


DisplayDecimals
public int DisplayDecimals

Contains the number of decimal places to use when displaying price data for the market.


GetHours
public MarketHours GetHours(DateTime dt)

Returns the market hours for the specified date (dt parameter), as an instance of the MarketHours class.


GetSecurityName
public string GetSecurityName(string symbol)

Returns the security name of the specified symbol, if available.


Holidays
public List<DateTime> Holidays

A list of dates that represent market holidays where the market would normally be open but is closed.


IsOpenNow
public bool IsOpenNow

Uses the current system time and time zone, the BaseTimeZone of the market, and the market's GetHours method to determine if the market is currently open or closed.


IsPostMarket
public bool IsPostMarket

Uses the current system time and time zone, the BaseTimeZone of the market, and the market's GetHours method to determine if the current time is considered "post-market close".


IsPreMarket
public bool IsPreMarket

Uses the current system time and time zone, the BaseTimeZone of the market, and the market's GetHours method to determine if the current time is considered "pre-market open".


IsTradingDay
public bool IsTradingDay(DateTime dt)

Returns true if the specified date (dt parameter) is an active trading day in this market.


Name
public string Name

Contains the name of the market.


QuantityDecimals
public int QuantityDecimals

Contains the number of decimal places to use when calculating the number of shares or contracts to use for a position in the market.


TradingDaysOfWeek
public List<DayOfWeek> TradingDaysOfWeek

A List that contains DayOfWeek enumerated values that represent the days of the week that this market is open for trading.



Members for Market Creators

Clone
public MarketDetails Clone()

Creates a new MarketDetails instance that copies all of the properties of this market.


SpecifyMarketHours
public void SpecifyMarketHours(int dayOfWeek, TimeSpan mktOpen, TimeSpan mktClose)

Custom data providers that are creating MarketDetail instances can use this method to specify market open and close times for a specific day of the week. To specify the default market hours, they should call this method passing -1 as the dayOfWeek parameter. Every MarketDetails should have a default market hours (-1 value) defined in this way.


SymbolMapping
public Dictionary<string, string> SymbolMapping

A Dictionary that data providers creators can use to map symbols to their corresponding security names. Quantacula will check this Dictionary at the time data is loaded to see if a security name is available, and if so will assign it to the SecurityName property of the resulting BarHistory instance.


TradeOnAllDays
public void TradeOnAllDays()

Data Provider creators can call this method to indicate that the market trades on all days of the week. It populates the TradingDaysOfWeek property list with all 7 days of the week.


TradeOnWeekdays
public void TradeOnWeekdays()

Data Provider creators can call this method to indicate that the market trades on weekdays. It populates the TradingDaysOfWeek property list with the values Monday through Friday.