protected Quote ConvertAndFlushQuote(SpiderQuote originalQuote)
        {
            DataManager.Add(this.Instrument,
                originalQuote.DateTime,
                originalQuote.Bid,
                originalQuote.BidSize,
                originalQuote.Ask,
                originalQuote.AskSize);

            DataManager.Flush();

            var convertedAndAddedQuote = DataManager.GetHistoricalQuotes(this.Instrument,
                originalQuote.DateTime.AddMinutes(-20 * ExecutionTimePeriod),
                originalQuote.DateTime).Last;

            return convertedAndAddedQuote;
        }
 private bool ValidateQuote(SpiderQuote quote)
 {
     return (quote.Bid > 0 &&
             quote.Ask > 0 &&
             quote.AskSize > 0 &&
             quote.BidSize > 0);
 }
Exemplo n.º 3
0
        private SpiderQuote ConvertQuote(OpenQuant.API.Quote originalQuote)
        {
            SpiderQuote spiderQuote = new SpiderQuote()
            {
                DateTime = originalQuote.DateTime,
                Ask = originalQuote.Ask,
                Bid = originalQuote.Bid,
                AskSize = originalQuote.AskSize,
                BidSize = originalQuote.BidSize
            };

            return spiderQuote;
        }