Add EffectiveDate back to StopLimit
Some checks failed
Build .NET Project / build (push) Has been cancelled

This commit is contained in:
2026-02-18 22:16:55 -05:00
parent 2d6d29f57c
commit 9d7485da99
2 changed files with 51 additions and 3 deletions

View File

@@ -55,6 +55,8 @@ namespace MarketData.MarketDataModel
public double StopPrice{get;set;}
public double Shares{get;set;}
public String StopType{get;set;}
public DateTime EffectiveDate{get;set;} // if the EffectiveDate is Epoch then the StopLimit is taken to be in effect and is the most recent. Otherwise it is considered an historical stop limit
public StopLimit()
{
@@ -67,6 +69,7 @@ namespace MarketData.MarketDataModel
sb.Append(Utility.FormatCurrency(StopPrice)).Append(",");
sb.Append(Utility.FormatNumber(Shares, 3)).Append(",");
sb.Append(StopType).Append(",");
sb.Append(EffectiveDate.ToShortDateString());
return sb.ToString();
}
@@ -77,6 +80,7 @@ namespace MarketData.MarketDataModel
nvpCollection.Add(new NVP("StopPrice", StopPrice.ToString()));
nvpCollection.Add(new NVP("Shares", Shares.ToString()));
nvpCollection.Add(new NVP("StopType", StopType.ToString()));
nvpCollection.Add(new NVP("EffectiveDate",EffectiveDate.ToShortDateString()));
return nvpCollection;
}
@@ -89,6 +93,7 @@ namespace MarketData.MarketDataModel
stopLimit.StopPrice=nvpDictionary["StopPrice"].Get<double>();
stopLimit.Shares=nvpDictionary["Shares"].Get<double>();
stopLimit.StopType=nvpDictionary["StopType"].Get<String>();
stopLimit.EffectiveDate=nvpDictionary["EffectiveDate"].Get<DateTime>();
return stopLimit;
}
}