Member-only story

The Pull-Back Strategy in TradingView

Coding the RSI Simple Pull-back Strategy in TradingView

--

Deploying strategies on the RSI is always interesting. This article presents a simple pull-back technique that does not require complex coding. The idea is presented in TradingView’s Pine Script language.

A Refresher on the RSI

First introduced by J. Welles Wilder Jr., the RSI is one of the most popular and versatile technical indicators. Mainly used as a contrarian indicator where extreme values signal a reaction that can be exploited. Typically, we use the following steps to calculate the default RSI:

  • Calculate the change in the closing prices from the previous ones.
  • Separate the positive net changes from the negative net changes.
  • Calculate a smoothed moving average on the positive net changes and on the absolute values of the negative net changes.
  • Divide the smoothed positive changes by the smoothed negative changes. We will refer to this calculation as the Relative Strength — RS.
  • Apply the normalization formula shown below for every time step to get the RSI.

The next chart shows the RSI in TradingView with 30 and 70 as oversold and overbought levels respectively. Additionally, we can plot 50 as the middle line (or what is known as a neutrality level that splits bullish and bearish momentum).

EURAUD with the RSI

If you want to see more of my work, you can visit my website for the PDF books catalogue by simply following the link attached the picture:

Creating the Strategy

The strategy’s conditions relies on the pull-back concept which states that once an important level is broken, the market usually comes back to test it before continuing in the new direction. The trading strategy’s conditions are therefore:

--

--

Sofien Kaabar, CFA
Sofien Kaabar, CFA

Written by Sofien Kaabar, CFA

Top writer in Finance, Investing, Business | Trader & Author | Bookstore: https://sofienkaabar.myshopify.com/

No responses yet