Coding One of the Best Trading Strategies in TradingView

Coding a Powerful Reversal Strategy on the RSI Using Pine Script

Sofien Kaabar, CFA
3 min readFeb 16, 2024

--

Simple strategies can be as powerful as complex strategies. This article presents one of my favorite strategies used with the RSI.

The RSI Simple Reversal Strategy

The RSI is known as the number one technical bounded indicator. With the huge number of techniques and strategies applied on it, one particular technique always arises. The pull-back technique and more specifically the simple pull-back technique awaits the confirmation of the RSI’s exit from the oversold and overbought levels before initiating a signal.

The trading conditions of the simple pull-back strategy are as follows:

  • A long (buy) signal is generated whenever the RSI surpasses the oversold level and shapes a comeback to it without surpassing a threshold level. For example, the 5-period RSI surpasses 20, does not surpass 33, and then comes back to a level between 20 and 33.
  • A short (sell) signal is generated whenever the RSI breaks the overbought level and shapes a comeback to it without breaking a threshold level. For example, the 5-period RSI breaks 80, does not break 67, and then comes back to a level between 80 and 67.

--

--