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

Feature request: Add option to run Action if ALL applied Conditions are met #11

Open
Tentt opened this issue Aug 9, 2024 · 3 comments

Comments

@Tentt
Copy link

Tentt commented Aug 9, 2024

Add option to run Action if ALL applied Conditions are met

For example:

Condition1: Floating Profit raised 10%
Condition2: Open trades less than 10
Action: Close 100% of open trades

Now:
All positions will be closed once opened, because Condition2 met

Then:
Wait for 10% profit if open trades number is less than 10
If open trades number more than 10 - do nothing (wait human manual intervention)

@Tentt
Copy link
Author

Tentt commented Aug 15, 2024

@EarnForex Hello! What do you think? Is it possible?

@EarnForex
Copy link
Owner

It's an interesting suggestion, but it's not that simple to implement in the current AP. I will see if it can be done.

@Tentt
Copy link
Author

Tentt commented Aug 15, 2024

My vision (could be wrong):

To Main add Option "Wait all Conditions"

Declare 2 variables:
1st for count applied Conditions == 0
2nd for count activated Conditions == 0

For UI where you checking if Condition enabled to show checkbox after each "true" add 1st Variable +1
Update Event listeners: after each "true" add 2nd Variable +1

In action logic add IF Option enabled check if 1stVariable == 2ndVariable
Then do Actions
Else - continue regular process

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

2 participants