Commit Latest
This commit is contained in:
@@ -169,7 +169,7 @@ namespace PortfolioManager.Models
|
||||
// The least squares might be in the wrong order if the Bollinger band was already sorted by date
|
||||
public static CompositeDataSource LeastSquares(BollingerBands bollingerBands)
|
||||
{
|
||||
if (null == bollingerBands || 0 == bollingerBands.Count) return null;
|
||||
if (null == bollingerBands || 0 == bollingerBands.Count) return Empty();
|
||||
LeastSquaresResult leastSquaresResult = bollingerBands.LeastSquaresFitClose();
|
||||
SortedDateTimeDataAdapter sortedDateTimeDataAdapter = new SortedDateTimeDataAdapter();
|
||||
List<BollingerBandElement> sortedBollingerBands = bollingerBands.OrderBy(x => x.Date).ToList();
|
||||
|
||||
@@ -10,12 +10,23 @@ namespace PortfolioManager.Models
|
||||
{
|
||||
public class PortfolioTradeModel
|
||||
{
|
||||
|
||||
private PortfolioTradeModel()
|
||||
{
|
||||
}
|
||||
|
||||
public static CompositeDataSource Empty()
|
||||
{
|
||||
CompositeDataSource compositeDataSource = new CompositeDataSource()
|
||||
{
|
||||
DataAdapter = new SortedDateTimeDataAdapter()
|
||||
};
|
||||
return compositeDataSource;
|
||||
}
|
||||
|
||||
public static CompositeDataSource PortfolioTrades(PortfolioTrades portfolioTrades)
|
||||
{
|
||||
if (null == portfolioTrades || 0 == portfolioTrades.Count) return null;
|
||||
if (null == portfolioTrades || 0 == portfolioTrades.Count) return Empty();
|
||||
List<PortfolioTrade> sortedPortfolioTrades = portfolioTrades.OrderBy(x => x.TradeDate).ToList();
|
||||
SortedDateTimeDataAdapter sortedDateTimeDataAdapter = new SortedDateTimeDataAdapter();
|
||||
foreach (PortfolioTrade portfolioTrade in sortedPortfolioTrades)
|
||||
|
||||
@@ -91,6 +91,7 @@ namespace PortfolioManager.ViewModels
|
||||
{
|
||||
Task workerTask = Task.Factory.StartNew(() =>
|
||||
{
|
||||
MDTrace.WriteLine(LogLevel.DEBUG, $"WatchListDA.GetWatchLists()");
|
||||
watchListNames = WatchListDA.GetWatchLists();
|
||||
watchListNames.Insert(0, UIConstants.CONST_ALL);
|
||||
selectedWatchList = watchListNames.Find(x => x.Equals("Valuations"));
|
||||
|
||||
Reference in New Issue
Block a user