Changes to support MGSHMomentumView
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user