Framework Reference
WEALTHLAB FRAMEWORK / CLASS REFERENCE

SymbolInfo

API documentation, members, signatures, and C# examples.

Search the framework

Find classes, members, and documentation.

NamespaceWealthLab.Core
Parent
Object

The SymbolInfo class represents information about a single tradable instrument, identified by its Symbol property. SymbolInfo contains information such as the symbol's market, security type, currency, price precision, quantity precision, futures point value, margin, and tick size. SymbolInfo instances can be created by Historical Data Providers, and users can define or edit symbol information in WealthLab's Markets & Symbols tool. When Futures Mode is enabled in WealthLab's Backtest Settings, properties such as Margin, PointValue, and TickSize are used when calculating backtest results for compatible security types.

Members

19

CanUseFuturesMode

public bool CanUseFuturesMode

Returns true if the symbol contains valid futures-mode settings and its SecurityType supports Futures Mode. Specifically, PointValue, Margin, and TickSize must all be greater than zero, and the SecurityType must be compatible with Futures Mode.

Clone

public SymbolInfo Clone()

Returns a new SymbolInfo instance containing copies of this instance's symbol information. The copied properties include Symbol, Market, PointValue, Margin, TickSize, DisplayDecimals, QuantityDecimals, SecurityType, and Currency.

Commission

public Commission Commission

Gets or sets the user-defined Commission associated with this symbol. The Commission is managed through MarketManager.

CommissionDisplay

public string CommissionDisplay

Returns a displayable representation of the symbol's associated Commission. Returns an empty string if no Commission is assigned.

Currency

public string Currency

Contains the base currency associated with the symbol. The default value is "USD".

DisplayDecimals

public int DisplayDecimals

Contains the number of decimal places WealthLab should use when displaying price and value information for this symbol. The default value is 2.

EscapedSymbol

public string EscapedSymbol

Returns an escaped version of Symbol suitable for use as a key in WealthLab's settings system. Any = characters in the Symbol are replaced with *EQUAL*.

Margin

public double Margin

Contains the amount of funds required to maintain a single share or contract position in the symbol. This value is used when Futures Mode is enabled and the symbol's SecurityType supports Futures Mode. The default value is 1.0.

Market

public MarketDetails Market

Contains the market in which this symbol trades, represented by an instance of the MarketDetails class.

MarketName

public string MarketName

Returns the name of the symbol's associated Market. Returns an empty string if Market is null.

Parse

public static SymbolInfo Parse(string s)

Creates and returns a SymbolInfo instance from a string in WealthLab's serialized SymbolInfo format. The string contains comma-separated values representing the symbol, market, point value, margin, tick size, display decimals, quantity decimals, security type, and currency. Returns null if the supplied string is empty or contains only whitespace.

PointValue

public double PointValue

Contains the value gained or lost in the base currency when one share or contract moves by one price point. For example, if a futures contract has a PointValue of 50, a one-point move in the contract represents a value change of 50 currency units per contract. This value is used when Futures Mode is enabled and the symbol's SecurityType supports Futures Mode. The default value is 1.0.

QuantityDecimals

public int QuantityDecimals

Contains the number of decimal places to use when representing quantities such as shares, contracts, or units for this symbol. A value of zero indicates whole-unit quantities. The default value is 0.

SecurityType

public SecurityType SecurityType

Contains the type of security represented by this SymbolInfo instance, expressed as a member of the SecurityType enum. The default value is SecurityType.Stock. The SecurityType also determines whether the symbol is eligible to use Futures Mode.

Symbol

public string Symbol

Contains the string that identifies the tradable instrument. For example:

MSFT

represents Microsoft Corporation stock.

SymbolMatches

public bool SymbolMatches(string symbol)

Returns true if the supplied symbol matches this SymbolInfo's Symbol. Matching is case-insensitive. The # character can be used as a single-character wildcard in the SymbolInfo's Symbol. For example, a SymbolInfo with a Symbol of:

ES##

matches symbols such as:

ESZ5
ESH6

provided the symbols have the same total length. Returns false if symbol is null or does not match.

TickSize

public double TickSize

Contains the minimum price increment at which the symbol can trade. For example, a TickSize of 0.25 means valid prices advance in increments of 0.25. This value is used when Futures Mode is enabled and the symbol's SecurityType supports Futures Mode. The default value is 0.01.

TickSizeDisplay

public string TickSizeDisplay

Returns TickSize formatted as a display string using an appropriate number of decimal places.

ToString

public override string ToString()

Returns the SymbolInfo instance serialized into WealthLab's comma-separated SymbolInfo format. The resulting string contains the Symbol, Market name, PointValue, Margin, TickSize, DisplayDecimals, QuantityDecimals, SecurityType, and Currency.

Need help with this API?

Ask the community or explore custom development services.