I want to sell on some Rs profit I have written code on this but

(Close(0)-(Period min(5, Close(-1)))) higher than equal to 2 and Period min(3, (EMA(close, 8, 0)-SMA(close, 21, 0))) higher than 0.0

But this sells on Rs 2 when price is down or up But i want to sell onlu Rs 2
I used higher than condition