"For Each Closed Position" block is not working.
-
The block described in the title (For Each Closed Position) is not working anymore.
Projects I made around a month ago (begnning of February) that used this block were working correctly.
When I import those same projects and compile them again, those blocks stops working.
I made a very simple project as example: https://fxdreema.com/shared/j4rfm1PBc
In this simple project, everytime a trade (any symbol any magic number) is closed the counter should be implemented by 1, but it is not.
Can you have a look please?
-
Yes, there ere some changes in the code a few weeks ago. You should use a new block in your projects instead of holding the old ones in your projects.
-
@l-andorrà Thank you for the reply.
But the project I shared as example is new, I made it just as I posted here... it means even new blocks are not working.
Have you tried the example? It's pretty simple. Just add it to your MT5 and wait for you other EAs or manual trades do complete. The counter should add 1 each time a trade is closed, but it is not working (at least not on my terminal...)
-
@rafaelgrecco i tested your project in the strategy tester and it doesn't show the count, i replace the block "comment" with a new one, it works now

-
@ambrogio is it couting the closed trades?
-
@rafaelgrecco yes
-
@l-andorrà said in "For Each Closed Position" block is not working.:
Yes, there ere some changes in the code a few weeks ago. You should use a new block in your projects instead of holding the old ones in your projects.
No, the blocks can stay the same, they don't need to be replaced with new ones. There is a situation when block replacement works, but this is when somewhere in its hidden properties (because they are all there, but some of them are hidden visually) some broken constant or a variable is lurking.
When I'm changing the code of some block, I prefer to do it in a way to not change it's assumed behavior. I only want to fix some bug or to add some new option. If I ever decide to really replace a block, which happened in the past, what I do is that I create a new block and the old one I deprecate. There is such functionality that when some block is deprecated, in the project where it used it appears darker and there is a warning message.
@ambrogio said in "For Each Closed Position" block is not working.:
@rafaelgrecco i tested your project in the strategy tester and it doesn't show the count, i replace the block "comment" with a new one, it works now
His "Comment" block is working fine, but he selected some dark colors and the text can't be seen on the default black background.
-
@rafaelgrecco I tested this and it worked on the tester. But when I tested it on real, it didn't work properly. I investigated it and eventually I found that in one function I forgot to put some code. I fixed this. I tested it and I think it works now.