Code cleanup.

This commit is contained in:
2026-02-24 12:20:56 -05:00
parent 3bbd539af4
commit 4d84c5e63c
14 changed files with 2 additions and 1977 deletions

View File

@@ -29,7 +29,6 @@ namespace TradeBlotter.ViewModels
private String selectedAccount = Constants.CONST_ALL;
private String selectedOperation;
private RelayCommand refreshCommand;
private bool useRealPrice = false;
private bool includeCash = false;
private bool busyIndicator = false;
private double cashBalance = double.NaN;
@@ -181,9 +180,7 @@ namespace TradeBlotter.ViewModels
PortfolioTrades accountTrades = GetAccountTrades();
foreach (PortfolioTrade portfolioTrade in accountTrades)
{
Price price = null;
if (useRealPrice) price = PriceCache.GetInstance().GetLatestPrice(portfolioTrade.Symbol);
if (null == price) price = PricingDA.GetPrice(portfolioTrade.Symbol);
Price price = PricingDA.GetPrice(portfolioTrade.Symbol);
totalExposure += price.Close * portfolioTrade.Shares;
if (sectorIndustry.Equals("Sector"))
{
@@ -248,11 +245,6 @@ namespace TradeBlotter.ViewModels
return sectorIndustryDataPointsContribution;
}
}
public bool UseRealPrice
{
get { return useRealPrice; }
set { useRealPrice = value; base.OnPropertyChanged("UseRealPrice"); }
}
public bool IncludeCash
{
get { return includeCash; }