Inheritance: ExecutionMessage
 internal void OnAccountReport(AccountReport report)
 {
     if (Strategy?.Status == StrategyStatus.Running)
     {
         Strategy.EmitAccountReport(report);
     }
 }
Example #2
0
 public AccountReport(AccountReport accountReport) : base(accountReport)
 {
     PortfolioId = accountReport.PortfolioId;
     CurrencyId  = accountReport.CurrencyId;
     Amount      = accountReport.Amount;
     Text        = accountReport.Text;
 }
Example #3
0
 internal void OnAccountReport(AccountReport report)
 {
     if (IsPersistent && !report.IsLoaded)
     {
         Server?.Save(report, -1);
     }
 }
Example #4
0
 protected internal void EmitAccountReport(AccountReport report, bool queued = true)
 {
     if (queued && this.executionQueue != null)
     {
         this.executionQueue.Enqueue(report);
     }
     else
     {
         this.framework.EventServer.OnAccountReport(report);
     }
 }
Example #5
0
        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}");
            }
        }
Example #6
0
        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);
        }
Example #7
0
 public AccountTransaction(AccountReport report)
     : this(report.DateTime, report.Amount, report.CurrencyId, report.Text)
 {
 }
Example #8
0
 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 AccountReport(AccountReport accountReport) : base(accountReport)
 {
     PortfolioId = accountReport.PortfolioId;
     CurrencyId = accountReport.CurrencyId;
     Amount = accountReport.Amount;
     Text = accountReport.Text;
 }
 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}");
 }
Example #11
0
 internal virtual void vmethod_37(AccountReport report)
 {
     if (this.IsInstance && this.Portfolio != null && this.Portfolio.Id == report.PortfolioId)
     {
         this.OnAccountReport(report);
     }
 }
Example #12
0
 protected virtual void OnAccountReport(AccountReport report)
 {
 }
Example #13
0
 public void Add(AccountReport report)
 {
     Account.Add(report);
 }
Example #14
0
 internal void OnAccountReport(AccountReport report) => OnEvent(report);
Example #15
0
 protected internal void EmitAccountReport(AccountReport report, bool queued = true)
 {
     if (queued && this.executionQueue != null)
         this.executionQueue.Enqueue(report);
     else
         this.framework.EventServer.OnAccountReport(report);
 }
Example #16
0
 public void Add(AccountReport report)
 {
     Add(new AccountTransaction(report), true);
 }
Example #17
0
 public void Add(AccountReport report)
 {
     Add(new AccountTransaction(report), true);
 }
Example #18
0
 public AccountTransaction(AccountReport report)
     : this(report.DateTime, report.Amount, report.CurrencyId, report.Text)
 {
 }
Example #19
0
 internal void OnAccountReport(AccountReport report) => OnEvent(report);
Example #20
0
 internal void OnAccountReport(AccountReport report)
 {
     if (Strategy?.Status == StrategyStatus.Running)
         Strategy.EmitAccountReport(report);
 }
Example #21
0
 internal void OnAccountReport(AccountReport report)
 {
     if (IsPersistent && !report.IsLoaded)
         Server?.Save(report, -1);
 }