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: ability to add rules to a list #14

Open
Sebster7 opened this issue Feb 3, 2025 · 4 comments
Open

Feature: ability to add rules to a list #14

Sebster7 opened this issue Feb 3, 2025 · 4 comments

Comments

@Sebster7
Copy link

Sebster7 commented Feb 3, 2025

Hi, right now, I can see I might need to run 8 or so instances of this EA on my terminal, because I'd want rules for:

  1. for Magic X, close buy trades when they are 50 points in profit (on average and accounting for costs)
  2. for Magic X, close sell trades when they are 50 points in profit (on average and accounting for costs)
  3. for Magic Y, close buy trades when they are 100 points in profit (on average and accounting for costs)
  4. for Magic Y, close sell trades when they are 100 points in profit (on average and accounting for costs)
  5. for Magic not Z, notify me if an order is created or opened over lot size A (this condition is not yet implemented)
  6. when Equity <= % of snapshot, notify me (or ideally, when Equity <= % of balance, notify me - but this condition is not yet implemented)
  7. when Margin Level <= %, notify me (this condition is not yet implemented)
  8. when H1 bar closes, send me a report of floating profit/loss, floating profit/loss %, total lot size open on any instrument and in either direction, margin %, and free margin (this appears to be another new feature request, but maybe another EA can do this?)

So, I was wondering if it would make sense instead to have an Add rule button, and the rule appears below the checkboxes in a little scrollable panel, or in a pop-up window, and one could Edit or Delete rules from there, and basically have multiple rules running per instance of the EA.

I appreciate this may add quite a lot of complexity to the EA, and therefore may not be something you want to do, but I put it out there in case!

Cheers!

@EarnForex
Copy link
Owner

Hello!

I've had a thought on turning this EA into a sort of a programmable environment where conditions, actions, and filters on the platform, account, trades, and symbols could be arbitrarily combined to create systems of any complexity. And I thought that quite doable. However, I'm not sure that it's a good idea to turn the AP into that - it's best to start a new EA for that. And also, that's a lot of coding. So, I don't know when (and if) I'll start on this.

PS: Your condition 6 is already there as 'Equity <= % of balance' is the same as 'Floating loss rises to % of balance'. You just adjust the % by 100 - %. For example, if you want 'Equity <= 10% of balance', you set 'Floating loss rises to 90 % of balance'.

PPS: 'Margin Level <= %' is there.

@Sebster7
Copy link
Author

Sebster7 commented Feb 3, 2025

Hi, OK, do let me know on this issue if you do complete this, even if it's in a new EA (so not in this project)!

Ah, thank you re condition 6! Good to know!

I don't see 'Margin Level <=%'.
I see 'Free margin >= % of snapshot ([snapshot of free margin])', which I think is quite different. Unless it's not displaying for me? I put my screenshot on the other issue I created...

@EarnForex
Copy link
Owner

You have to enable 'Margin Level <=%' via input parameters. If you set the 'Disable margin level less or equal condition.' input parameter to false, the condition will appear on the Conditions tab.

@Sebster7
Copy link
Author

Sebster7 commented Feb 4, 2025

Oh, great, thank you! I hadn't spotted that.

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