Show / Hide Table of Contents

Interface IEntityFactory

The interface of the business-essences factory (Security, Order etc.).

Namespace: StockSharp.Algo
Assembly: StockSharp.Algo.dll
Syntax
public interface IEntityFactory

Methods

CreateBoard(String, Exchange)

To create exchange.

Declaration
ExchangeBoard CreateBoard(string code, Exchange exchange)
Parameters
Type Name Description
String code

Code value.

Exchange exchange

Exchange value.

Returns
Type Description
ExchangeBoard

Exchange.

CreateExchange(String)

To create exchange.

Declaration
Exchange CreateExchange(string code)
Parameters
Type Name Description
String code

Name value.

Returns
Type Description
Exchange

Exchange.

CreateMarketDepth(Security)

To create the order book for the instrument.

Declaration
MarketDepth CreateMarketDepth(Security security)
Parameters
Type Name Description
Security security

Security.

Returns
Type Description
MarketDepth

Created order book.

CreateMyTrade(Order, Trade)

To create own trade.

Declaration
MyTrade CreateMyTrade(Order order, Trade trade)
Parameters
Type Name Description
Order order

Order.

Trade trade

Tick trade.

Returns
Type Description
MyTrade

Created own trade.

CreateNews()

To create news.

Declaration
News CreateNews()
Returns
Type Description
News

News.

CreateOrder(Security, Nullable<OrderTypes>, Int64)

To create the order by the transaction identifier.

Declaration
Order CreateOrder(Security security, Nullable<OrderTypes> type, long transactionId)
Parameters
Type Name Description
Security security

Security.

Nullable<OrderTypes> type

Order type.

Int64 transactionId

The identifier of the order registration transaction.

Returns
Type Description
Order

Created order.

CreateOrderFail(Order, Exception)

To create the error description for the order.

Declaration
OrderFail CreateOrderFail(Order order, Exception error)
Parameters
Type Name Description
Order order

Order.

Exception error

The system description of error.

Returns
Type Description
OrderFail

Created error description.

CreateOrderLogItem(Order, Trade)

To create the string of orders log.

Declaration
OrderLogItem CreateOrderLogItem(Order order, Trade trade)
Parameters
Type Name Description
Order order

Order.

Trade trade

Tick trade.

Returns
Type Description
OrderLogItem

Order log item.

CreatePortfolio(String)

To create the portfolio by the account number.

Declaration
Portfolio CreatePortfolio(string name)
Parameters
Type Name Description
String name

Account number.

Returns
Type Description
Portfolio

Created portfolio.

CreatePosition(Portfolio, Security)

Create position.

Declaration
Position CreatePosition(Portfolio portfolio, Security security)
Parameters
Type Name Description
Portfolio portfolio

Portfolio.

Security security

Security.

Returns
Type Description
Position

Created position.

CreateSecurity(String)

To create the instrument by the identifier.

Declaration
Security CreateSecurity(string id)
Parameters
Type Name Description
String id

Security ID.

Returns
Type Description
Security

Created instrument.

CreateTrade(Security, Nullable<Int64>, String)

To create the tick trade by its identifier.

Declaration
Trade CreateTrade(Security security, Nullable<long> id, string stringId)
Parameters
Type Name Description
Security security

Security.

Nullable<Int64> id

The trade identifier (equals null, if string identifier is used).

String stringId

Trade ID (as string, if electronic board does not use numeric order ID representation).

Returns
Type Description
Trade

Created trade.

Extension Methods

Paths.Serialize<T>(T, String)
Paths.Serialize<T>(T)
EditorExtensions.ToItemsSource(Object, Type, Nullable<Boolean>, Nullable<ListSortDirection>, Func<IItemsSourceItem, Boolean>, Func<Object, String>, Func<Object, String>)
XamlHelper.WpfCast<T>(Object)
XamlHelper.CopyToClipboard<T>(T)
XamlHelper.EnsureUIThread(Object)
☀
☾
In This Article
Back to top
Copyright © StockSharp.
☀
☾