How to keep a fixed reference balance per trade in FxDreema (multi-EA issue)
-
Hi everyone again,
I’m trying to solve a specific issue in FxDreema related to running multiple EAs on the same account.
Goal:
I want to close partial positions when the profit reaches +1%, but that 1% must be calculated based on the account balance at the moment the trade was opened (not the current balance).Current setup:
- I use "check profit → % of balance = 1"
- Then I close partial
Context:
The EA (called Momentun) works perfectly when running alone on a single account.However, I run a portfolio of multiple EAs simultaneously. As a result, the account balance changes due to other EAs running at the same time and managing their own trades (opening and closing positions).
Because of this, the percentage-based calculation (based on account balance) becomes distorted for this specific EA (Momentun), since the balance is no longer constant.
Also, since I am running multiple EAs, I do not want to manually assign a fixed value to each EA. I need the EA to automatically take the account balance at the moment the trade is opened as its reference, and then use that fixed value for its logic (such as partial closes), regardless of how the balance changes later.
Problem:
Trades can remain open for extended periods (2 to 4 weeks), and during that time:- The account balance changes due to other EAs
- Both balance and equity can increase or decrease significantly due to other EAs
- So the 1% value also changes, therefore the calculation is altered and no longer reflects the real profit or loss generated by this specific EA (Momentun), since the balance or equity has changed due to other EAs
- This makes the logic inconsistent and distorts the behavior of this specific EA (Momentun)
What I need:
I need each trade to have its own fixed reference balance (the balance at the moment it was opened).Questions:
- What would be the best way in FxDreema to store the account balance at the moment a trade is opened and link it to that specific trade?
- How can this be handled per trade instead of using a global variable?
Here is my EA structure:
https://fxdreema.com/shared/xQbDDNRLThanks in advance

-
This should do it, there is code on two tabs: https://fxdreema.com/shared/UPExIp7D