Average take profit times no positions
-
Hi, I'm having a bit of trouble implementing the take profit system I want. I want a TP that averages out a group/basket of trades timed by the amount of open positions.
I can get it so it averages the TP across the group/basket, this is pretty simple, but I want it to times the target TP by the number of open trades in that group.
For example:
TP target is 10 PIPS per trade
Buy trade 1 opened at 1.0000 (TP is 1.0010 but that never gets reached so I open trade 2)
Buy trade 2 opened at 0.9980Now trade 1 has a TP of 1.0000 and trade 2 has a TP of 1.0000.
Trade 1 will close at break even, trade 2 will close at +20 PIPS (10 pips per trade)...and so on, obviously I'm thinking of more than 2 open trades at a time which means the TP needs to be averaged as new positions are opened/closed.
Any suggestions? Thanks

-
@willzed Hello,
What is the aim you want to get out of this? is it that you reach a certain amount of profit? If so, then the simplest thing you can do is is to use the following:
Unless you had something else in mind?
-
@q8carpenter Hi, thanks for your reply,
No I don't just want to reach a set amount of profit. The TP target would change depending on how many open positions there were, so I don't think your proposed solution would work. Let me try to explain again in a different way.
The TP is +10pips x the number of open positions, example:
1x open position TP is 10pips
5x open positions TP is 50pips
8x open positions TP is 80pips
etc....So it would be something like this...
Find how many open positions, find the sum (in pips) of the positions, set TP to 10 (pips) x the number of open poisons.
This would mean my TP changes depending on how many open positions I have and the more positions the higher the overall profit.
Thanks for any help, hope this is a better explanation!
-
@willzed
If I understand you correctly, this may help
-
Hi @q8carpenter . The value 10 in Formula block is the value of what?
-
@biztet the 10 pips that you multiplied by the # of open position
-
Oh, okay. I'll try it. Thanks @q8carpenter .
-
@willzed I don't get the logic. Why trade 2 should close at 20 pips target? Ig trade 1 is closed at BE, trade 2 got 10 pips, why adding 10 more?
-
@q8carpenter Super busy weekend here, will try it out ASAP and get back to you. Really appreciate the help, thanks

-
@q8carpenter Hey, sorry been at the other end of the country for family reasons and had no access to MT4 until today, hate asking people for help then not getting back.
Your solution wasn't exactly what I was looking for but pointed me in the right direction so managed to get what I wanted, thank you!
Think it was me who explained it badly anyway haha -
@l-andorrà I was just trying to mimic the exit strategy of an EA I was using to try and find a 'worst case scenario' for when the market turns against it. I didn't create the original EA so not sure why it was made that way to be honest
