EmulatedPortfolioManager
Portfoliomanager, der emulierte Portfolios im Speicher erstellt.
Implementiert: IMarkPrices
Eigenschaften
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.
public IMarginController MarginController { get; set; }
value = emulatedPortfolioManager.MarginController
emulatedPortfolioManager.MarginController = value
Margin Controller für die Auftragsvalidierung.
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
public void Clear()
emulatedPortfolioManager.Clear()
Löscht alle Adapterzustände und setzt den aktuellen Zustand auf Disconnected zurück.
public IEnumerable<EmulatedPortfolio> GetAllPortfolios()
result = emulatedPortfolioManager.GetAllPortfolios()
Holen Sie sich alle Portfolios.
public EmulatedPortfolio GetPortfolio(string name)
result = emulatedPortfolioManager.GetPortfolio(name)
Holen Sie sich oder erstellen Sie ein Portfolio nach Namen.
- name
- Portfolioname.
Rückgabe: Portfolioinstanz.
public bool HasPortfolio(string name)
result = emulatedPortfolioManager.HasPortfolio(name)
Prüfen Sie, ob das Portfolio existiert.
- name
- Portfolioname.
Rückgabe: Wahr, wenn es existiert.
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.
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.