-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
How to use backtesting.py for forex trading #10
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
+1 here. at least it would be helpful to be able to:
|
https://kernc.github.io/backtesting.py/doc/backtesting/backtesting.html in the init function you can specify a margin option
but for variable position size I'm looking for this option too ! |
Hi @kernc , I am wondering if the best way to add real forex trading support is to create a subclass of _Broker and implement all method with my real forex trading APIs. Any suggestion is appreciated. BTW, I'm using OANDA v20. Thanks in advance. |
Dear @kernc , is there a possibility to offer you a small job of integrating your lib into my project? I've tried doing it other developer following the guidelines in the questions asked here, but eventually it stops working either in one way or another due to the way signals are generated in my project. Of course, that would be paid. Really it should take no more than one for you to get it done since your know the ins and outs of this projects. If you would help on this one, please drop me a line on the email [email protected] or leave your contact. Thanks. |
Sorry for not chipping in sooner. I guess order sizing and what came with it required a more serious overhaul. I pushed PR #47 that adds order sizing (among other things). If anyone is interested to give it a glance, particularly to |
Expected Behavior
Having an example in the documentation on how use this library for Forex trading with lot size, position size, leverage, margin call, multiple positions opening, etc
Actual Behavior
I can't figure out how/if this is possible with this library even if you mention forex and have a sample set of EURUSD.
The methods
buy
andsell
ofStrategy
mention that they "close any current position and use all available funds" which seems a bit extreme and inflexible when money management recommends to use only 1% of your account on each trade.Maybe I didn't understand what you mean here but I don't see the point to use all or none of the account and not give a strategy a way to set the account's amount/percent we want per trade and to open several trades on the same pair, moreover for Forex with lots.
If not already coded, would love to help improve that.
Disclaimer: I'm new to trading and forex trading, maybe there's something I didn't understand on this part.
Awesome library btw
The text was updated successfully, but these errors were encountered: