Indicator · Pine Script v5 · Own pane

RSI+EMAs for Bootsie Strategy

by rajatjpatel· code credited to RajeshMoriyani

A separate-pane tool that plots a very long RSI, 500 periods by default, with a ribbon of five exponential moving averages of the RSI at 1 to 5 bars.

View on GitHub

GitHub stars1on the repository
Pine versionv5runs as is
Lines of code59
Settings15inputs
LicenceNone statedfile: MPL-2.0
Last update4 years ago18 Oct 2022

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above, or the copy button on the code below.
  2. 2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
  3. 3Paste over the templateCreate a new indicator, select all of the template text and paste. Press Save and give it a name.
  4. 4Add it to the chartPress Add to chart, then adjust the settings with the gear icon next to its name.

Source Code

59 lines of Pine Script v5 from RSIEMAs_for_Bootsie_Strategy.txt, published under MPL-2.0 (file header). Keep the author's credit and licence lines when you reuse it.

RSIEMAs_for_Bootsie_Strategy.txt
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © RajeshMoriyani
//@version=5
indicator("RSI+EMAs for Bootsie Strategy", shorttitle="RSI+EMAs - Boostie Strat.")

RSI_SETTINGS = "RSI Settings"
rsiLengthInput = input.int(500, minval=1, title="RSI Length", group=RSI_SETTINGS)
rsiSourceInput = input.source(close, title="Source for RSI", group=RSI_SETTINGS)

EMA_SETTINGS = "EMA Settings"
maSourceInput = input.source(hlcc4, title="Source for EMAs", group=EMA_SETTINGS)
maLengthInput1 = input.int(1, title="EMA1", group=EMA_SETTINGS)
maLengthInput2 = input.int(2, title="EMA2", group=EMA_SETTINGS)
maLengthInput3 = input.int(3, title="EMA3", group=EMA_SETTINGS)
maLengthInput4 = input.int(4, title="EMA4", group=EMA_SETTINGS)
maLengthInput5 = input.int(5, title="EMA5", group=EMA_SETTINGS)

PRICE_PIVOTS = "Price High Low Pivots"
lookbackLength  = input.int(150, "Lookback Period", minval = 10, maxval = 500, group = PRICE_PIVOTS) // max bars to lookback

H_LINES = "Threshold Levels"
h_line_color = input(color.new(color.white, 70), "", inline="HLines", group=H_LINES)
hLine1 = input(85, "Level-1", inline="HLines1", group=H_LINES)
hLine2 = input(70, "Level-2", inline="HLines2", group=H_LINES)
hLine3 = input(50, "Level-3", inline="HLines3", group=H_LINES)
hLine4 = input(20, "Level-4", inline="HLines4", group=H_LINES)
hLine5 = input(10, "Level-5", inline="HLines5", group=H_LINES)

line1 = hline(hLine1, "", color=(hLine1 > 0) ? h_line_color : na, linestyle=hline.style_dashed)
line2 = hline(hLine2, "", color=(hLine2 > 0) ? h_line_color : na, linestyle=hline.style_dashed)
line3 = hline(hLine3, "", color=(hLine3 > 0) ? h_line_color : na, linestyle=hline.style_dashed)
line4 = hline(hLine4, "", color=(hLine4 > 0) ? h_line_color : na, linestyle=hline.style_dashed)
line5 = hline(hLine5, "", color=(hLine5 > 0) ? h_line_color : na, linestyle=hline.style_dashed)

//RSI
rsi = ta.rsi(rsiSourceInput, rsiLengthInput)
plot(rsi,"RSI", color= color.yellow, linewidth=2)

//High+Low Pivot Levels for finding Price Range
pivotHigh    = ta.highest(maSourceInput, lookbackLength)
pivotLow     = ta.lowest(maSourceInput , lookbackLength)

//Scaling for EMAs
var scaleLow = 0.0
var scaleHigh = 100.0
scaledValue = scaleLow + (maSourceInput - pivotLow) * (scaleHigh - scaleLow) / (pivotHigh - pivotLow)

//EMAs (scaled)
ma1 = ta.ema(scaledValue, maLengthInput1)
ma2 = ta.ema(scaledValue, maLengthInput2)
ma3 = ta.ema(scaledValue, maLengthInput3)
ma4 = ta.ema(scaledValue, maLengthInput4)
ma5 = ta.ema(scaledValue, maLengthInput5)

