Type/to search

Relative Strength Index - Divergences - Libertus

RSI
1
Follow
1798
Followers

Hello all,

To ease everyone's trading experience I made this script which colors RSI overbought and oversold conditions and as a bonus displays bullish or bearish divergences in last 50 candles (by default, you can change it).
Script is open source, part of code is from Trading View examples. If you have suggestions or you already made some improvements, please report in comment.

Happy trading and good luck!

backtest

img

Source
Pine
//@version=4
// Copyright by Libertus - 2021
// RSI Divergences v3.2
// Free for private use
study(title="Relative Strength Index - Divergences - Libertus", shorttitle="RSI Div - Lib")
len = input(14, minval=1, title="RSI Length")
ob = input(defval=70, title="Overbought", type=input.integer, minval=0, maxval=100)
os = input(defval=30, title="Oversold", type=input.integer, minval=0, maxval=100)

// RSI code
rsi = rsi(close, len)
band1 = hline(ob)
Strategy parameters
Strategy parameters
RSI Length
Overbought
Oversold
Hide pivots?
Shorter labels?
Hide labels and color background
Div lookback period (bars)?
Comment
All comments (0)
No data
No data
  • 1
Forums
PINE Language
Get the app
iPhone Download
© 2015 - ∞ INVENTOR PTE LTD (SG)