CollectionPortfolioProvider

StockSharp.Algo

Collection based implementation of IPortfolioProvider.

Implements: IPortfolioProvider

Constructors

CollectionPortfolioProvider()

Initializes a new instance of the CollectionPortfolioProvider.

CollectionPortfolioProvider(IEnumerable<Portfolio>)

Initializes a new instance of the CollectionPortfolioProvider.

portfolios
The portfolios collection.

Properties

Portfolios : IEnumerable<Portfolio>

The list of portfolios.

Methods

Add(Portfolio)

Add security.

portfolio
Portfolio.
LookupByPortfolioName(string) : Portfolio

To get the portfolio by the code name.

name
Portfolio code name.

Returns: The got portfolio. If there is no portfolio by given criteria, is returned.

Remove(Portfolio) : bool

Remove security.

portfolio
Portfolio.

Returns: Check result.

Events

NewPortfolio : Action<Portfolio>

New portfolio received.

PortfolioChanged : Action<Portfolio>

Portfolio changed.