Indicator · Pine Script v6 · Own pane

Relative Structure Strength Index

by InNoobWeTrust

Relative Structure Strength Index is an oscillator indicator that plots in a separate pane.

View on GitHub

GitHub stars4on the repository
Pine versionv6current
Lines of code90
Settings20inputs
LicenceNone statedfile: MPL-2.0
Last updatetoday28 Oct 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

90 lines of Pine Script v6 from .innoobwetrust/life_hacks/tradingview/relative_structure_strength_index.pine, published under MPL-2.0 (file header). Keep the author's credit and licence lines when you reuse it.

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

//@version=6
indicator("Relative Structure Strength Index", overlay = false)

import TradingView/ta/10
import forbidden_gun/commonlib/6
import forbidden_gun/ma_lib/3

//===============================================================================
// Settings
//===============================================================================
tf = input.timeframe('','► Timeframe')

threshold_grp = '► Thresholds'
threshold_low_limit = input.float(30,'Low threshold',minval=0,maxval=50,group = threshold_grp)
threshold_high_limit = input.float(70,'High threshold',minval=50,maxval=100,group = threshold_grp)
threshold_color_inline = 'Threshold colors (middle line to low/high)'
threshold_color_middle_low = input.color(color.new(color.blue,90),threshold_color_inline,group = threshold_grp,inline = threshold_color_inline)
threshold_color_middle_high = input.color(color.new(color.yellow,90),'',group = threshold_grp,inline = threshold_color_inline)

rssi_grp = '► RSSI'
rssi_len = input.int(14,'RSSI length',group = rssi_grp)
rssi_ma_inline = 'RSSI MA'
rssi_ma_type = input.enum(ma_lib.MaT.wma,rssi_ma_inline,group = rssi_grp,inline = rssi_ma_inline)
rssi_ma_len = input.int(9,'',group = rssi_grp,inline = rssi_ma_inline)
bearish_color = input.color(color.new(color.red,50),'Bearish area color',group = rssi_grp)
bullish_color = input.color(color.new(color.green,50),'Bullish area color',group = rssi_grp)

bg_grp = '► Bullish/bearish background'
bg_enable = input.bool(true,'Enable',group = bg_grp)
bg_overlay = input.bool(false,'Overlay',group = bg_grp)
bg_color_inline = 'Background colors (bullish/bearish)'
bg_bullish_color = input.color(color.new(color.aqua,70),bg_color_inline,group = bg_grp,inline = bg_color_inline)
bg_bearish_color = input.color(color.new(color.orange,70),'',group = bg_grp,inline = bg_color_inline)

sw_grp = '► Sideway thresholds'
sw_high_inline = 'High threshold'
sw_high_enable = input.bool(true,sw_high_inline,group = sw_grp,inline = sw_high_inline)
sw_high_threshold = input.int(60,'',group = sw_grp,inline = sw_high_inline)
sw_high_bg_color = input.color(color.new(color.maroon,80),'',group = sw_grp,inline = sw_high_inline)
sw_low_inline = 'Low threshold'
sw_low_enable = input.bool(true,sw_low_inline,group = sw_grp,inline = sw_low_inline)
sw_low_threshold = input.int(40,'',group = sw_grp,inline = sw_low_inline)
sw_low_bg_color = input.color(color.new(color.navy,80),'',group = sw_grp,inline = sw_low_inline)

//===============================================================================
// Calculation
//===============================================================================

[bar_pwr, bias] = commonlib.bar_structure()

rssi = ta.rsi(bar_pwr, rssi_len)
rssi_ma = ma_lib.ma(rssi_ma_type,rssi,rssi_ma_len)
rssi := request.security(syminfo.tickerid,tf,rssi)
rssi_ma := request.security(syminfo.tickerid,tf,rssi_ma)
bullish_area_color = rssi_ma >= sw_high_threshold ? bullish_color : na
bearish_area_color = rssi_ma <= sw_low_threshold ? bearish_color : na
bg_color = switch
    bg_enable and rssi_ma <= threshold_low_limit => bg_bearish_color
    bg_enable and rssi_ma >= threshold_high_limit => bg_bullish_color
    => color(na)

//===============================================================================
// Plot
//===============================================================================

