@run-out thanks for your reply. Actually I'm using bta-lib on a data stream so I'm reindexing the dataframe on each incoming message, so any ideas for a better solution ?
For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See: http://commonmark.org/help/
Latest posts made by hoopoe
btalib.rsi doesn't work with default index
why btalib.rsi doesn't work with the default pandas dataframe indexing
lst = [1864.90, 1867.24, 1863.73, 1841.16, 1772.16] df = pd.DataFrame(lst, columns=['Close']) rsi = btalib.rsi(df.Close, period=2).df print(rsi)
TypeError: 'slice(2, None, None)' is an invalid key