Separately manage trade sell and trade buy and their relative profits and losses with a single expert advisor and a single account on the broker
-
Hi, I would like to manage the realized profit and the unrealized profit of the sell positions separately but with a single expert advisor 50% of the initial capital. And separately the other 50% of the initial capital the realized profit and the unrealized profit of the buy positions. As if you had 2 accounts on the broker, but I would like to do it with only one account and only one expert advisor. it's possible???
-
Of course. You can create one same EA running on two different charts on the same account. Buys on one chart and sells in the other.
-
@l-andorrà But I would also like the respective profits, losses, and 50% of the initial capital to be separated. As if there were 2 equity and 2 balance in the same account.
-
@l-andorrà Practically the Sell positions must manage themselves in their own loss profits and in 50% of the initial capital without touching the profits the losses and 50% of the initial capital of the Buy positions. And the Buy positions must do the same.
-
@pontedruse said in Separately manage trade sell and trade buy and their relative profits and losses with a single expert advisor and a single account on the broker:
@l-andorrà Practically the Sell positions must manage themselves in their own loss profits and in 50% of the initial capital without touching the profits the losses and 50% of the initial capital of the Buy positions. And the Buy positions must do the same.
@fxdreema it can be done???
-
Honestly, I don't know if that can be done, sorry.
-
Even if I don't understand the reason for doing so, the logic I might think of the following:
Have your EA with 2 different magic numbers.
Have it calculate (or per setting) given a starting balance (eg full sum and -
sum and the EA calculates the half.
Have the EA filler the historic trade (complete history must be visible) or store it in file to preserve MT4 restart
Let EA add/reduce open profits / loss in order to stop when balance is consumed.Something like that?
-
@trader-philipps Give me a practical example with some screenshots or with a shared copy (web link)
-
@pontedruse said in Separately manage trade sell and trade buy and their relative profits and losses with a single expert advisor and a single account on the broker:
@trader-philipps Give me a practical example with some screenshots or with a shared copy (web link)
-
One of the many hypotheses I thought of is to create a variable in which there is 50% of the initial capital plus the profit from the purchase positions, and another variable in which there is 50% of the initial capital plus the profit of sales positions. How can I do it? @miro1360
-
@pontedruse I still think what you try to do is quiet complex. Even if you can handle all the money related stuff, you still need to care about persisting those values for the case you need to restart your terminal or just edit EA settings and the EA gets initialized once more.
In addition if you run more than one instance (aka chart) of the EA, there has to be a cross communication between the instances. May I ask you why you make it so complicated? Maybe if I understand the reason, I might think of other solutions. -
@pontedruse start with simpler tasks, gradually add to the complexity and you can create something ... there is no other way, only if someone would do it for you, but you won't learn anything