Equity +20% (or -20%) compared with the initial Balance
-
So i am running a portfolio of EAs and what normally happens is with large stop losses i have a big increase in the balance and also a big drawdown... So with this in mind, i normally never have more equity than balance.
What i would like to do is:
A EA that compares the initial balance and closes all opened positions when Equity +20% (or -20%) compared with the initial Balance (last time that balance=equity with no trades open)Can you help me with that please?
-
If I understand you correctly you are running several EAs on different charts at the same time on the same MT4 platform. Is that correct?
-
MT5.. yeah, correct!
-
Are all those EAs the exact same code running on each chart or are they different codes dependeing on the chart? I mean, are you using the exact same EA on different charts or different EAs on different charts?
-
Mostly different EA's on different charts.
So i'm looking, preferentially, for an EA that i can drop randomly on a chart.. And that works with all positions/EA's on the MT5 Server.So lets say, I Drop it on a EURUSD chart, and it reaches those +20% equity (from the last time i had equity = balance and no trades open)
Initial Balance: 1000 euros
Inicial Equity: 1000 eurosafter a few trades...
GBPUSD - trade open
EURAUD - Trade open
EURUSD - Trade open
NZDUSD - trade openBalance = 2100 euros
Equity = 1200 euros (so the +20%) ...
Closes all open trades.New Balance: 1200 euros
New Equity: 1200 euros
No open trades currently.Restart the process..
-
In that case you need to work with terminal variables (and that's a lot of work!) I recommend you the following threads:
https://fxdreema.com/forum/topic/6151/working-with-terminal-variables-global-variables-on-mt4
https://fxdreema.com/forum/topic/4875/what-is-terminal-variables -
https://fxdreema.com/shared/ocAiF2hMc
A Bit loss..
Do you have a better idea how i can make it work?Thank you for the support, really appreciate the advice and all feedback
-
That same Termnal Variable must be present on all other EAs, not only in this one. Initially, it should work, but I guess every EA will have different conditions to close their own trades. You will need to test every scenario on every one. Without seeing all those EA, not much help I can provide, I'm afraid.
-
@l-andorrà
I'll keep working on it..Thank you!
-
@l-andorrà Damn, I might be unlucky that you're no longer an active member of the forum since this topic is from 2019. But I have a similar question to his, though I use the same EA (with the same code) for all charts. Can you help me?
-
@tiagocys l-andorrà is an active user, might take him a day or so to see but he will.
Create a question saying what you require
-
Well, the truth is that I'm not an expert at terminal variables.
I just shared info to show previous threads on how to do it, but I would not be able to do it myself, sorry.