plot(ma1, "Scaled EMA", color= color.lime)
plot(ma2, "Scaled EMA2", color= color.teal)
plot(ma3, "Scaled EMA3", color= color.orange)
plot(ma4, "Scaled EMA4", color= color.fuchsia)
plot(ma5, "Scaled EMA5", color= color.red)

Overview

Dashed guide levels are set at 85, 70, 50, 20 and 10 and can be changed. A lookback period setting is also provided for pivots. The RSI source, the EMA source and each length are adjustable. It displays momentum context only and has no entries, exits or alerts.

Details

Published by

rajatjpatel on GitHub

Code credit

RajeshMoriyani, as written in the script's header

Type

Indicator, Pine Script v5

Draws

Separate pane below the chart

Category

Oscillators & momentum, Moving averages

Markets

Any symbol

Timeframes

Any timeframe

Risk Notes

No repainting, lookahead or stacked entries were found in its code or README. That says nothing about how well it works: test it first.

Settings

The inputs you can change from the gear icon on the chart. Defaults are the author's.

SettingTypeDefaultVariable
RSI Lengthint500rsiLengthInput
Source for RSIsourceclosersiSourceInput
Source for EMAssourcehlcc4maSourceInput
EMA1int1maLengthInput1
EMA2int2maLengthInput2
EMA3int3maLengthInput3
EMA4int4maLengthInput4
EMA5int5maLengthInput5
Lookback Periodint150lookbackLength
h_line_colorcolorcolor.new(color.white, 70)h_line_color
Level-1int85hLine1
Level-2int70hLine2
Show all 15 settings
SettingTypeDefaultVariable
Level-3int50hLine3
Level-4int20hLine4
Level-5int10hLine5
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.

Similar Pine Scripts

948 stars

The Derivative Oscillator calculates a double-exponentially smoothed Relative Strength Index (RSI) and subtracts its Simple Moving Average (SMA) to form the main oscillator line. A secondary signal line is plotted using an SMA of the main oscillator values. Th

Indicator v4 Oscillators & momentumMoving averages
Updated 11 days ago · GPL-3.0 GitHub repository of Derivative Oscillator

Beep Boop

by magic8bot
409 stars

This indicator calculates a modified MACD oscillator and signal line alongside a trend EMA filter, plotting the output as a stylized column histogram in a separate pane. Instead of plotting true MACD distance, it quantifies positive and negative histogram mome

Indicator v4 Oscillators & momentumTrend
Updated 3 years ago · MIT GitHub repository of Beep Boop

MACD

by Alorse
330 stars

This indicator calculates and plots the standard Moving Average Convergence Divergence oscillator in a separate pane. It computes the difference between a fast and slow moving average, derives a signal line through smoothing, and plots a histogram representing

Indicator v4 Oscillators & momentumMoving averages
Updated 2 months ago · None stated GitHub repository of MACD

MACD-V

by harryguiacorn
219 stars

MACD-V is a volatility-normalized momentum indicator based on research by Alex Spiroglou. It calculates the standard MACD histogram and normalizes it by dividing by the Average True Range (ATR). Plotted in a separate pane as a colored histogram, it includes us

Indicator v5 Oscillators & momentumVolatility & bands
Updated 1 year ago · None stated GitHub repository of MACD-V
218 stars

Multi-Timeframe Analysis Suite calculates trend direction and momentum conditions across five user-selected timeframes using moving averages, RSI, and Stochastic oscillators. It evaluates moving average slope and oscillator levels to compute trend alignment, m

Indicator v6 Screeners & dashboardsTrend
Updated 3 months ago · None stated GitHub repository of Multi-Timeframe Analysis Suite

KamaFama

by Mastaaa1987
141 stars

KamaFama is an indicator that translates a Freqtrade trading strategy into Pine Script for visualization. It combines Kaufman Adaptive Moving Average (KAMA), MAMA/FAMA calculations derived via Hilbert Transform, Williams %R, and correlation trend filters to ev

Indicator v6 Moving averagesOscillators & momentum
Updated 6 weeks ago · MIT GitHub repository of KamaFama

More indicators

Trade Your Charts With a Regulated Broker

Compare brokers that connect to TradingView, with spreads, minimum deposits and leverage side by side.

Compare brokers