How To Make "If Position" Blocks Run on Certain Area or Blocks?
-
Hello everybody, have a nice week…
I want “If position blocks (51 and 61)” to run only within “Area 1” and I want “If position blocks (171 and 181)” to run only within “Area 2”. You can see attached… Does anyone know how to make it?
Regards.

-
@allstarengin Are areas 1 an 2 completely independent? I mena. Do trades open on Area 1 be closed by those 'close positions' blocks on area 2? If not, you can define group 1 for area 1 and group 2 for area 2. That way trades will be completely independent from the other area.

-
@l-andorrà Areas 1 and 2 completely independent, bro. Actually, before asking you, I had already assigned the group as you suggested, but it didn’t work. However, I had set the 'filter by type' option based on the trade type, not as 'trade either...'. Maybe, the reason was that. I’ll try again accordingly. Thank you.
Best regards...
-
You're welcome.
-
@l-andorrà And what if trades open on Area 1 be closed by those 'close positions' blocks on area 2, bro? What should be done?
-
try change all in area 1 to group 1
all blocks must be in 1 group -
@Byens But now, multiple trades are opening in the same direction. However, I want only a maximum of 1 trade to be opened in the same direction. I don't understand

-
@allstarengin You can limit the max number of open trades by using this:

-
@l-andorrà I've located them at the top as attached but it didn't work.

-
@l-andorrà Might conditions be the reason for multiple same-way trades? You can see attached. Do those conditions mean Group 1 and 2 are not independent?

-
I guess the groups don't work the way we think they do... Because the documentation (https://fxdreema.com/documentation/builder/groups-and-magic-numbers) says:
#Group Numbers In fxDreema?
We already know that we can use multiple Expert Advisors to work with different trading strategies under the same MetaTrader. But we can also apply different strategies inside the same Expert Advisor, because it can operate with trades with different Magic Numbers. There is no requirement for our Expert Advisor to use only one Magic Number, it can use many.
So, the Group number is just an extension of the Magic Number. Each Expert Advisor created with fxDreema has one input parameter called MagicStart, which is the base magic number for all trades. The Group number is by default 0 (empty value) everywhere, so each trade/order would have Magic Number that is equal to the MagicStart input parameter.
This is the relationship between all these numbers:
Magic Number = MagicStart + Group
Now, let's imagine that we have MagicStart set as 1000. Then...
If Group is 0, then the Magic Number will be 1000
If Group is 1, then the Magic Number will be 1001
If Group is 2, then the Magic Number will be 1002
... and so on -
they do. His EA opens two buys in the same direction because the two conditions for buying are in diferent groups. I think that's why..
-
@tradingatr If the two conditions for buying are in diferent groups, then why "if conditions" blocks get activated for all buy condition blocks? Because, "if position" blocks should be triggered only for those which have the same group numbers. At least, is it possible to design if position blocks like that? Do you know how to make it?
-
To summarize, there are 2 things I want to achieve, which seem like they should be very simple to do in Fxdreema, but I haven’t been able to yet...
- "If conditions" blocks should only work within their assigned groups.
- There should be a maximum of 1 open trade in the same direction.
-
Can you please share the link to your project instead of uploading screenshots? I need to look at it in detail.
-
Sure bro, here is the link:
-
@allstarengin I believe what I want is simple; it seems to me that we should be able to do these things easily on fxdreema which is a comprehensive and professional platform... but how?

-
You didn't specify the grup number on any of your 'buy/sell now' blocks. All of them need to be identified accordingly.
-
OMG! How did I miss this? Plus, I also needed to assign groups to the 'close position' blocks. You’re awesome, brother! Thank you so much once again for your support. It’s true that I’ve been a bit distracted lately; I’ve been in my hometown for the past few days to visit my father’s grave. I’ve been feeling a bit down and emotional these days. Thanks again. God bless you. Below is the final link, and it’s working according to the logic I wanted...
-
You're welcome, man!
