stochastic rsi sell

 

hi stochastic rsi sell if k line cuts down 80. I want to create this condition. do you think this code is correct?



else if(CountOpenedPositions("buy")!=0 && 

     (signal == "sell" ||  
     ((InpKPeriod < 80.0)))) {CloseAllOrders("buy"); Comment("Closed By rsi");}