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

Max profit to quit/hard cutoff - to support accounts - BUG #236

Open
drew2323 opened this issue Aug 25, 2024 · 0 comments
Open

Max profit to quit/hard cutoff - to support accounts - BUG #236

drew2323 opened this issue Aug 25, 2024 · 0 comments
Assignees
Labels
backend Covering backend functionality bug Something isn't working easy important multiaccount Related to multi account feature

Comments

@drew2323
Copy link
Owner

drew2323 commented Aug 25, 2024

Enable max profit to quit functionality (StrategyClassicSL.py - function stop_when_max_profit_loss) to be configured also on level of each account (currently now only overall for all accounts).

Design a notation in stratvars, something along these lines:

max_rel_profit_to_quit = [0.8, 0.3]
max_rel_profit_to_quit = [ACCOUNT1, ACCOUNT2]

Same with max loss (hard cutoff) max_sum_loss_to_quit = -500 - currently if the max loss is reached when closing a trade - it just shuts off regardless if there is another (maybe profitable) trade active on the different account - which causes that strategy shuts down leaving a trade active overnight.

Note: maybe it could be solved by existing directive hard_cutoff = false - doesnt quit rightaway but just blocks any new ENTRIES

@drew2323 drew2323 added backend Covering backend functionality easy labels Aug 25, 2024
@drew2323 drew2323 added multiaccount Related to multi account feature bug Something isn't working important labels Aug 26, 2024
@drew2323 drew2323 assigned drew2323 and unassigned pvlasak Aug 26, 2024
@drew2323 drew2323 changed the title Max profit to quit - to support accounts Max profit to quit/hard cutoff - to support accounts - BUG Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Covering backend functionality bug Something isn't working easy important multiaccount Related to multi account feature
Projects
Status: No status
Development

No branches or pull requests

2 participants