Click or drag to resize

TraderHelperLookupByPortfolioName Method

To get the portfolio by the code name.

Namespace:  StockSharp.Algo
Assembly:  StockSharp.Algo (in StockSharp.Algo.dll) Version: 4.4.16.0 (4.4.16)
Syntax
C#
public static Portfolio LookupByPortfolioName(
	this IPortfolioProvider provider,
	string id
)

Parameters

provider
Type: StockSharp.BusinessEntitiesIPortfolioProvider
The provider of information about portfolios.
id
Type: SystemString
Portfolio code name.

Return Value

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

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IPortfolioProvider. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also