EmulatedPortfolioManager
StockSharp.MatchingEngine
Portfolio manager that creates emulated portfolios in-memory.
Implementa: IPortfolioManager
Propiedades
MarginController : IMarginController
Margin controller for order validation.
Métodos
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.
Devuelve: Portfolio instance.
HasPortfolio(string) : bool
Check if portfolio exists.
- name
- Portfolio name.
Devuelve: 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.
Devuelve: Error if insufficient funds, null otherwise.