i am re-using a code which calculates trailing stop of a trade strategy
def calculate_trailing_stop():
xATR = talib.ATR(list(src), atrperiod)
here atrperiod is 10 and src is an array of last 10 samples. when I run this program I got following error indicating that at least 3 arguments are required:
result = func(*_args, **_kwds)
File "talib/_func.pxi", line 495, in talib._ta_lib.ATR
TypeError: ATR() takes at least 3 positional arguments (2 given)
Can anyone tell what the third argument should be? i am using python 3.8.1