internal void OnAccountReport(AccountReport report) { if (Strategy?.Status == StrategyStatus.Running) { Strategy.EmitAccountReport(report); } }
public AccountReport(AccountReport accountReport) : base(accountReport) { PortfolioId = accountReport.PortfolioId; CurrencyId = accountReport.CurrencyId; Amount = accountReport.Amount; Text = accountReport.Text; }
internal void OnAccountReport(AccountReport report) { if (IsPersistent && !report.IsLoaded) { Server?.Save(report, -1); } }
protected internal void EmitAccountReport(AccountReport report, bool queued = true) { if (queued && this.executionQueue != null) { this.executionQueue.Enqueue(report); } else { this.framework.EventServer.OnAccountReport(report); } }
internal void OnAccountReport(AccountReport report) { var portfolio = GetById(report.PortfolioId); if (portfolio != null) { portfolio.Add(report); } else { Console.WriteLine($"PortfolioManager::{nameof(OnAccountReport)} Error. Portfolio does not exist. Id = {report.PortfolioId}"); } }
public override object Read(BinaryReader reader, byte version) { var r = new AccountReport(); r.DateTime = new DateTime(reader.ReadInt64()); r.PortfolioId = reader.ReadInt32(); r.CurrencyId = reader.ReadByte(); r.Amount = reader.ReadDouble(); r.Text = reader.ReadString(); if (reader.ReadBoolean()) { r.Fields = (ObjectTable)this.streamerManager.Deserialize(reader); } return(r); }
public AccountTransaction(AccountReport report) : this(report.DateTime, report.Amount, report.CurrencyId, report.Text) { }
public override object Read(BinaryReader reader, byte version) { var r = new AccountReport(); r.DateTime = new DateTime(reader.ReadInt64()); r.PortfolioId = reader.ReadInt32(); r.CurrencyId = reader.ReadByte(); r.Amount = reader.ReadDouble(); r.Text = reader.ReadString(); if (reader.ReadBoolean()) { r.Fields = (ObjectTable)this.streamerManager.Deserialize(reader); } return r; }
internal void OnAccountReport(AccountReport report) { var portfolio = GetById(report.PortfolioId); if (portfolio != null) portfolio.Add(report); else Console.WriteLine($"PortfolioManager::{nameof(OnAccountReport)} Error. Portfolio does not exist. Id = {report.PortfolioId}"); }
internal virtual void vmethod_37(AccountReport report) { if (this.IsInstance && this.Portfolio != null && this.Portfolio.Id == report.PortfolioId) { this.OnAccountReport(report); } }
protected virtual void OnAccountReport(AccountReport report) { }
public void Add(AccountReport report) { Account.Add(report); }
internal void OnAccountReport(AccountReport report) => OnEvent(report);
protected internal void EmitAccountReport(AccountReport report, bool queued = true) { if (queued && this.executionQueue != null) this.executionQueue.Enqueue(report); else this.framework.EventServer.OnAccountReport(report); }
public void Add(AccountReport report) { Add(new AccountTransaction(report), true); }
internal void OnAccountReport(AccountReport report) { if (Strategy?.Status == StrategyStatus.Running) Strategy.EmitAccountReport(report); }
internal void OnAccountReport(AccountReport report) { if (IsPersistent && !report.IsLoaded) Server?.Save(report, -1); }