Indicator · Pine Script v6 · Own pane

Parabolic RSI [ChartPrime]

by theonetrade· code credited to ChartPrime

Parabolic RSI calculates a custom Parabolic Stop and Reverse (SAR) algorithm directly on Relative Strength Index (RSI) values.

View on GitHub

GitHub stars34on the repository
Pine versionv6current
Lines of code137
Settings9inputs
LicenceMIT
Last update2 weeks ago8 Nov 2026

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

137 lines of Pine Script v6 from assets/indicator/bit-exact/parabolic_rsi_chartprime_NI0Qhwy7.pine, published under MIT. Keep the author's credit and licence lines when you reuse it.

parabolic_rsi_chartprime_NI0Qhwy7.pine
// This Pine Script™ code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © ChartPrime

//@version=6
indicator("Parabolic RSI [ChartPrime]", overlay = false)

// --------------------------------------------------------------------------------------------------------------------}
// 𝙐𝙎𝙀𝙍 𝙄𝙉𝙋𝙐𝙏𝙎
// --------------------------------------------------------------------------------------------------------------------{

len = input.int(14, "RSI Length", group = "RSI")

upper_ = input.int(70, "Threshold: ⭱", inline = "Threshold")
lower_ = input.int(30, " ⤓", inline = "Threshold")

