Hi, I'm using backtrader with the ta-lib integration.
It seems that if you try to use an indicator which requires more than just the 'close' input it will fail, because backtrader only supplies the 'close' column from OHLC datasets.
Some examples:
ULTOSC
MFI
self.once(self._minperiod, self.buflen())
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/luke/.virtualenvs/myenv/lib/python3.8/site-packages/backtrader/talib.py", line 196, in once
output = self._tafunc(*narrays, **self.p._getkwargs())
File "/home/luke/.virtualenvs/myenv/lib/python3.8/site-packages/talib/__init__.py", line 27, in wrapper
return func(*args, **kwargs)
File "talib/_func.pxi", line 3703, in talib._ta_lib.MFI
TypeError: MFI() takes at least 4 positional arguments (1 given)
According to the documentation, the MFI indicator requires 4 inputs:
Hi, I'm using backtrader with the ta-lib integration. It seems that if you try to use an indicator which requires more than just the 'close' input it will fail, because backtrader only supplies the 'close' column from OHLC datasets.
Some examples:
According to the documentation, the MFI indicator requires 4 inputs: