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

race condition #6

Open
disaster123 opened this issue Oct 4, 2024 · 4 comments
Open

race condition #6

disaster123 opened this issue Oct 4, 2024 · 4 comments

Comments

@disaster123
Copy link

disaster123 commented Oct 4, 2024

@EarnForex

Today I hit a race condition. I’ve setuped the scheduler to stop at 4pm in case there are no open trades. Today it happened that an ea opened a new position exactly at 4pm and auto scheduler stopped ea trading at the same time.

I think it should recheck after stopping ea if basket is still empty.

@EarnForex
Copy link
Owner

I understand the problem, but I don't see any good solution to this. Having it recheck would mean that it has to re-enable auto-trading to close the positions. If it re-enables it, other EAs may start opening new positions. This isn't good.

An alternative solution for you would be to use our Account Protector EA and use the 'Close other charts' action. Unfortunately, it would also mean that you'd have to re-attach all the EAs manually each time you want them to restart trading.

@disaster123
Copy link
Author

Thx for your reply. I don’t see any problem with reenabling the eas and yeah they might open new trades but the current system how it works.

If in my case the EA has opened at 3:59:59 Auto Scheduler hasn’t kicked in at all until all trades were closed. In that case new trades for other EAs were possible too. This could only be circumvented by matching specific magic numbers to specific EAs in Auto Scheduler but that sounds complex.

@disaster123
Copy link
Author

@EarnForex why do you exactly think this is different?

@EarnForex
Copy link
Owner

@EarnForex why do you exactly think this is different?

I'm not sure I follow you. What is different from what?

I don't like the idea of the ATS re-enabling algo-trading to close trades because it might end up in the same or worse situation, but this time it will be during the period when the user expects it to keep algo-trading off.

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