// Thresholds
low_line = hline(threshold_low_limit,'Index Low threshold',linestyle = hline.style_dashed,color=color.new(color.gray,50))
middle_line = hline(50,'Index Middle',linestyle = hline.style_dashed,color=color.new(color.gray,50))
high_line = hline(threshold_high_limit,'Index High threshold',linestyle = hline.style_dashed,color=color.new(color.gray,50))
fill(low_line,middle_line,threshold_color_middle_low)
fill(high_line,middle_line,threshold_color_middle_high)

// Sideway thresholds
sw_low_line = hline(sw_low_threshold,'Sideway low threshold',linestyle = hline.style_dotted,color = color.new(color.gray,70))
sw_high_line = hline(sw_high_threshold,'Sideway high threshold',linestyle = hline.style_dotted,color = color.new(color.gray,70))
fill(sw_low_line,middle_line,sw_low_bg_color)
fill(sw_high_line,middle_line,sw_high_bg_color)

// RSSI
plot(rssi,'RSSI',color.new(color.purple,50),force_overlay = false)
plot(rssi_ma,'RSSI MA', color.yellow,force_overlay = false)
plot(rssi_ma,'Bearish',bearish_area_color,style = plot.style_area,histbase = sw_low_threshold)
plot(rssi_ma,'Bullish',bullish_area_color,style = plot.style_area,histbase = sw_high_threshold)

// Panel background
bgcolor(bg_overlay ? bg_color : color(na),force_overlay = true)
bgcolor(bg_overlay ? color(na) : bg_color,force_overlay = false)

Overview

Relative Structure Strength Index calculates the Relative Strength Index (RSI) using bar structure power derived from an external library, then smooths the resulting values with a customizable moving average. The script supports multi-timeframe requests and colors the background and plot areas according to configurable bullish, bearish, and sideway market thresholds. It provides visual momentum and structure cues without automated execution rules.

Details

Published by

InNoobWeTrust on GitHub

Type

Indicator, Pine Script v6

Draws

Separate pane below the chart

Category

Oscillators & momentum, Moving averages, SMC / ICT / price action

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

dotfiles

Settings

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

SettingTypeDefaultVariable
► Timeframetimeframetf
Low thresholdfloat30threshold_low_limit
High thresholdfloat70threshold_high_limit
threshold_color_middle_lowcolorcolor.new(color.blue,90)threshold_color_middle_low
threshold_color_middle_highcolorcolor.new(color.yellow,90)threshold_color_middle_high
RSSI lengthint14rssi_len
rssi_ma_typeenumma_lib.MaT.wmarssi_ma_type
rssi_ma_lenint9rssi_ma_len
Bearish area colorcolorcolor.new(color.red,50)bearish_color
Bullish area colorcolorcolor.new(color.green,50)bullish_color
Enablebooltruebg_enable
Overlayboolfalsebg_overlay
Show all 20 settings
SettingTypeDefaultVariable
bg_bullish_colorcolorcolor.new(color.aqua,70)bg_bullish_color
bg_bearish_colorcolorcolor.new(color.orange,70)bg_bearish_color
sw_high_enablebooltruesw_high_enable
sw_high_thresholdint60sw_high_threshold
sw_high_bg_colorcolorcolor.new(color.maroon,80)sw_high_bg_color
sw_low_enablebooltruesw_low_enable
sw_low_thresholdint40sw_low_threshold
sw_low_bg_colorcolorcolor.new(color.navy,80)sw_low_bg_color
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

6 stars

Capital41 Confluence Core plots an EMA or SMA on the price chart and combines its direction with RSI, Williams %R, and a liquidity-sweep check into long and short confluence signals. Signal strictness is Strict, Standard, or Loose, which changes how far the os

Indicator v6 Oscillators & momentumMoving averages
Updated 8 weeks ago · MIT GitHub repository of Capital41 Confluence Core

AI Bot - Manual Alerts

by thanhcong1211
3 stars

AI Bot - Manual Alerts is an overlay indicator that scores buy and sell conditions from optional MACD, EMA, RSI, and break-of-structure checks. It treats the share of enabled conditions that fire as a confidence value and sends a JSON buy or sell alert once pe

Indicator v5 Oscillators & momentumMoving averages Repaints
Updated 3 months ago · None stated GitHub repository of AI Bot - Manual Alerts
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 10 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

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