Handle multiple stop limits in the stop limit table and display them properly.

This commit is contained in:
2026-02-18 18:57:00 -05:00
parent cddf7202b1
commit a510a63772
3 changed files with 5 additions and 34 deletions

View File

@@ -16,17 +16,6 @@ namespace TradeBlotter.Model
{
}
//public static CompositeDataSource CreateCompositeDataSource(DateTime xSource,double ySource)
//{
// CompositeDataSource compositeDataSource;
// var xData=new EnumerableDataSource<DateTime>(new DateTime[] { xSource });
// xData.SetXMapping(x => (x.Ticks/10000000000.0));
// var yData=new EnumerableDataSource<double>(new double[] { ySource });
// yData.SetYMapping(y => y);
// compositeDataSource=xData.Join(yData);
// return compositeDataSource;
//}
public static CompositeDataSource Price(Price price)
{
if (null == price) return null;

View File

@@ -34,7 +34,7 @@ namespace TradeBlotter.Model
List<DateTime> stopLimitDates = new List<DateTime>();
foreach(StopLimit stopLimit in stopLimits)
{
stopLimitDates.Add(stopLimit.EffectiveDate);
stopLimitDates.Add(xSource);
}
var xData=new EnumerableDataSource<DateTime>(stopLimitDates.Select(x => x.Date));
xData.SetXMapping(x => (x.Ticks/10000000000.0));