Maximum number of trades open
-
Hello to everyone. I am trying to limit the maximum number of trades open. Using the simple "Check counts" does not work ( I put before the sell\buy buttons, at the beginning, everywhere it made sense) but it did not work. As alternative I am using the Flag system. In this case the flag used is the one named "TradeFlag" but even in this case does not work. Can someone explain the logic behind the use of check counts and why is not working ? I saw other post complaining about the same problem but all the proposed solutions do not solve it. ( Can it be a coding problem within fxdreema ? )

-
Can you please share the link of the project. The screenshot is not enough, sorry.
-
1_1591028766020_kama-prova1.mq5 0_1591028766018_kama-prova1.ex5
Ciao l'andorrà, thanks for your reply. I post the two files here ( I actually don't know how to share the link of the project). Thank you in advance for your help. If there is a way that works with the "check trade counts" I would prefer it since it make thing much easier and linear. (To be honest i found fxdreema is a really good way to approach the creation of a strategy but I often struggle to make even simple rules to work out. I can also program so I am not the last arrived , so I would like to understand if also you or others are having same troubles )
Best,
Vincenzo -
This is the way to share a project. Could ypu please do it instead of donwloading the ex5 file?:

-
thank you, here is the link: https://fxdreema.com/shared/3hTfRYq3c
-
@l-andorrà hello hope your well is there a ready made automated robot built for meta 5 im new to this any help is appreciated farad
-
@farad Please farad, don't deviate from the OP thread.
-
@vincmcroom I'm not sure if the flag change in block 298 is the reason. There the flag is moved to true. This means that new trades can be open. Whay aren't you using this block?

-
I tried using it: I put lower than 3. But it didn't work. As I said in the first post i tried to put in different positions following the suggestions that i found in some other posts but it didn't work out. And I do not understand why, the logic behind it should be simple. How would you set it up if you want to limit the number of trades open to 2 ? Thanks, vincenzo
-
You need include filter when you have buy/sell orders in groups.
Try this:

-
Here: https://fxdreema.com/shared/jXni7Yt3b
You put a few blocks for counting the position in On Trade only (elsewhere it will be inefficient) and store the open trades count in a variable. Then you can check this variable against your limit.