Hi @fxDreema
Thanks for your support.
What I would like to have is a way to automatically create a string to manage the opened trades in blocks like "For each trade".
As an example. My Project opens (n) trades when the condition to enter at market is met. The loop creates (n) trades labelling each trade with a unique group number using a variable that is modified each time that loop passes:
0_1535657320695_24fc31a7-4e6d-4d23-9cd4-4493c6ba25c9-image.png
0_1535657354196_60914612-1b98-42e0-bf04-f4a5a19bd0a9-image.png
Then, if n = 6 & positionIdBuy = 0, it is opened 6 trades with group numbers: 1,2,3,4,5,6.
I have created a string for using it in the "Filter by group" field available in blocks like the pink ones to do something depending on the conditions of the trade with the last group number. Like as follows
0_1535657678837_28e02a0b-33b2-4dac-9b78-4f8797cdaf62-image.png
0_1535657732401_ff96f6e3-8468-4eeb-afe2-be230db1edf5-image.png
So, if (n) = 6, "LastTradeNumberBuysM3 = 6". But if the project's logic decides to open 10 trades (n = 10), the variable "LastTradeNumberBuysM3" Will be modified automatically to 10.
What I would like is to know if it is posible to create automatically a string that includes the group number of all the trades opened by the loop as the loop is ran. Like
loop pass = 1 -> TradesOpened=(string)positionId1;
loop pass = 2 -> TradesOpened=(string)positionId1+","+(string)positionId2;
loop pass = 3 -> TradesOpened=(string)positionId1+","+(string)positionId2+","+(string)positionId3;
.
.
.
loop pass = (n) -> TradesOpened=(string)positionId1+","+(string)positionId2+","+(string)positionId3+","+…+(string)positionId(n);
Then, the result string Will be:
loop pass = 1 -> TradesOpened=1
loop pass = 2 -> TradesOpened=1,2
loop pass = 3 -> TradesOpened=1,2,3
.
.
.
loop pass = (n) -> TradesOpened=1,2,3,...,(n)
Any suggestion or idea Will be very welcome.