Work on StopLimits

This commit is contained in:
2026-02-18 22:18:36 -05:00
parent c5008e33d2
commit 7e0c5f22b6
6 changed files with 75 additions and 41 deletions

View File

@@ -36,17 +36,17 @@ namespace PortfolioManager.Models
return compositeDataSource;
}
public static CompositeDataSource CreateCompositeDataSource(DateTime xSource, double ySource)
{
if (Utility.IsEpoch(xSource)) return Empty();
SortedDateTimeDataAdapter sortedDateTimeDataAdapter = new SortedDateTimeDataAdapter();
sortedDateTimeDataAdapter.Add(xSource, ySource);
CompositeDataSource compositeDataSource = new CompositeDataSource()
{
DataAdapter = sortedDateTimeDataAdapter
};
return compositeDataSource;
}
// public static CompositeDataSource CreateCompositeDataSource(DateTime xSource, double ySource)
// {
// if (Utility.IsEpoch(xSource)) return Empty();
// SortedDateTimeDataAdapter sortedDateTimeDataAdapter = new SortedDateTimeDataAdapter();
// sortedDateTimeDataAdapter.Add(xSource, ySource);
// CompositeDataSource compositeDataSource = new CompositeDataSource()
// {
// DataAdapter = sortedDateTimeDataAdapter
// };
// return compositeDataSource;
// }
// This is the active gain/loss as number or percent.
public static CompositeDataSource GainLoss(ModelPerformanceSeries gainLossList, bool useGainLoss)