How to set candle ID and group?
-
I'm making an EA that uses two strategies with the same logic but make different position with different intensities (weak and strong signal, respectively). The 1st strategy opens a position with a weak pinbar (signal 1) and closes it at the EMA touch, and it does not open the next position until the previous one closes. The 2nd strategy uses a stronger pinbar (signal 2) and closes it at the EMA touch but is allowed to open a position even when a position from the 1st strategy (signal 1) exists.
I'm struggling to assign group and candle IDs. Please help!

-
Can you please share the link to your project instead of uploading a pic?
-
Hi, is this correct?
-
- "If trade Close" must be on "On Trade" tab.
- your "buy now" "sell now" blocks do not have the groups setup but you are trying to filter groups on "blocks 2 and 45"
- when you move "If trade Close" block to "On Trade" tab, make the group mode to "ALL"
-
Hi, pacificnet.lk,
Thank you for your reply. I moved the "if trade close" block to the "on Trade" tab and changed the group mode to "All (automated and manually opened)" for all blocks. In the strategy tester, the EA made multiple orders but did not close any of them. I think the assignment was not correct. Could you help me again?


-
Sorry for my late reply. Could you please share the latest version link again?
-
Hi, this is the newest link. I tried to fix it according to pacificnet.lk's kind advice but failed. Because the closing conditions are the same, "Open Order" and "Open Order 2" should each result in only one position. However, in my current EA, they create several positions until the closing point. Please help!
-
The problem is that block 43 is searching for all open trades, regardless the group number. You need to specify the group number that is to be closed. So you should create more than one closing structure, each specifying what to close per group.
-
Hi,
I appreciate your kind reply. I was able to fix the issue and found what was wrong. Thank you very much!
-
You're welcome.