-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Option to limit order size/exposure #3
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
Would you like to try to make a PR for it? I think API-wise, something like this might work? Strategy.buy(..., size: float = 1) # percentage of cash |
I would if I were a python programmer. Unfortunately I'm just hacking around... started playing with python a month ago. With that being said, it is an interesting challenge but I won't make any promise :) |
I have monkey patched the code to make it work with variable position sizing. I will clean it up and submit a PR. |
@Pk13055 If you find time, I'd appreciate it! I know I've been looking into it briefly, and it seemed harder than I was willing to handle at the time. 😅 |
Gents, I'm also working with FOREX markets and also with leverage of 1:100 and up. Usually my position size is estimated in so called Lots (100k USD), the money management would be 0.1 Lots per 1000 USD balance. Could you please advise on how to simulate this? |
Is there a way to place orders that are limited in size?
I'm working on a Forex strategy where I want to specify the size of the order based on the SL/TP levels provided by a prediction model. Your library mentions that the Strategy.buy/sell methods use "all available funds" which cannot be used in this case.
Thank you!
The text was updated successfully, but these errors were encountered: