Merge pull request #292 from niquedegraaff/patch-1

Update abstract.py: Set default dtype for Series instantiation
This commit is contained in:
louisnw01
2024-02-24 11:47:19 +00:00
committed by GitHub

View File

@ -659,7 +659,7 @@ class Candlestick(SeriesCommon):
f'Trying to update tick of time "{pd.to_datetime(series["time"])}", ' f'Trying to update tick of time "{pd.to_datetime(series["time"])}", '
f'which occurs before the last bar time of ' f'which occurs before the last bar time of '
f'"{pd.to_datetime(self._last_bar["time"])}".') f'"{pd.to_datetime(self._last_bar["time"])}".')
bar = pd.Series() bar = pd.Series(dtype='float64')
if series['time'] == self._last_bar['time']: if series['time'] == self._last_bar['time']:
bar = self._last_bar bar = self._last_bar
bar['high'] = max(self._last_bar['high'], series['price']) bar['high'] = max(self._last_bar['high'], series['price'])