@Gerges12 Assign a group number for each trade as a variable (1st Trade - 1ST, 2nd Trade 2ND ) then Add a Trade Opened Block to a Close Trades Block
For example...
Trade Open Block (For the Group Number right click and select the variable 2ND as this is the assigned Group Number!) to a Close Trade Block (For the Group Number of this Block right click and select the variable 1ST)
As the Second trade is Activated the First trade will be closed.