lose the difference between buying and selling
-
I try to close the difference between buying and selling only when the sum is five and profit is more than ten
shared/Ckh42Ezpd -
@khalids222 What do you exactly mean by 'close the difference'? Do you mean closing all open trades at the moment maybe?
-
@l-andorrà buy- sell =5 buy & total 5buy =10
-
@khalids222 I'm sorry, but I'm afraid I'm still confused. Do you mean you have buys and sells open at the same time and then the overall profit is 5$ or more as well as 10$ or less, at the same time?
-
@khalids222 No, that's not what I mean
https://fxdreema.com/shared/Ckh42EzpdSuppose we have 20 short and 30 long trades , here
30 buycount - 20 sell count = 10 buycount Let's call it (Q1) IN MY PROJECT
HERE I WANT CLOSE (Q1) ONLY WHEN IS = Q1 MORE 10$ -
@khalids222 Look at this Link at the end, it is a panel with many Mql5 formulas created by @Miro1360 and that have been great for me, in fact that panel I think does what you need or part of it.
-
@xyon126 Thank you, but can you specify any of these topics for me? I find more than 11 .000 TOPIC
-
@khalids222 That is a weird strategy at first glance. So you want to close 10 buy trades at random just because there are 10 more buys tha sells? What's the point of that? And how can you select what 10 buy trades should be close from all 30 open right now?
-
@l-andorrà said in lose the difference between buying and selling:
That is a weird strategy at first glance. So you want to close 10 buy trades at random just because there are 10 more buys tha sells? What's the point of that? And how can you select what 10 buy trades should be close from all 30 open right now?
I don't want to randomly close trades, I only want to close winning trades
After it reach a profit of ten dollars, or an average of ten dollars.
(BUYCOUNT )-(SELLCOUNT)= Q1
30-20=10
Q1>10
CLOSE Q1 ONLY -
@khalids222 With this block you can control the earnings, but as @l-andorrà andorra indicates share your EA and we will know exactly how you want it, so in writing the information is very diffuse.

-
@xyon126 This will close any deal of up to ten dollars indiscriminately
think this is the closest possible thing
https://fxdreema.com/shared/fginPTIIc -
@khalids222 The block "once per bar" number 29 and 30 go above and not after the blocks of "condition" 13 and 11 (also change the block number since they must be less) or this is how they have taught me here in forum.
-
@xyon126 Thank you, presence one per bar above condition it will make it run once per bar but under condition it will make it run In every event at the bar .This is not a mistake.
so the connected blocks will be executed according to their number
It does not solve the problem