Please watch the comment lines in the formula. This is the demostration that RSI resembles actually the real trend and you could be successfull only using different levels of RSI for entering and leaving the market. Adding a simple moving average you may obtain explosive results.