Check profit (average) and check profit (unrealised) not working? (MT5)
-
These two blocks have overlapping features. Both of them should allow you to check when your combined positions reach a certain profit target. I have tried both and while the blocks pass when the profit target n pips/$ is met, they also pass for -n!.
Below is a simple project to test this. To make it easier to visualise the results, I only allowed one trade at a time, which should still work. If anyone can find a mistake or propose an alternative solution, please let me know.
https://fxdreema.com/shared/PqMeukc4b

-
@tonyramirez They are measuring different things. 'Check profit (average)' calculated the average price of all open trades. This average number is a ponderate average of all profits and losses right now. On the other hand 'check profit (unrealised)' is the arithmetuc sum of all open trades, with no averaging bias. The do not provide the same final number.
-
Yes, I see that.
Since nobody has given any explanation for the -n result I'm reporting this as yet another bug.
-
@tonyramirez your EA has an SL of 50 pips, thats closing the trade. Not the profit checking block.
-
@roar said in Check profit (average) and check profit (unrealised) not working? (MT5):
@tonyramirez your EA has an SL of 50 pips, thats closing the trade. Not the profit checking block.
Thanks for checking it. That default 50 pip stop/TP has caught me out more than once!!
I will test again to make sure there no bug.
-
@tonyramirez I didn't see you duplicated this thread. Please don't duplicate threads. I answered the other one. Focus on just one of them, please.