/// <summary> /// Initializes a new instance of the <see cref="QuoteBar"/> class. /// </summary> public QuoteBar() { Ticker = TickerSymbol.NIL(""); Occured = new DateTime(); Bid = new BarImpl(); Ask = new BarImpl(); Price = 0; Period = TimeSpan.FromMinutes(1); DataType = DataType.QuoteBar; }
public BarImpl(BarImpl b) { Id = b.Id; _units = b._units; _ci = b.CustomInterval; Volume = b.Volume; _h = b.LHigh; _l = b.LLow; LOpen = b.LOpen; LClose = b.LClose; DayEnd = b.DayEnd; Time = b.Time; Bardate = b.Bardate; }
public Bar GetBar(int index, string symbol) { BarImpl b = new BarImpl(); if (index >= Count()) { return(b); } if (index < 0) { index = Count() - 1 + index; if (index < 0) { return(b); } } b = new BarImpl(Opens[index], Highs[index], Lows[index], Closes[index], Vols[index], Dates[index], Times[index], symbol, _intervaltype, _intervallength); if (index == Last()) { b.IsNew = _IsRecentNew; } return(b); }