You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.
bars['rsi'] = bars.rsi(window=10) throws the following exception:
File "rsistrat.py", line 27, in
strategy.run()
File "/usr/local/lib/python3.6/site-packages/qtpylib/algo.py", line 393, in run
self.blotter.drip(history, drip_handler)
File "/usr/local/lib/python3.6/site-packages/qtpylib/blotter.py", line 1102, in drip
handler(data.iloc[i:i + 1])
File "/usr/local/lib/python3.6/site-packages/qtpylib/asynctools.py", line 100, in async_method
return callee(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/qtpylib/algo.py", line 865, in _bar_handler
self._base_bar_handler(bar)
File "/usr/local/lib/python3.6/site-packages/qtpylib/algo.py", line 857, in _base_bar_handler
self.on_bar(bar_instrument)
File "rsi_strategy.py", line 14, in on_bar
bars['rsi'] = bars.rsi(window=10)
File "/usr/local/lib/python3.6/site-packages/qtpylib/indicators.py", line 380, in rsi
deltas = np.diff(series)
File "<array_function internals>", line 6, in diff
File "/usr/local/lib64/python3.6/site-packages/numpy/lib/function_base.py", line 1269, in diff
a = op(a[slice1], a[slice2])
TypeError: unsupported operand type(s) for -: 'float' and 'str'
The text was updated successfully, but these errors were encountered:
bars['rsi'] = bars.rsi(window=10) throws the following exception:
File "rsistrat.py", line 27, in
strategy.run()
File "/usr/local/lib/python3.6/site-packages/qtpylib/algo.py", line 393, in run
self.blotter.drip(history, drip_handler)
File "/usr/local/lib/python3.6/site-packages/qtpylib/blotter.py", line 1102, in drip
handler(data.iloc[i:i + 1])
File "/usr/local/lib/python3.6/site-packages/qtpylib/asynctools.py", line 100, in async_method
return callee(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/qtpylib/algo.py", line 865, in _bar_handler
self._base_bar_handler(bar)
File "/usr/local/lib/python3.6/site-packages/qtpylib/algo.py", line 857, in _base_bar_handler
self.on_bar(bar_instrument)
File "rsi_strategy.py", line 14, in on_bar
bars['rsi'] = bars.rsi(window=10)
File "/usr/local/lib/python3.6/site-packages/qtpylib/indicators.py", line 380, in rsi
deltas = np.diff(series)
File "<array_function internals>", line 6, in diff
File "/usr/local/lib64/python3.6/site-packages/numpy/lib/function_base.py", line 1269, in diff
a = op(a[slice1], a[slice2])
TypeError: unsupported operand type(s) for -: 'float' and 'str'
The text was updated successfully, but these errors were encountered: