Remove Active from StopLimit.
All checks were successful
Build .NET Project / build (push) Successful in 4m45s
All checks were successful
Build .NET Project / build (push) Successful in 4m45s
This commit is contained in:
@@ -57,42 +57,34 @@ namespace MarketData.MarketDataModel
|
||||
public double StopPrice{get;set;}
|
||||
public double Shares{get;set;}
|
||||
public String StopType{get;set;}
|
||||
public int Active{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()
|
||||
{
|
||||
}
|
||||
public StopLimit(String symbol,double stopPrice,int shares,String stopType,int active)
|
||||
{
|
||||
this.Symbol=symbol;
|
||||
this.StopPrice=stopPrice;
|
||||
this.Shares=shares;
|
||||
this.StopType=stopType;
|
||||
this.Active=active;
|
||||
}
|
||||
|
||||
public override String ToString()
|
||||
{
|
||||
StringBuilder sb=new StringBuilder();
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append(Symbol).Append(",");
|
||||
sb.Append(Utility.FormatCurrency(StopPrice)).Append(",");
|
||||
sb.Append(Utility.FormatNumber(Shares,3)).Append(",");
|
||||
sb.Append(Utility.FormatNumber(Shares, 3)).Append(",");
|
||||
sb.Append(StopType).Append(",");
|
||||
sb.Append(Active.ToString()).Append(",");
|
||||
sb.Append(EffectiveDate.ToShortDateString());
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
public virtual NVPCollection ToNVPCollection()
|
||||
{
|
||||
NVPCollection nvpCollection=new NVPCollection();
|
||||
nvpCollection.Add(new NVP("Symbol",Symbol.ToString()));
|
||||
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("Active",Active.ToString()));
|
||||
nvpCollection.Add(new NVP("EffectiveDate",EffectiveDate.ToShortDateString()));
|
||||
NVPCollection nvpCollection = new NVPCollection();
|
||||
nvpCollection.Add(new NVP("Symbol", Symbol.ToString()));
|
||||
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;
|
||||
}
|
||||
|
||||
public static StopLimit FromNVPCollection(NVPCollection nvpCollection)
|
||||
{
|
||||
StopLimit stopLimit=new StopLimit();
|
||||
|
||||
Reference in New Issue
Block a user