Possible bug using "For Each Closed Position" on MQL5 block.
-
Hi,
I want to print the Profit of the last closed trade. This is how it should be done:
https://fxdreema.com/shared/WCAWB3F2e
This works perfectly on MQL4, but it's not working on MQL5.
This project is printing the oldest trade Profit, like if the Loop direction is reversed (instead of selecting the newest trade, it is selecting the oldest one).
If I change it to print the Oldest trade (invert the Loop direction), it does nothing (does not print anything). Again, just to make it clear, this exact same project works perfectly using MQL4 blocks.
Is this a bug?
Thanks -
Yes. It can be a bug. I can say several of my mq4 fxDReema projects simply don't work when translated into mq5 blocks. I strongly recommend you contact directly the administrator through the support page detailing your problem.
-
Thank you for you replay.
I've made some additional testing.Those blocks actually work correctly when used on "Every Tick". The problem seems to be related to detecting Stop Loss and Take Profit (which I was trying to use).
-
Does it solve your problem? If not, you should still contactthe administrator via the support page.
-
I managed to find a different solution. I'll just keep this topic here, eventually the admin/programmer will read this and have a look at this bug.
Thanks for your time.