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
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\backtesting\backtesting.py", line 1139, in run
strategy.init()
File "", line 5, in init
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\backtesting\backtesting.py", line 143, in I
raise ValueError(
ValueError: Indicators must return (optionally a tuple of) numpy.arrays of same length as data (data shape: (2148,); indicator "sma(C,10)"shape: (2139,), returned value: [104.761 104.878 104.048 ... 793.88 795.714 797.551])
bt.plot()
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\backtesting\backtesting.py", line 1589, in plot
raise RuntimeError('First issue backtest.run() to obtain results.')
RuntimeError: First issue backtest.run() to obtain results.
Expected Behavior
trading ((buy and sell)
Actual Behavior
not trading
Steps to Reproduce
but have problem
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\backtesting\backtesting.py", line 1139, in run
strategy.init()
File "", line 5, in init
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\backtesting\backtesting.py", line 143, in I
raise ValueError(
ValueError: Indicators must return (optionally a tuple of) numpy.arrays of same length as
data
(data shape: (2148,); indicator "sma(C,10)"shape: (2139,), returned value: [104.761 104.878 104.048 ... 793.88 795.714 797.551])This code is work, but didn't trading
I don't know how to fix it!!!!!
Additional info
bokeh.__version__
:The text was updated successfully, but these errors were encountered: