bta-lib icon indicating copy to clipboard operation
bta-lib copied to clipboard

SMMA is not thread proof

Open justmeonthegit opened this issue 2 years ago • 0 comments

SMMA Function is working good when calling in not threading modus however when code is running in muli thread we get the following error:

File "/home/engine.traderbot/src/indicators/smma.py", line 192, in __calculate_smma
tmp = btalib.smma(self.ohlc_data[self.source], period=self.length)

File "/home/anaconda/envs/traderbot/lib/python3.7/site-packages/btalib/indicator.py", line 110, in call self.outputs = self.o = meta.outputs._from_class(cls) File "/home/anaconda/envs/traderbot/lib/python3.7/site-packages/btalib/meta/outputs.py", line 30, in _from_class return _CLSOUTPUTScls # defvals params in dict format File "/home/anaconda/envs/traderbot/lib/python3.7/site-packages/btalib/meta/lines.py", line 630, in init metadata.minperiods[self] = [1] * len(self)

justmeonthegit avatar Aug 16 '22 13:08 justmeonthegit