DESS Calculation Formula

Hi, I am doing tests with the DESS, and so far so good, but I am wondering how I can input my formula for selling, as we have two situations: p>0 then it is p*0.9, and if p<0 we have p*1.1. How could i implement such a formula? FYI information buying is calculated ((p1.1)1+0.051)*1.08