Indicator · Pine Script v6 · Own pane

Grid Bot Grid Range Plugin RSI Channel [psyll]

by cullyk· code credited to Copyright

This indicator serves as a grid range plugin for the Grid Bot framework by calculating an RSI-based channel.

View on GitHub

Repaints

GitHub stars2on the repository
Pine versionv6current
Lines of code79
Settings17inputs
LicenceMIT
Last update8 months ago25 Feb 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

79 lines of Pine Script v6 from plugins/Grid Bot [Grid range plugin] RSI Channel [psyll].pine, published under MIT. Keep the author's credit and licence lines when you reuse it.

Grid Bot [Grid range plugin] RSI Channel [psyll].pine
//@version=6
// Author: Psyll.com
// Email: info@psyll.com
// Website: https://psyll.com
// Copyright: Copyright © 2025 psyll.com. All rights reserved.

indicator('Grid Bot [Grid range plugin] RSI Channel [psyll]', overlay = false)
decimal_places = 0
tick_size = syminfo.mintick
while tick_size < 1
    tick_size := tick_size * 10
    decimal_places := decimal_places + 1
    decimal_places
settings_group = 'Settings #################################################'
rsi_channel_src = input(close, title = 'Source', group = settings_group, display = display.none)
rsi_channel_len = input(14, title = 'Length', group = settings_group, display = display.none)
rsi_channel_oblevel = input.int(70, title = 'OB Level', maxval = 99, minval = 1, group = settings_group, display = display.none)
rsi_channel_oslevel = input.int(30, title = 'OS Level', maxval = 99, minval = 1, group = settings_group, display = display.none)
rsi_channel_smt = input.int(1, title = 'EMA Smoothing', minval = 1, group = settings_group, display = display.none)
rsi_channel_offset = input.float(1, 'Offset', group = settings_group, display = display.none)
smooth = input.int(1, 'Smoothness', minval = 1, group = settings_group, display = display.none)
width_min = input.float(0, 'Min width', group = settings_group, display = display.none)
width_max = input.float(99999, 'Max width', group = settings_group, display = display.none)
width_min_half = width_min / 2
width_max_half = width_max / 2
tf_group = 'Timeframe ###############################################'
tf_confirmation_wait = input.bool(defval = true, title = 'Wait for confirm', group = tf_group, inline = tf_group, display = display.none)
tf_no_repaint_security = input.bool(defval = true, title = 'No repaint', group = tf_group, inline = tf_group, display = display.none)
tf_barmerge_lookahead = input.bool(defval = false, title = 'Lookahead', group = tf_group, inline = tf_group, display = display.none)
tf_barmerge_gaps = input.bool(defval = false, title = 'Gaps', group = tf_group, inline = tf_group, display = display.none)
tf_type = input.string(title = 'Type', options = ['Static', 'Custom'], defval = 'Static', group = tf_group, display = display.none)
tf_static = input.timeframe(defval = '', title = 'Static', group = tf_group, display = display.none)
tf_custom = str.tostring(input.int(1, 'Custom', group = tf_group, display = display.none))
tf_type_value = switch tf_type
    'Static' => tf_static
    'Custom' => tf_custom
tf_security(source) =>
    request.security(syminfo.tickerid, tf_type_value, tf_no_repaint_security ? source[barstate.isrealtime ? 1 : 0] : source, gaps = tf_barmerge_gaps ? barmerge.gaps_on : barmerge.gaps_off, lookahead = tf_barmerge_lookahead ? barmerge.lookahead_on : barmerge.lookahead_off)[tf_no_repaint_security ? barstate.isrealtime ? 0 : 1 : 0]
display_group = 'Display ##################################################'
price_color = input.color(color.black, 'Candles color', display = display.none, group = display_group)
plotcandle(open, high, low, close, color = price_color, bordercolor = price_color, wickcolor = price_color, display = display.pane)
rsi_channel_src := tf_security(rsi_channel_src)
my_rsi(x, len) =>
    u = math.max(x - x[1], 0)
    d = math.max(x[1] - x, 0)
    sumu = 0.0
    sumd = 0.0
    sumu := (u + (len - 1) * nz(sumu[1])) / rsi_channel_len
    sumd := (d + (len - 1) * nz(sumd[1])) / rsi_channel_len
    rs = sumu / sumd
    res = 100 - 100 / (1 + rs)
    [res, sumu, sumd]
