CollectionPortfolioProvider

StockSharp.Algo

Collection based implementation of IPortfolioProvider.

实现: IPortfolioProvider

构造函数

CollectionPortfolioProvider()

Initializes a new instance of the CollectionPortfolioProvider.

CollectionPortfolioProvider(IEnumerable<Portfolio>)

Initializes a new instance of the CollectionPortfolioProvider.

portfolios
The portfolios collection.

属性

Portfolios : IEnumerable<Portfolio>

The list of portfolios.

方法

Add(Portfolio)

Add security.

portfolio
Portfolio.
LookupByPortfolioName(string) : Portfolio

To get the portfolio by the code name.

name
Portfolio code name.

返回值: The got portfolio. If there is no portfolio by given criteria, is returned.

Remove(Portfolio) : bool

Remove security.

portfolio
Portfolio.

返回值: Check result.

事件

NewPortfolio : Action<Portfolio>

New portfolio received.

PortfolioChanged : Action<Portfolio>

Portfolio changed.