# RSI Changing Direction and stop loss

The strategy you described is a technical analysis trading strategy that uses the Relative Strength Index (RSI) indicator to generate buy and sell signals based on specific criteria.

To generate a buy signal, the strategy monitors the RSI and looks for a change in direction from negative to positive when the absolute value of the RSI is less than a specified lower limit (typically 40). This indicates a potential reversal or correction in the stock's price trend, and a buy signal is generated.

To generate a sell signal, the strategy looks for a change in direction from positive to negative when the absolute value of the RSI is higher than a specified upper limit (typically 60). Additionally, when the RSI reaches a specified upper sell limit (typically 90-100), a sell signal is generated.

To limit potential losses in a downward trend, a stop-loss sell signal is also included. This is triggered when the closing price falls below a specified percentage (p percent) from the last buying price.

This strategy generates buy signal when RSI is changing direction from negative to positive and the absolute value of RSI is less than "Lower RSI limit w" (typically 40). It generates sell signal when RSI is changing the direction from positive to negative and the absolute value of RSI is higher than "Upper RSI limit v" (typically 60). In addition when RSI is reaching a level "Upper RSI SELL limit" (typically 90-100) a sell signal is generated. To avoid losses in a downward trends a stop loss sell signal is included, it is triggered when the closing price falls down from the last buying price %p percent.

### Formula

IF RSI(m)>v and changing direction
THEN GO SHORT
ELSE
IF RSI(m)<w and changing direction
THEN GO LONG
AND IF RSI(m)>v' THEN SELL
where RSI is relative strength index;
and v > w; e.g. v' = 95,v = 80,w = 20,
C(t) - closing price; p - percentage loss