public IBars GetBars(ISymbol symbol, IScale scale) { if (l.IsDebugEnabled) { l.Debug("GetBars " + symbol + " " + scale); } lock (barss) { string key = symbol + "." + scale; if (barss.ContainsKey(key)) { return(barss[key]); } IBars newBars; if ((scale.scaleType == ScaleEnum.tick) && (scale.interval == 1)) { newBars = new Ticks(symbol); } else { newBars = new AggregateBars(this, symbol, scale); } barss.Add(key, newBars); return(newBars); } }
public IBars GetBars(ISymbol symbol, IScale scale) { if (l.IsDebugEnabled) l.Debug("GetBars " + symbol + " " + scale); lock (barss) { string key = symbol + "." + scale; if (barss.ContainsKey(key)) return barss[key]; IBars newBars; if ((scale.scaleType == ScaleEnum.tick) && (scale.interval == 1)) { newBars = new Ticks(symbol); } else newBars = new AggregateBars(this, symbol, scale); barss.Add(key, newBars); return newBars; } }