Situation
You want to know how to get the QuoteManager settings for the current symbol in MultiCharts .NET.

Programming example

using System;
using System.Drawing;
using System.Linq;
using PowerLanguage.Function;

namespace PowerLanguage.Indicator
{
    [SameAsSymbol(true), UpdateOnEveryTick(false)]
    public class Example_QuoteManagerCurrentSymbol : IndicatorObject
    {
        public Example_QuoteManagerCurrentSymbol(object _ctx) : base(_ctx) { }

        protected override void StartCalc()
        {
            Output.Clear();

            Output.WriteLine("{0} ({1}) trades on {2} and data comes from {3}.",
                Bars.Info.Name,
                Bars.Info.Description,
                Bars.Info.Exchange,
                Bars.Info.DataFeed);

            if (Bars.Info.Category == ESymbolCategory.Future)
            {
                Output.WriteLine("{0} is a {1}.",
                    Bars.Info.Name,
                    Bars.Info.Category);
            }

            Output.WriteLine("The symbol's BPV is {0}, it's MinMove is {1} and price scale {2}.",
                Bars.Info.BigPointValue,
                Bars.Info.MinMove,
                Bars.Info.PriceScale);

            double tickValue = (Bars.Info.MinMove / Bars.Info.PriceScale) * Bars.Info.BigPointValue;

            Output.WriteLine("One tick in {0} would be {1} dollar.",
                Bars.Info.Name,
                tickValue);
        }
        
        protected override void CalcBar() { }
    }
}

Output of the programming example

The indicator generates the following output:

@ES# (E-MINI S&P 500) trades on CME and data comes from IQFeed.
@ES# is a Future.
The symbol's BPV is 50, it's MinMove is 25 and price scale 100.
One tick in @ES# would be 12,5 dollar.

The MultiCharts .NET QuoteManager

The QuoteManager is MultiCharts .NET’s tool for managing the database, and includes features such as importing and exporting data, managing data sources and symbols, and setting exchanges and ECN’s (MultiCharts, n.d.).

The symbol properties in the QuoteManager not only influence how a data series is charted (such as the price scale and session time settings), but also impact trading strategies (like the Big Point Value).

Accessing the QuoteManager symbol properties programmatically

Information about the primary data series symbol can be retrieved with Bars.Info (e.g., see Henry MultiCharts, 2013), which has the following properties (MultiCharts, 2013; MultiCharts Wiki, 2013, 2012; PowerLanguage .NET Help, n.d.):

Bars.Info property Description How to use
BigPointValue Returns the double Big Point Value (the currency value of 1 full point of price movement). For stocks this value is 1 (one point change in the stock price is 1 dollar or euro), while for the ES it is 50 dollar and for the FESX future 10 euro. Bars.Info.BigPointValue: returns the BigPointValue for the current symbol.
Category Returns an enumerator of the instrument’s category enumeration. Returned values are: None, Future, FutureOption, Stock, StockOption, Index, CurrOption, IndexOption, Cash, Bond, Spread, Forex, FutureRolover (sic), Commodity. Bars.Info.Category: returns the Future enumerator when the primary data series is a future contract.
DataFeed Returns a string with the data feed name. Bars.Info.DataFeed: returns “LMAX” when the symbol of the primary data series receives its real-time data from LMAX.
Description Returns a string with with the symbol’s description. Bars.Info.Description: returns "E-MINI S&P 500" if the symbol of the primary data series has that description in the QuoteManager.
Exchange Returns a string with the name of the exchange. Bars.Info.Exchange: returns "CME" if the symbol of the primary data series trades on the CME.
Margin Returns a double value with the required margin for the symbol. Bars.Info.Margin: returns 1000 if the margin for the symbol of the primary data series is set to 1000 in the QuoteManager.
MinMove Returns a double value with the symbol’s minimum price movement, expressed as a whole number. To retrieve the minimum movement (i.e., one tick) between trades, divide MinMove by PriceScale. Bars.Info.MinMove: returns 25 for the e-Mini S&P 500, signalling that the minimum movement for ES is 0.25 (25 divided by the price scale of 100).
Name Returns a string with the name of the symbol. Bars.Info.Name: returns "EUR/GBP" when the symbol of the primary data series is the EUR/GBP symbol.
OptionType Returns an enumerator from the OptionType enumeration; returned values are Call or Put. Bars.Info.OptionType: returns Call when the primary data series is a call option.
PointValue Returns a double value indicating the market value of a single fractional PriceScale unit change. Is arrived at by dividing the BigPointValue by the PriceScale. Bars.Info.PointValue: returns 0.50 when the symbol of the primary data series is ES, signalling that one PriceScale unit (a 1/100th) equals $0.50 and one tick (25 points) would equal $12.50 (25 points * 0.50 PointValue = $12.50).
PriceScale Returns a double value with the fractional portion of a full point move for the symbol (represented by a whole number). Bars.Info.PriceScale: returns 100 when the symbol of the primary data series is the ES, which has its price scale set in the QuoteManager set to the option '1/100'.
StrikePrice Returns a double value with the strike price of an option. Bars.Info.StrikePrice: returns the strike price of the primary data series.

