internal void Merge(OverridedQ overridedQuotation) { if (this.High.IsEmpty || decimal.Parse(overridedQuotation.Bid) >= decimal.Parse(this.High.OverridedQuotation.Bid)) { if (!this.High.IsEmpty && this.Low.IsEmpty) { this.Low = new QuotationPair(this.High); } this.High = new QuotationPair(overridedQuotation); if (!this.Last.IsEmpty && overridedQuotation.Timestamp >= this.Last.OverridedQuotation.Timestamp) { this.Last = QuotationPair.Empty; } } else if (this.Low.IsEmpty || decimal.Parse(overridedQuotation.Bid) <= decimal.Parse(this.Low.OverridedQuotation.Bid)) { this.Low = new QuotationPair(overridedQuotation); if (!this.Last.IsEmpty && overridedQuotation.Timestamp >= this.Last.OverridedQuotation.Timestamp) { this.Last = QuotationPair.Empty; } } else if (this.Last.IsEmpty || overridedQuotation.Timestamp >= this.Last.OverridedQuotation.Timestamp) { this.Last = new QuotationPair(overridedQuotation); } }
public AlertOverridedQuotation(OverridedQ overridedQ, AlertInstrument instrument) { this.instrument = instrument; this.quotePolicyID = overridedQ.QuotePolicyID; this.timestamp = overridedQ.Timestamp; this.ask = instrument.CreatePriceFromString(overridedQ.Ask); this.bid = instrument.CreatePriceFromString(overridedQ.Bid); this.high = instrument.CreatePriceFromString(overridedQ.High); this.low = instrument.CreatePriceFromString(overridedQ.Low); }
internal static Quotation Create(OverridedQ overridedQuotation) { return(Quotation.Create(overridedQuotation.InstrumentID, overridedQuotation.Ask, overridedQuotation.Bid, overridedQuotation.High, overridedQuotation.Low, overridedQuotation.Timestamp, Settings.Setting.Default)); }
internal QuotationPair(QuotationPair pair) { _quotation = pair.OverridedQuotation; }
internal QuotationPair(OverridedQ quotation) { _quotation = quotation; }