28 private decimal _barSize;
60 var close = data.
Price;
61 var dataType = data.GetType();
71 volume = tradeBar.Volume;
76 else if (dataType == typeof(
Tick))
78 var tick = (
Tick)data;
85 volume = tick.Quantity;
92 throw new ArgumentException(
"VolumeRenkoConsolidator() must be used with TradeBar or Tick data.");
95 if (_currentBar ==
null)
99 var volumeLeftOver = _currentBar.
Update(data.
EndTime, high, low, close, volume);
100 while (volumeLeftOver >= 0)
103 _currentBar = _currentBar.
Rollover();
104 volumeLeftOver = _currentBar.
Update(data.
EndTime, high, low, close, volumeLeftOver);
112 public override void Scan(DateTime currentLocalTime)
132 base.OnDataConsolidated(consolidated);