EmulatedPortfolioManager

StockSharp.MatchingEngine

Portfoliomanager, der emulierte Portfolios im Speicher erstellt.

Implementiert: IMarkPrices

Eigenschaften

InitialMoney
public Func<string, decimal?> InitialMoney { get; set; }
value = emulatedPortfolioManager.InitialMoney
emulatedPortfolioManager.InitialMoney = value

The money an account holds when it is opened, by the account's name, or for an account that opens empty.

MarginController
public IMarginController MarginController { get; set; }
value = emulatedPortfolioManager.MarginController
emulatedPortfolioManager.MarginController = value

Margin Controller für die Auftragsvalidierung.

MarkPrices
public IMarkPrices MarkPrices { get; set; }
value = emulatedPortfolioManager.MarkPrices
emulatedPortfolioManager.MarkPrices = value

Where the prices to revalue open positions come from. Until the engine supplies them every position is worth what it cost.

Methoden

Clear
public void Clear()
emulatedPortfolioManager.Clear()

Löscht alle Adapterzustände und setzt den aktuellen Zustand auf Disconnected zurück.

GetAllPortfolios
public IEnumerable<EmulatedPortfolio> GetAllPortfolios()
result = emulatedPortfolioManager.GetAllPortfolios()

Holen Sie sich alle Portfolios.

GetPortfolio
public EmulatedPortfolio GetPortfolio(string name)
result = emulatedPortfolioManager.GetPortfolio(name)

Holen Sie sich oder erstellen Sie ein Portfolio nach Namen.

name
Portfolioname.

Rückgabe: Portfolioinstanz.

HasPortfolio
public bool HasPortfolio(string name)
result = emulatedPortfolioManager.HasPortfolio(name)

Prüfen Sie, ob das Portfolio existiert.

name
Portfolioname.

Rückgabe: Wahr, wenn es existiert.

TryGetPortfolio
public virtual bool TryGetPortfolio(string name, EmulatedPortfolio portfolio)
result = emulatedPortfolioManager.TryGetPortfolio(name, portfolio)

Look an account up without opening one, unlike String), which creates the account when the name is unknown.

name
Portfolio name.
portfolio
The account, or when no account carries that name.

Rückgabe: when the account exists.

ValidateFunds
public InvalidOperationException ValidateFunds(string portfolioName, SecurityId securityId, decimal price, decimal volume)
result = emulatedPortfolioManager.ValidateFunds(portfolioName, securityId, price, volume)

Validieren Sie, dass das Portfolio über ausreichende Mittel für die Registrierung von Bestellungen verfügt.

portfolioName
Portfolioname.
securityId
Kennung des Finanzinstruments (für den Hebelbetrag pro Position).
price
Bestellpreis.
volume
Auftragsvolumen.

Rückgabe: Fehler bei unzureichenden Mitteln, sonst null.