【发布时间】:2022-11-09 11:28:41
【问题描述】:
when i run this code it's obvious get this error s missing close value.
df['ADX'] = ta.adx(df['High'], df['Low'],length = 14)
df
output:
TypeError Traceback (most recent call last)
<ipython-input-23-1031ca130ef0> in <module>
----> 1 df['ADX'] = ta.adx(df['High'], df['Low'],length = 14)
2 df
TypeError: adx() missing 1 required positional argument: 'close'
now when give closing value and run
df['ADX'] = ta.adx(df['High'], df['Low'],df['Close'],length = 14)
df
output:
`enter code here`ValueError: Wrong number of items passed 3, placement implies 1
if any one know where i am doing wrong please let me know .
this is how i am gettinf dataframe
df = get_history(symbol = "BTCUSDT", interval = "1d", start = timestamp)
df
-
What is ta? how do I import?
-
@scott Boston usually imported like - import pandas_ta as ta