×

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.2.1 Collections elements

6,911 bytes added, 17:41, 3 May 2013
Created page with "Below the elements of IAccounts, ILogs, IOrders, and IPositions collections will be described. '''IAccounts''' collection contains the following elements: '''{{color|blue|..."
Below the elements of IAccounts, ILogs, IOrders, and IPositions collections will be described.


'''IAccounts''' collection contains the following elements:
'''{{color|blue|public struct Account}}''':
* {{color|blue|public string Profile { get; private set; }}} – Profile name.
* {{color|blue|public string Name { get; private set; }}} – Account name.
* {{color|blue|public double? Balance { get; private set; }}}
* {{color|blue|public double? Equity { get; private set; }}}
* {{color|blue|public double? OpenPL { get; private set; }}}
* {{color|blue|public bool BalanceInPrcnt { get; private set; }}} – Returns true, if Balance returns values in percent.
* {{color|blue|public bool EquityInPrcnt { get; private set; }}} – Returns true, if Equity returns values in percent.
* {{color|blue|public double? Margin { get; private set; }}} – Absolute value of margin.
* {{color|blue|public double? MarginAsPrcnt { get; private set; }}} –Margin value in percent.
* {{color|blue|public double? AvailableToTrade { get; private set; }}}
* {{color|blue|Nullable<T> fields(for example, double?)}} may be == null if the broker does not provide corresponding information.


'''ILogs''' collection contains the elements:
'''{{color|blue|public struct Log}}
* {{color|blue|public DateTime Time { get; private set; }}} – event time
* {{color|blue|public string Symbol { get; private set; }}} – symbol name
* {{color|blue|public string Profile { get; private set; }}} – profile name
* {{color|blue|public string Text { get; private set; }}} – message text
* {{color|blue|public ETM_MessageCategory Category { get; private set; }}} – message category (info, warning, error)
* {{color|blue|public string Source { get; private set; }}} – event source name
* {{color|blue|public string ID { get; private set; }}} – Event identifier, this is a number.


'''IOrders''' collection contains the following elements:
'''{{color|blue|public struct Order}}
* {{color|blue|public bool IsManual { get; private set; }}} – returns true if the order was generated manually, false if the order was generated by an automated system.
* {{color|blue|public DateTime GeneratedDT { get; private set; }}}- time of the order creation, i.e. the time when the order appeared in MultiCharts .NET during the current connection.
* {{color|blue|public DateTime? FinalDT { get; private set; }}} – time when the order moves to the final state.
* {{color|blue|public string Account { get; private set; }}} – account
* {{color|blue|public string Profile { get; private set; }}} – profile
* {{color|blue|public string Symbol { get; private set; }}} - symbol
* {{color|blue|public string Resolution { get; private set; }}} – resolution, this should not be empty when Automated Trading is being used.
* {{color|blue|public string Name { get; private set; }}} – order name, when Automated Trading is being used this contains the order name generated by the strategy. If Semi-Automated strategies for manual trading are being used this is contains the order names generated by them.
* {{color|blue|public string StrategyName { get; private set; }}} – strategy name, this should not be empty when Automated Trading is being used.
* {{color|blue|public string Workspace { get; private set; }}} – workspace name, this should not be empty when Automated Trading is being used.
* {{color|blue|public ETM_OrderAction Action { get; private set; }}} – action, this is buy or sell
* {{color|blue|public ETM_OrderState State { get; private set; }}} – order state, this is filled, cancelled, sent, etc.
* {{color|blue|public ETM_OrderCategory Category { get; private set; }}} – category this market, stop, limit, etc.
* {{color|blue|public ETM_OrderTIF TIF { get; private set; }}} – Time In Force of the order
* {{color|blue|public DateTime? TIFDate { get; private set; }}} Date for GTD Time In Force
* {{color|blue|public int Contracts { get; private set; }}} – number of contracts
* {{color|blue|public int FilledContracts { get; private set; }}} – number of filled contracts
* {{color|blue|public double? StopPrice { get; private set; }}} – stop price (!=null for stop & stoplimit orders)
* {{color|blue|public double? LimitPrice { get; private set; }}} – limit price (!=null for limit & stoplimit orders)
* {{color|blue|public double? ExecPrice { get; private set; }}} – average order execution price
* {{color|blue|public string BrokerID { get; private set; }}} – order ID returned by the broker
* {{color|blue|public int OrderID { get; private set; }}} – internal order ID that is generated by МultiСharts and is used for internal calculation for Automated Trading.
* {{color|blue|public string OCOGroupID { get; private set; }}} – OCO group ID. If the order is not a member of OCO group this field will be empty.
* {{color|blue|public string ID { get; }}} – unique order identifier, which is - Profile + BrokerID.



Order statuses:
'''{{color|blue|public enum ETM_OrderState}}
* {{color|blue|eTM_OS_Cancelled}} = 2, - cancelled, Final status.
* {{color|blue|eTM_OS_Filled}} = 3, - filled, Final status.
* {{color|blue|eTM_OS_Ignored}} = 9, - user cancelled order transmission within Automated Trading in the configuration dialogue, Final status
* {{color|blue|eTM_OS_PartiallyFilled}} = 7, - partially filled, will continue to be filled and will turn to eTM_OS_Filled state.
* {{color|blue|eTM_OS_PreCancelled}} = 6, - cancellation command has been sent.
* {{color|blue|eTM_OS_PreChanged}} = 8, - modification command has been sent.
* {{color|blue|eTM_OS_PreSubmitted}} = 0, - sent to the Exchange.
* {{color|blue|eTM_OS_Rejected}} = 4, - rejected by broker, Final Status.
* {{color|blue|eTM_OS_Saved}} = -10, - artificial status, that is set by MultiCharts .NET for active orders when the broker profile is disconnected or MultiCharts .NET is close, Final status.
* {{color|blue|eTM_OS_Sent}} = 5, - sent to the broker.
* {{color|blue|eTM_OS_Submitted}} = 1 – submitted at the Exchange.

Final Status means that the order turned in its final state and will not be modified.


'''IPositions''' collection contains the methods:
'''{{color|blue|public struct Position}}'''
* {{color|blue|public string Account { get; private set; }}} - account
* {{color|blue|public string Profile { get; private set; }}} - profile
* {{color|blue|public string Symbol { get; private set; }}} - symbol
* {{color|blue|public int Value { get; private set; }}} – market position(0== if closed, 0< if long and 0> if short).
* {{color|blue|public double AvgPrice { get; private set; }}} – average entry price
* {{color|blue|public double OpenPL { get; private set; }}} – current unrealized profit
* {{color|blue|public string ID { get; }}} – identifier, which is {{color|blue|Profile}} + {{color|blue|Account}} + {{color|blue|Symbol}}

[[Category:.NET Programming Giude]]

Navigation menu