×

Sign up and get MultiCharts free

Use its powerful simulation mode with data included out of the box. Just fill out the form and start honing your trading skills with a few clicks.

Changes - MultiCharts

Changes

Jump to navigation Jump to search

4.7.5.3 Trading Functionality. TradingProfiles

4,433 bytes added, 18:43, 3 May 2013
Created page with "The ITradeManager interface contains the TradingProfiles property that returns an array of profiles represented as the ITradingProfile interface: <syntaxhighlight> public int..."
The ITradeManager interface contains the TradingProfiles property that returns an array of profiles represented as the ITradingProfile interface:

<syntaxhighlight>
public interface ITradingProfile
</syntaxhighlight>

=====Events=====

'''{{color|blue|event TConnection Connection;}}''' - By subscribing to this event it is possible get the notifications about disconnects and reconnects.

* {{color|blue|event TRealtime RT;}} - Real-time


=====Order operation methods=====
* {{color|blue|void CancelOrder(int order_id);}} - cancellation of the order by its ID.
* {{color|blue|void ModifyOrder(int order_id, OrderParams -order, MTPA_ModifiableOrderFields fields_for_modify);}} - modifications of the order fields by its ID
* {{color|blue|int[] PlaceOCOOrders(MTPA_OCOGroupType oco_type, params OrderParams[] orders);}} - submission of several orders within OCO group. This returns a list of successfully submitted order identifiers (IDs). The OCO group can be of two types:
# One Cancel Others means that the cancellation or execution of one order cancels all other orders.
# Reduce Size means that when Order#1 is filled for X contracts the amount of the contracts of the other orders in the group is reduced by X number of contracts.

* {{color|blue|int PlaceOrder(OrderParams order);}} - submission of one order. If submission is successful the identifier (ID) of the order will be returned. Otherwise, an exception like “System.Runtime.InteropServices.COMException.” will be generated.


=====Properties=====
* {{color|blue|string[] Accounts { get; }}} – returns the list of accounts for the current profile.
* {{color|blue|ETM_ConnectionChanged ConnectionState { get; }}} – the current connection state.
* {{color|blue|string CurrentAccount { get; set; }}} – a property that sets the current account that is used for trading.
* {{color|blue|MCSymbolInfo CurrentSymbol { get; set; }}} – a property that sets the current symbol that is used for trading and that is updated in real-time on RT event.
* {{color|blue|MTPA_ModifiableOrderFields ModifiableFields { get; }}} – Returns attribute indicating what fields are available for modification on a brokers side.
* {{color|blue|string Name { get; }}} – Profile name. This is the name specified by a user when creating a broker profile. The same broker can have several profiles with different settings for each one.
* {{color|blue|string PluginName { get; }}} Trading plug-in name that correlates with the broker (1-to-1).


The '''CurrentSymbol''' property has the following type:

'''{{color|blue|struct MCSymbolInfo}}'''
* {{color|blue|public MTPA_MCSymbolInfo2 symbol;}} - the symbol itself.
* {{color|blue|public string data_feed;}} - data source name (Interactive Brokers, eSignal, CQG etc).


'''{{color|blue|MTPA_MCSymbolInfo2}}
* {{color|blue|public string SymbolName;}} - name of the instrument, for example ESU3, EUR/USD
* {{color|blue|public string SymbolRoot;}} - symbol root (for futures), for example ES, CL
* {{color|blue|public string SymbolDescription;}} - Instriment description in words, for example, for ESU3 "S&P 500 E-mini Futures Sep13". Some data sources save additional info in this field.
* {{color|blue|public string SymbolExchange;}} - exchange name, for example GLOBEX, CME
* {{color|blue|public MTPA_MCSymbolCategories SymbolCategory;}} - symbol category, for example, futures, Forex or stock.
* {{color|blue|public MTPA_MCSymbolCurrency SymbolCurrency;}} - symbol currency, for example USD, EUR, JPY.
* {{color|blue|public DateTime SymbolExpiry;}} - expiration date(for futures), for example ESU3 09/19/2013.
* {{color|blue|public int MinMove;}} - minimum quantity of points, when the price moves by one minimum price increment, for example for ES MinMove = 25
* {{color|blue|public double PriceScale;}} - price scale, for example for ES = 1/100
* {{color|blue|public double BigPointValue;}} - Big Point Value. Profit/loss money equivalent in currency of the instrument , when the price moves by one minimum increment, for example, for ES = 50
* {{color|blue|public short PutOrCall;}} - for options
* {{color|blue|public double StrikePrice;}} - for options
* {{color|blue|public MTPA_SymbolFields UnsupportedFields;}} - instrument fields, which are not provided by the source


This structure can be received through the properties of '''Bars.Info.ASymbolInfo2''' for the current symbol.

[[Category:.NET Programming Giude]]

Navigation menu