display_sar = input.bool(true, "SAR", group = "SAR")
start       = input.float(0.02, "Start", step = 0.01, inline = "sar", group = "SAR")
inc         = input.float(0.02, "Increment", step = 0.01, inline = "sar", group = "SAR")
max         = input.float(0.2, "Maximum", step = 0.01, inline = "sar", group = "SAR")
color_up    = input.color(#EEA47F, "", inline = "c")
color_dn    = input.color(#00539C, "", inline = "c")


// --------------------------------------------------------------------------------------------------------------------}
// 𝙄𝙉𝘿𝙄𝘾𝘼𝙏𝙊𝙍 𝘾𝘼𝙇𝘾𝙐𝙇𝘼𝙏𝙄𝙊𝙉𝙎
// --------------------------------------------------------------------------------------------------------------------{

rsi = ta.rsi(close, len)

pine_sar(src, start, inc, max) =>

    src_high = src+1
    src_low  = src-1

    var float result = na
    var float maxMin = na
    var float acceleration = na
    var bool isBelow = false
    bool isFirstTrendBar = false
    
    if bar_index <= len+2
        if src > src[1]
            isBelow := true
            maxMin := src_high
            result := src_low[1]
        else
            isBelow := false
            maxMin := src_low
            result := src_high[1]
            
        isFirstTrendBar := true
        acceleration := start
    
    result := result + acceleration * (maxMin - result)
    
    if isBelow
        if result > src_low
            isFirstTrendBar := true
            isBelow := false
            result := math.max(src_high, maxMin)
            maxMin := src_low
            acceleration := start
    else
        if result < src_high
            isFirstTrendBar := true
            isBelow := true
            result := math.min(src_low, maxMin)
            maxMin := src_high
            acceleration := start
            
    if not isFirstTrendBar
        if isBelow
            if src_high > maxMin
                maxMin := src_high
                acceleration := math.min(acceleration + inc, max)
        else
            if src_low < maxMin
                maxMin := src_low
                acceleration := math.min(acceleration + inc, max)
    
    if isBelow
        result := math.min(result, src_low[1])
        if bar_index > 1
            result := math.min(result, src_low[2])
        
    else
        result := math.max(result, src_high[1])
        if bar_index > 1
            result := math.max(result, src_high[2])
    
    [result, isBelow]

[sar_rsi, isBelow] = pine_sar(rsi, start, inc, max)


sig_up = isBelow != isBelow[1] and isBelow and barstate.isconfirmed
sig_dn = isBelow != isBelow[1] and not isBelow and barstate.isconfirmed

s_sig_up = isBelow != isBelow[1] and isBelow and barstate.isconfirmed and sar_rsi <= lower_
s_sig_dn = isBelow != isBelow[1] and not isBelow and barstate.isconfirmed and sar_rsi >= upper_

var sar = float(na)

if display_sar
    sar := isBelow != isBelow[1] ? na : sar_rsi

sar_col = isBelow ? color_up : color_dn

// --------------------------------------------------------------------------------------------------------------------}
// 𝙑𝙄𝙎𝙐𝘼𝙇𝙄𝙕𝘼𝙏𝙄𝙊𝙉
// --------------------------------------------------------------------------------------------------------------------{

rsiPlot = plot(rsi, "RSI", color=chart.fg_color)
rsiUpperBand = hline(upper_, "RSI Upper Band", color=#787B86)
midline = hline(50, "RSI Middle Band", color=color.new(#787B86, 50))
rsiLowerBand = hline(lower_, "RSI Lower Band", color=#787B86)
fill(rsiUpperBand, rsiLowerBand, color=#c292571a, title="RSI Background Fill")
midLinePlot = plot(50, color = na, editable = false, display = display.none)
fill(rsiPlot, midLinePlot, 100, 70, top_color = color.new(color.red, 0), bottom_color = color.new(color.orange, 100),  title = "Overbought Gradient Fill")
fill(rsiPlot, midLinePlot, 30,  0,  top_color = color.new(color.red, 100), bottom_color = color.new(color.orange, 0),      title = "Oversold Gradient Fill")


sar_p = plot(sar, "SAR", color = sar_col, style = plot.style_circles)

plotshape(sig_up and sar_rsi >= lower_ ? sar_rsi : na, "Rsi Up", shape.diamond, location.absolute, size = size.tiny, color = sar_col)
plotshape(sig_dn and sar_rsi <= upper_  ? sar_rsi : na, "Rsi Dn", shape.diamond, location.absolute, size = size.tiny, color = sar_col)

plotchar(s_sig_up ? sar_rsi : na, "Rsi Up", "◈", location.absolute, size = size.tiny, color = sar_col)
plotchar(s_sig_dn ? sar_rsi : na, "Rsi Dn", "◈", location.absolute, size = size.tiny, color = sar_col)


plotshape(s_sig_up, "Chart Strong Rsi Up", shape.diamond, location.belowbar, size = size.small, color = sar_col, force_overlay = true)
plotshape(s_sig_dn, "Chart Strong Rsi Dn", shape.diamond, location.abovebar, size = size.small, color = sar_col, force_overlay = true)

plotshape(sig_up and sar_rsi >= lower_, "Chart Rsi Up", shape.diamond, location.belowbar, size = size.tiny, color = sar_col, force_overlay = true)
plotshape(sig_dn and sar_rsi <= upper_, "Chart Rsi Dn", shape.diamond, location.abovebar, size = size.tiny, color = sar_col, force_overlay = true)
// --------------------------------------------------------------------------------------------------------------------}

Overview

Plotted in a separate pane, it identifies directional shifts in momentum when the parabolic curve flips above or below the RSI line. The indicator highlights standard direction changes as well as strong signals that occur beyond configured upper and lower threshold boundaries. User inputs control the RSI length, SAR acceleration parameters, and threshold levels.

Details

Published by

theonetrade on GitHub

Code credit

ChartPrime, as written in the script's header

Draws

Separate pane below the chart

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.

Topics

algorithmic-tradingbacktestingbitcoinccxtcrypto-tradingllm-agentoffline-backtestingopen-source-tradingpine-scriptpine-to-pythonpinescriptpynecorepythonquantquantitative-financestrategy-backtestingtechnical-analysistrading-indicatorstrading-strategiestradingview

Settings

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

SettingTypeDefaultVariable
RSI Lengthint14len
Threshold: ⭱int70upper_
⤓int30lower_
SARbooltruedisplay_sar
Startfloat0.02start
Incrementfloat0.02inc
Maximumfloat0.2max
color_upcolor#EEA47Fcolor_up
color_dncolor#00539Ccolor_dn
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

Schaff Trend Cycle

by everget
947 stars

This indicator plots the Schaff Trend Cycle in a separate pane. It subtracts a slow exponential moving average from a fast one, applies a stochastic cycle twice, and smooths each result to form a 0–100 oscillator. Line color follows the slope, or the upper and

Indicator v4 Oscillators & momentumTrend
Updated 5 weeks ago · GPL-3.0 GitHub repository of Schaff Trend Cycle

Beep Boop

by magic8bot
408 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

[RS]Standardized Trend Map

by ricardosantos79
261 stars

Standardized Trend Map calculates series momentum relative to active price range across 40 distinct lookback periods ranging from 2 to 80 bars on an exponential moving average source. Each standardized calculation rounds to an integer values of -1, 0, or 1 to

Indicator v4 TrendOscillators & momentum
Updated 5 years ago · None stated GitHub repository of [RS]Standardized Trend Map
228 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 4 months ago · None stated GitHub repository of Multi-Timeframe Analysis Suite

ADX Histogram

by harryguiacorn
220 stars

This indicator calculates and displays the Average Directional Index (ADX) as a column histogram in a separate pane. It evaluates market trend strength by calculating directional movement metrics based on specified smoothing and DI length inputs. When the ADX

Indicator v5 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of ADX Histogram

More Oscillators & momentum scripts

Related on ForexR

Trade Your Charts With a Regulated Broker

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

Compare brokers