Added PrevClose to Price which should not be persisted in the database.

This commit is contained in:
2025-02-07 10:01:02 -05:00
parent 4100ba6db5
commit a7dbe3ae24

View File

@@ -325,6 +325,7 @@ namespace MarketData.MarketDataModel
private double close;
private long volume;
private double adjClose;
private double prevClose; // !!IMPORTANT we don't store this nor do we consider this when evaluating a valid price.
private PriceSource source;
public Price()
{
@@ -339,6 +340,7 @@ namespace MarketData.MarketDataModel
this.Close=price.Close;
this.Volume=price.Volume;
this.AdjClose=price.AdjClose;
this.PrevClose=price.PrevClose;
this.Source=price.Source;
}
public Price Clone()
@@ -352,6 +354,7 @@ namespace MarketData.MarketDataModel
clonePrice.Close=Close;
clonePrice.Volume=Volume;
clonePrice.AdjClose=AdjClose;
clonePrice.PrevClose=PrevClose;
clonePrice.Source=Source;
return clonePrice;
}
@@ -418,6 +421,11 @@ namespace MarketData.MarketDataModel
get { return adjClose; }
set { adjClose = value; }
}
public double PrevClose
{
get { return prevClose; }
set { prevClose = value; }
}
public bool IsValid
{
get