BTALIB Indicator Classes give Unexpected argument
-
In The below code "sma" returns "Unexpected argument", any idea where is the problem ? thanks in advance
df = pd.read_csv('CSV Output/test.csv', index_col=0)
df.index = pd.to_datetime(df.index, unit='ms')
df['5sma'] = btalib.sma(df.Close, period=5).df -
Could you provide sample rows of data with head and the full error message? Thanks.
-
sample data
Open_time,Open,High,Low,Close,Volume,Close_time,Quote_asset_volume,Number_of_trades,Taker_buy_base_asset_volume,Taker_buy_quote_asset_volume,Ignore
2017-09-02 18:00:00,344.07,345.27,337.46,339.29,271.73674,1504378799999,92823.3500802,208,61.71943,21194.5824232,86814.83808612 -
I' m not sure what's going on. I've double checked your code and it is correct. Your error message is unfamiliar to me so I cannot comment. There must be an issue with the data perhaps? Have you tried running a simple ohlc through your formula to make sure btalib is functioning correctly?