_raw_bars get a copy from self._raw_bars[symbol], Then append the new tick_data to this copy.
But not any code like self._raw_bars[symbol] = _raw_bars is invoked to keep this change.
This cause self._raw_bars[symbol] not changed always. and the ohlc always the value of the last tick.
2.
I think Change
if len(self._bars[symbol].index) > previous_bar_count
to
if len(self._bars[symbol].index) > previous_bar_count and previous_bar_count > 0
is more reasonable
To be more concrete. I think do something like this:
Change
In the function of on_tick_received in the file blotter.py 1.
_raw_bars get a copy from self._raw_bars[symbol], Then append the new tick_data to this copy. But not any code like
self._raw_bars[symbol] = _raw_bars
is invoked to keep this change. This cause self._raw_bars[symbol] not changed always. and the ohlc always the value of the last tick.2. I think Change
if len(self._bars[symbol].index) > previous_bar_count
toif len(self._bars[symbol].index) > previous_bar_count and previous_bar_count > 0
is more reasonableTo be more concrete. I think do something like this: Change
to