-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add indicators #74
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
Comments
... or you could put the indicators wherever you're calling from backtesting import Strategy, Backtest
... # put indicators here?
bt = Backtest(...) Or, if you want, Python by default looks for modules in the current working directory so you could use: # my_indicator_lib.py:
... # indicators here And in Python just: import my_indicator_lib HTH. |
Also, how are we supposed to use the stop loss in |
Exactly. Except: |
Thank you for your reply.
Also, it would be great if I can see detailed report on every positions entered? [Maybe good to provide an example.] Thanks again |
Trade-entering logic was overhauled in #47 (released in 0.2.0), rendering above issue hopefully rather obsolete. Additionally, the new way to access individual trades data is: stats = bt.run()
stats._trades # trade data |
Expected Behavior
I want to add indicators apart from SMA. I tried changing the init.py and added my function there but was unable to import it. I think I can import that function from a different file, make a strategy based on those indicators and backseat. I was just wondering if it was possible to add inside your files.
Actual Behavior
Steps to Reproduce
Additional info
The text was updated successfully, but these errors were encountered: