I am trying to limit trades to only 4
-
I want to limit all trades to only 4
I am using a trade counts block but it's not working.
Here's my code:
https://fxdreema.com/shared/WFeWNQAfd
cheers -
@jzfusion Delete the No trade block.
-
I recommend you to disconnect thet trailing block on top. Use a 'Pass' block separated from the current structure and then connect the trailing block to it.
-
I did but it's still not working. The EA opens multiple trades regardless. Is there something I'm missing here?
-
@jzfusion The bears/bulls in a row - signal type - is set to continuous. Set it to once per bar. Check trades count should be under the trigger conditions. Duplicate.
Trailing stop can be attached to the yellow dot (else). This reads as - if no trade - then if bulls in a row - buy. Else (yellow dot)(if trade), trailing stop.
Or you could put it separately with pass block as suggested. -
@cpxiom
Check out the link: https://fxdreema.com/shared/N1g31mAXb
I removed the "no trade" block -
@jzfusion Ok, try it that way, but important! Change signal type from continuous to once per bar. I used these blocks, and run into the same issue, and after changing, there was no problem.
-
@cpxiom
When I change to once per bar the EA doesn't open trades. -
@jzfusion It might be that you are using bears/bulls in a row to count for only one bull/bear candle. If it is a row, maybe it should be a minimum of two. Try with two, three, or use another block like bear candle, bull candle, found in the same place.
-
@jzfusion I just tested the project you posted above. I think the EA behaves as you configured it. Look at your Check trades count block.

This becomes true (orange dot) If there are 0-4 trades open. Asuming you have 4 trades already open, it passes the true condition another time (as 4 trades are less than 5 trades) and opens the 5th trade as one of both conditions are always true and will open a trade.
Does that makes sense?
So change it to < 4 and you'll only have 4 trades maximum.