EmulatedPortfolioManager

StockSharp.MatchingEngine

Portfolio manager that creates emulated portfolios in-memory.

実装: IPortfolioManager

プロパティ

MarginController : IMarginController

Margin controller for order validation.

メソッド

Clear()

Clears all adapter states and resets current state to Disconnected.

GetAllPortfolios() : IEnumerable<IPortfolio>

Get all portfolios.

GetPortfolio(string) : IPortfolio

Get or create a portfolio by name.

name
Portfolio name.

戻り値: Portfolio instance.

HasPortfolio(string) : bool

Check if portfolio exists.

name
Portfolio name.

戻り値: True if exists.

ValidateFunds(string, SecurityId, decimal, decimal) : InvalidOperationException

Validate that portfolio has sufficient funds for order registration.

portfolioName
Portfolio name.
securityId
Security ID (for per-position leverage).
price
Order price.
volume
Order volume.

戻り値: Error if insufficient funds, null otherwise.