public GMBar(GMBar bar) : base(bar) { this.lastClose = bar.lastClose; this.amount = bar.amount; this.adjFactor = bar.adjFactor; this.flag = bar.flag; }
private void setNewBar(GMSDK.Bar gskBar) { string symbol = gskBar.exchange + "." + gskBar.sec_id; Instrument curInstrument = InstrumentManager.Instruments[symbol]; if (curInstrument == null) { this.EmitError(2, "Symbol " + symbol + " was not found in InstrumentManager."); return; } GMBar gmBar = GSKToGM.ConvertBar(gskBar); this.OnNewBar(this, new BarEventArgs(gmBar, curInstrument, this)); }