Table of Contents

Class CollectionPortfolioProvider

Namespace
StockSharp.Algo
Assembly
StockSharp.Algo.dll

Collection based implementation of IPortfolioProvider.

public class CollectionPortfolioProvider : IPortfolioProvider
Inheritance
CollectionPortfolioProvider
Implements
Inherited Members
Extension Methods

Constructors

CollectionPortfolioProvider()

Initializes a new instance of the CollectionPortfolioProvider.

public CollectionPortfolioProvider()

CollectionPortfolioProvider(IEnumerable<Portfolio>)

Initializes a new instance of the CollectionPortfolioProvider.

public CollectionPortfolioProvider(IEnumerable<Portfolio> portfolios)

Parameters

portfolios IEnumerable<Portfolio>

The portfolios collection.

Properties

Portfolios

Get all portfolios.

public IEnumerable<Portfolio> Portfolios { get; }

Property Value

IEnumerable<Portfolio>

Methods

Add(Portfolio)

Add security.

public void Add(Portfolio portfolio)

Parameters

portfolio Portfolio

Portfolio.

LookupByPortfolioName(string)

To get the portfolio by the code name.

public Portfolio LookupByPortfolioName(string name)

Parameters

name string

Portfolio code name.

Returns

Portfolio

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

Remove(Portfolio)

Remove security.

public bool Remove(Portfolio portfolio)

Parameters

portfolio Portfolio

Portfolio.

Returns

bool

Check result.

Events

NewPortfolio

New portfolio received.

public event Action<Portfolio> NewPortfolio

Event Type

Action<Portfolio>

PortfolioChanged

Portfolio changed.

public event Action<Portfolio> PortfolioChanged

Event Type

Action<Portfolio>