bukosabino / ta

Technical Analysis Library using Pandas and Numpy
https://technical-analysis-library-in-python.readthedocs.io/en/latest/
MIT License
4.24k stars 864 forks source link

Bollinger Band data series - something is off #320

Closed szayedoud closed 1 year ago

szayedoud commented 1 year ago

Hi -

I am using ib_insync with ta, and I reinstantiate my BollingerBand object after each new bar, with the last 20 bars (maybe that's the problem). BollingerBands(close=self.bars["close"], window=20, window_dev=2, fillna=True)

Any ideas on these 2 issues? I apologize in advance if I'm not using the API properly. Is there a more event driven way, where I only have to instantiate it once, and each bar is updated on current instance of the indicator ?

szayedoud commented 1 year ago

The dataset needs to exceeed the window size to get proper calculations.