Check trades and For each trade blocks are not working in my project
-
I have spent many days trying to make an EA which opens maximum of 3 Buy trades and 3 Sell trades for each currency pair it trades in. I have tried to use For Each Block but the EA still opens more positions than expected. Here is the link for the project.https://fxdreema.com/shared/yZoH3ezMb
Perhaps there is something I am not doing correctly. I then tried the Check Trades Count. It did not work either. See project link: https://fxdreema.com/shared/VismTL53c. Then I tried Custom MQL code but it did not work because of error in the code. I am not a programmer. See link https://fxdreema.com/shared/FfkceluR.
Kindly give directions with step by step instructions on how I can resolve this problem. Perhaps a correction of Custom MQL code might help in case you can code. Thanks -
Technically this should work but, you have a no trade nearby which is possibly a loop causing the top blocks to be ignored, problems often come from too many blocks trying to do the same thing, strip it back and test one block, before adding the next.
-
I don't get it when you say technically this should work but I know it doesn't. Like which blocks do you have in mind to be removed?. I need all the blocks shown as part of my strategy. Removing the blocks would change my strategy.
-
What I mean is move blocks to rhe side, link out and switch off until you find the problem, probably just need to rearrange the order.