Accessing QuoteManager settings programmatically: visually explained

To highlight which Bars.Info property returns which QuoteManager field, several of them are shown below:

Example of the QuoteManager in MultiCharts .NET Example of information in the MultiCharts .NET QuoteManager

To access QuoteManager data for non-primary data series, substitute the Bars property with the BarsOfData() method. For example, BarsOfData(2).Info.Category returns the category of the second data series.

MultiCharts .NET programming example

First, two attributes are set:

[SameAsSymbol(true), UpdateOnEveryTick(false)]

The SameAsSymbol attribute set to true ensures that the indicator does not create its own sub-chart, and UpdateOnEveryTick set to false only lets the indicator update on bar close.

Output symbol and data feed information

The essence of the example is placed in the StartCalc() override method, so that these statements are only executed once every calculation cycle (see MultiCharts, 2013). This part starts with the following:

Output.Clear();

Output.WriteLine("{0} ({1}) trades on {2} and data comes from {3}.",
    Bars.Info.Name,
    Bars.Info.Description,
    Bars.Info.Exchange,
    Bars.Info.DataFeed);

The Output.Clear() method is called to clear the PowerLanguage .NET Editor Output Window as to prevent cluttering.

Then the Output.WriteLine() method is called with a string argument formatted with substitution parameters. Four values are outputted here: the symbol (Bars.Info.Name), its description (Bars.Info.Description), the name of the exchange (Bars.Info.Exchange), and the name of the data feed (Bars.Info.DataFeed).

Using the MultiCharts .NET symbol’s category conditionally

Next is an if statement:

if (Bars.Info.Category == ESymbolCategory.Future)
{
    Output.WriteLine("{0} is a {1}.",
        Bars.Info.Name,
        Bars.Info.Category);
}

This evaluates the expression whether the category of the primary data series (an enumerator returned by Bars.Info.Category) is a future (ESymbolCategory.Future). Since that evaluates to true, the symbol’s name and category are printed to the Output Window (lines 25-27).

Working with the MultiCharts .NET Big Point Value

Then price value data is outputted:

Output.WriteLine("The symbol's BPV is {0}, it's MinMove is {1} and price scale {2}.",
    Bars.Info.BigPointValue,
    Bars.Info.MinMove,
    Bars.Info.PriceScale);

Three values are included in the Output.WriteLine() method here: the BigPointValue (Bars.Info.BigPointValue), the minimum price movement (Bars.Info.MinMove), and the symbol’s price scale (Bars.Info.PriceScale).

Calculating the value of one tick in MultiCharts .NET

The last part calculates the currency value of one tick:

double tickValue = (Bars.Info.MinMove / Bars.Info.PriceScale) * Bars.Info.BigPointValue;

Output.WriteLine("One tick in {0} would be {1} dollar.",
    Bars.Info.Name,
    tickValue);

The tick value is arrived at by dividing MinMove by PriceScale, and multiply the result with the BigPointValue. With the Output.WriteLine() method this information is printed to the Output Window.

Key points:

  • The QuoteManager settings of the primary data series can be accessed with Bars.Info read-only properties;
  • Symbol information for additional data series can be retrieved with help of the BarsOfData() method.
References

Henry MultiCharts (2013, December 13). MultiCharts .NET FAQ. Retrieved on August 12, 2014, from http://www.multicharts.com/discussion/viewtopic.php?f=19&t=45848#p100800

MultiCharts (2013). MultiCharts .NET Programming Guide (version 1.0). Retrieved from http://www.multicharts.com/downloads/MultiCharts.NET-ProgrammingGuide-v1.0.pdf

MultiCharts (n.d.). MultiCharts User Manual. Retrieved from https://dl.dropboxusercontent.com/u/95112551/MultiCharts%20User%20Manual.pdf

MultiCharts Wiki (2012, April 18). PointValue. Retrieved on August 12, 2014, from http://www.multicharts.com/trading-software/index.php/PointValue

MultiCharts Wiki (2013, May 6). Setting Properties. Retrieved on August 11, 2014, from http://www.multicharts.com/trading-software/index.php/Setting_Properties