mementum / bta-lib

Technical Analysis library in pandas for backtesting algotrading and quantitative analysis
MIT License
454 stars 106 forks source link

bta-lib error : trying to use rsi indicator but gives ValueError: cannot set using a slice indexer with a different length than the value #17

Open aliniko79 opened 3 years ago

aliniko79 commented 3 years ago

Im trying to use bta-lib to calculate rsi indicator although it was fine with the sma function but through an error on rsi function ''' df=pd.read_csv('prices.csv') sma=btalib.sma(df,period=9)#works fine rsi=btalib.rsi(df,period=14)#through an error ''' error= ValueError: cannot set using a slice indexer with a different length than the value... my df len is enough.