Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash: IndexError: only integers, slices (:), ellipsis (...), #72

Open
SergKlein opened this issue Dec 20, 2022 · 0 comments
Open

Crash: IndexError: only integers, slices (:), ellipsis (...), #72

SergKlein opened this issue Dec 20, 2022 · 0 comments

Comments

@SergKlein
Copy link

Have the issue:

if self.data.Close.values[i] > self.ema[i] and
IndexError: only integers, slices (:), ellipsis (...), numpy.newaxis (None) and integer or boolean arrays are valid indices

Just run next:

from autotrader import AutoTrader

Create AutoTrader instance, configure it, and run backtest

at = AutoTrader()
at.configure(verbosity=1, show_plot=True, feed='yahoo')
at.add_strategy('macd')
at.backtest(start = '1/6/2022', end = '1/10/2022')
at.virtual_account_config(initial_balance=1000, leverage = 1000)
at.run()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant