Consider this position size

```
SetPositionSize(IIf(Symbol == "symb1", 40, IIf(Symbol == "symb2", 20, IIf(Symbol == "symb3", 10, IIf(Symbol == "symb4", 25, IIf(Symbol == "symb5", 25, 0))))), spsPercentOfEquity);
```

Of course i use leverage because sum is greater then 100.

Now suppose i have another time series.

abc = foreign("abc",C) ;

I want this new percentage allocation.

When abc > 1 then symb1,2,3 should have a percentage weight of 20, 10, 5 while symb 5,6 are unchanged to 25 and 25

If abc < 1 then symb1,2,3 ,4 and 5 should be unchanged: 40,20,10, 25, 25

I'm trying to play with nested IFF but i can't figure out how to do and if this is a correct way to code this multiple condition