I wantto buy both condition met

buy

CLOSE < BBB(CLOSE, 20, 2, EXPONENTIAL) AND RSI (CLOSE, 14) < 40

sell
CLOSE > BBT(CLOSE, 20, 2, EXPONENTIAL) AND RSI (CLOSE, 14) > 60

if above both condition met same time only, i need buy or sell signal,please help me to mingle the code

The above code is correct.