Changes to support MGSHMomentumView

This commit is contained in:
2025-02-10 08:02:49 -05:00
parent 549f9ca7d1
commit 230d84904a
10 changed files with 324 additions and 436 deletions

View File

@@ -24,6 +24,7 @@ using System.Windows.Media;
using System.Windows.Threading;
using System.Windows.Forms;
using TradeBlotter.UIUtils;
using TradeBlotter.Extensions;
// Author:Sean Kessler
@@ -173,17 +174,7 @@ namespace TradeBlotter.ViewModels
{
if(saveParameters.ContainsKey("StopHistoryCount"))
{
stopLimits=new StopLimits();
int stopHistoryCount=int.Parse((from KeyValuePair<String,String> item in saveParameters where item.Key.Equals("StopHistoryCount") select item).FirstOrDefault().Value);
for(int index=0;index<stopHistoryCount;index++)
{
String strItemKey=String.Format("StopHistory_{0}",index);
String strStopHistoryItem=(from KeyValuePair<String,String> item in saveParameters where item.Key.Equals(strItemKey) select item).FirstOrDefault().Value;
NVPCollection nvpCollection=new NVPCollection(strStopHistoryItem);
StopLimit stopLimit=MarketData.MarketDataModel.StopLimit.FromNVPCollection(nvpCollection);
stopLimits.Add(stopLimit);
}
stopLimits=new StopLimits(stopLimits.OrderBy(x => x.EffectiveDate).ToList());
stopLimits = StopLimitsExtensions.FromSaveParams(saveParameters);
}
}
catch(Exception exception)