[Rsi, sumu, sumd] = my_rsi(rsi_channel_src, rsi_channel_len)
diffupob = sumd * (100 / (100 - rsi_channel_oblevel) - 1) * rsi_channel_len - (rsi_channel_len - 1) * nz(sumu[1])
diffdnob = sumu / (100 / (100 - rsi_channel_oblevel) - 1) * rsi_channel_len - (rsi_channel_len - 1) * nz(sumd[1])
diffupos = sumd * (100 / (100 - rsi_channel_oslevel) - 1) * rsi_channel_len - (rsi_channel_len - 1) * nz(sumu[1])
diffdnos = sumu / (100 / (100 - rsi_channel_oslevel) - 1) * rsi_channel_len - (rsi_channel_len - 1) * nz(sumd[1])
oblev = Rsi <= rsi_channel_oblevel ? rsi_channel_src + diffupob : rsi_channel_src - diffdnob
oslev = Rsi <= rsi_channel_oslevel ? rsi_channel_src + diffupos : rsi_channel_src - diffdnos
oblev := tf_security(ta.ema(oblev, rsi_channel_smt))
oslev := tf_security(ta.ema(oslev, rsi_channel_smt))
grid_high = oblev + rsi_channel_offset
grid_low = oslev - rsi_channel_offset
grid_middle = (grid_high + grid_low) / 2
if grid_high - grid_low < width_min
    grid_high := grid_middle + width_min_half
    grid_low := grid_middle - width_min_half
    grid_low
if grid_high - grid_low > width_max
    grid_high := grid_middle - width_max_half
    grid_low := grid_middle + width_max_half
    grid_low
grid_high := ta.sma(grid_high, smooth)
grid_middle := ta.sma(grid_middle, smooth)
grid_low := ta.sma(grid_low, smooth)
// Plots
plot(grid_high, 'High', color.green, display = display.all)
plot(grid_middle, 'Middle', color.silver, display = display.pane)
plot(grid_low, 'Low', color.red, display = display.all)

Overview

Plotted in a separate pane, it computes smoothed RSI levels, overbought and oversold thresholds, and channel width constraints using custom multi-timeframe security requests. Users can customize RSI length, source, smoothing, offset, min/max channel width, and timeframe settings. The script includes inputs for multi-timeframe security configurations, which can introduce lookahead bias if lookahead options are enabled.

Details

Published by

cullyk on GitHub

Code credit

Copyright, as written in the script's header

Type

Indicator, Pine Script v6

Draws

Separate pane below the chart

Category

Oscillators & momentum, Volatility & bands, Support & resistance

Markets

Any symbol

Timeframes

Any timeframe

Risk Notes

  • Reads higher-timeframe data with lookahead on, so the history can show signals that were not there in real time

Settings

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

SettingTypeDefaultVariable
Sourcesourceclosersi_channel_src
Lengthint14rsi_channel_len
OB Levelint70rsi_channel_oblevel
OS Levelint30rsi_channel_oslevel
EMA Smoothingint1rsi_channel_smt
Offsetfloat1rsi_channel_offset
Smoothnessint1smooth
Min widthfloat0width_min
Max widthfloat99999width_max
Wait for confirmbooltruetf_confirmation_wait
No repaintbooltruetf_no_repaint_security
Lookaheadboolfalsetf_barmerge_lookahead
Show all 17 settings
SettingTypeDefaultVariable
Gapsboolfalsetf_barmerge_gaps
TypestringStatictf_type
Statictimeframetf_static
Customint1Custom
Candles colorcolorcolor.blackprice_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

CCI DC

by be-thomas
65 stars

This indicator plots the Commodity Channel Index in a separate pane and surrounds it with a Donchian channel whose lookback length changes with volatility. It measures volatility as a ratio of short and long ATR values, then ranks that ratio and shortens or le

Indicator v5 Oscillators & momentumVolatility & bands
Updated 4 days ago · GPL-3.0 GitHub repository of CCI DC

Market Pressure Scale plots two oscillator curves in a separate pane. Setup pressure combines ATR and Bollinger compression, support and resistance proximity, and drying volume. Impulse pressure combines range expansion, volume, and candle body size. A range-c

Indicator v6 Oscillators & momentumVolatility & bands
Updated yesterday · MIT GitHub repository of Market Pressure Scale [WavesUnchained]

QFA Pro Elite Refined

by JasonTeixeira
9 stars

This indicator plots a smoothed fear index in a separate pane. It measures how far the current low sits below the highest close over a lookback, scales that reading by an ATR percentile, and smooths it with a zero-lag EMA. A volatility regime raises or lowers

Indicator v6 Oscillators & momentumVolatility & bands
Updated 12 days ago · Custom licence GitHub repository of QFA Pro Elite Refined
7 stars

Range Oscillator (Zeiierman) plots a range-based oscillator in a separate pane. It qualifies a range box from a minimum number of bars and sizes that box vertically with an ATR width multiplier. A heatmap splits the recent high-low span into horizontal levels

Indicator v6 Oscillators & momentumVolatility & bands
Updated 3 months ago · None stated GitHub repository of Range Oscillator (Zeiierman)

MACD Breakout

by jerryinyang
5 stars

This indicator plots a higher-timeframe MACD breakout setup on the price chart and combines it with linear regression channels. It marks support and resistance zones from MACD histogram sensitivity, then filters them with the MACD zero line, a linear regressio

Indicator v4 Oscillators & momentumBreakout
Updated 2 years ago · None stated GitHub repository of MACD Breakout
4 stars

This indicator is a live strategy scanner for cryptocurrency pairs. It runs six strategies on the current chart, tracks their wins and losses, and rates them to show the best one for this pair and timeframe. It uses ATR for adaptive TP/SL, auto-scales based on

Indicator v5 Oscillators & momentumVolatility & bands

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