Files
Navigator/MarketDataLib/MarketDataModel/MobileDataModels.cs
2025-04-08 11:11:01 -04:00

51 lines
1.8 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
//using MarketData.Generator;
namespace MarketData.MarketDataModel
{
// These are models that were designed to be consumed by the mobile platform
public class PortfolioTradesWithParityPrice
{
public PortfolioTradesWithParityPrice(PortfolioTrades portfolioTrades, Price parityPrice)
{
Trades = portfolioTrades;
ParityPrice = parityPrice;
}
public Price ParityPrice { get; set; }
public PortfolioTrades Trades { get; set; }
}
// ************************************************************************************
public class GainLossSummaryItemDetail : GainLossSummaryItem
{
public GainLossSummaryItemDetail()
{
}
public GainLossSummaryItemDetail(GainLossSummaryItem gainLossSummaryItem)
{
this.Date=gainLossSummaryItem.Date;
this.Symbol=gainLossSummaryItem.Symbol;
this.CompanyName=gainLossSummaryItem.CompanyName;
this.CurrentGainLoss=gainLossSummaryItem.CurrentGainLoss;
this.PreviousGainLoss=gainLossSummaryItem.PreviousGainLoss;
this.Change=gainLossSummaryItem.Change;
this.ChangePercent=gainLossSummaryItem.ChangePercent;
this.HasStopLimit = gainLossSummaryItem.HasStopLimit;
}
public int Lots{get;set;}
public double Shares{get;set;}
public double Exposure{get;set;}
public double DividendYield{get;set;} // decimal
public double AnnualDividend{get;set;} // amount
public ParityElement ParityElement{get;set;}
public String ParityElementDescription{get{return null==ParityElement?"":ParityElement.ToString();}}
public double AllTimeGainLossPercent{get;set;}
public double PercentDistanceFromAllTimeGainLossPercent{get;set;}
public Price LatestPrice{get;set;}
public double PriceChange{get;set;}
}
}