Table of Contents

Interface IEntityFactory

Namespace
StockSharp.Algo
Assembly
StockSharp.Algo.dll

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

[Obsolete]
public interface IEntityFactory
Extension Methods

Methods

CreateBoard(string, Exchange)

To create exchange.

ExchangeBoard CreateBoard(string code, Exchange exchange)

Parameters

code string

Code value.

exchange Exchange

Exchange value.

Returns

ExchangeBoard

Exchange.

CreateExchange(string)

To create exchange.

Exchange CreateExchange(string code)

Parameters

code string

Name value.

Returns

Exchange

Exchange.

CreateMarketDepth(Security)

To create the order book for the instrument.

MarketDepth CreateMarketDepth(Security security)

Parameters

security Security

Security.

Returns

MarketDepth

Created order book.

CreateMyTrade(Order, Trade)

To create own trade.

MyTrade CreateMyTrade(Order order, Trade trade)

Parameters

order Order

Order.

trade Trade

Tick trade.

Returns

MyTrade

Created own trade.

CreateNews()

To create news.

News CreateNews()

Returns

News

News.

CreateOrder(Security, OrderTypes?, long)

To create the order by the transaction identifier.

Order CreateOrder(Security security, OrderTypes? type, long transactionId)

Parameters

security Security

Security.

type OrderTypes?

Order type.

transactionId long

The identifier of the order registration transaction.

Returns

Order

Created order.

CreateOrderFail(Order, Exception)

To create the error description for the order.

OrderFail CreateOrderFail(Order order, Exception error)

Parameters

order Order

Order.

error Exception

The system description of error.

Returns

OrderFail

Created error description.

CreateOrderLogItem(Order, Trade)

To create the string of orders log.

OrderLogItem CreateOrderLogItem(Order order, Trade trade)

Parameters

order Order

Order.

trade Trade

Tick trade.

Returns

OrderLogItem

Order log item.

CreatePortfolio(string)

To create the portfolio by the account number.

Portfolio CreatePortfolio(string name)

Parameters

name string

Account number.

Returns

Portfolio

Created portfolio.

CreatePosition(Portfolio, Security)

Create position.

Position CreatePosition(Portfolio portfolio, Security security)

Parameters

portfolio Portfolio

Portfolio.

security Security

Security.

Returns

Position

Created position.

CreateSecurity(string)

To create the instrument by the identifier.

Security CreateSecurity(string id)

Parameters

id string

Security ID.

Returns

Security

Created instrument.

CreateTrade(Security, long?, string)

To create the tick trade by its identifier.

Trade CreateTrade(Security security, long? id, string stringId)

Parameters

security Security

Security.

id long?

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

stringId string

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

Returns

Trade

Created trade.