Variable A, B, C, X and Y are user inputs
1.
On trade : currency pair (A) at lot 'x'
if order type is BUY
SELL currency pair (B) and (C) at 'x' lot
else if order for currency pair (A) is SELL
BUY currency pair (B) and (C) at 'x' lot
2.
//first condition for closing
While profit is 'y' pips
close (A), (B), (C)
//second condition for closing
If (A) or (B) or (C) is closed,
close A, B and C