Indicator · Pine Script v5 · On the chart

Range Filter Buy and Sell 5min

by jayadevrana

This Pine Script indicator plots a range filter line along with high and low target bands on the price chart.

View on GitHub

GitHub stars1on the repository
Pine versionv5runs as is
Lines of code267
Settings12inputs
LicenceCustom licence
Last update2 months ago7 Aug 2026

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above. It reads the file straight from GitHub.
  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

The code stays on GitHub. The author has not published this script under an open licence, so ForexR does not show its code. Copy script reads the file straight from GitHub into your clipboard, so you can still try it on your own chart. Ask the author before reusing the code anywhere else.

Overview

Range Filter Buy and Sell 5min calculates a smoothed average range using a sampling period and multiplier, then applies a filter to detect upward and downward trends. Signals trigger on breakouts above the filter when price exceeds the previous bar for long conditions, and similar logic for shorts. It draws colored fills between bands and applies bar colors based on trend direction and position relative to the filter. Main inputs adjust the session hours, backtest date range, price source, whether to use Heiken Ashi candles, sampling period, and range multiplier. It includes a session filter to highlight trading hours but lacks explicit stop loss, take profit, or position sizing rules.

Details

Published by

jayadevrana on GitHub

Type

Indicator, Pine Script v5

Draws

On the price chart

Category

Trend, Volatility & bands, Support & resistance, Breakout

Markets

Any symbol

Timeframes

M15-H1

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

crypto-tradingemaforexindicatormarket-analysispine-scriptpinescriptstock-markettechnical-analysistradingview

Settings

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

SettingTypeDefaultVariable
Session Hourssession0920-1505sessionHours
---------------- Use Date ----------------booltrueuseDate
From Monthint7FromMonth
From Dayint25FromDay
From Yearint2019FromYear
To Monthint1ToMonth
To Dayint1ToDay
To Yearint9999ToYear
Sourcesourceclosesources
Use HA CandlesboolfalseisHA
Sampling Periodint50per
Range Multiplierfloat3.0mult
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

The Market Tradability Engine calculates multi-factor tradability, balance, compression, and direction scores to evaluate market regime quality. It classifies market conditions into eight distinct states, including Balance, Compression, Ready, Breakout, Trend,

Indicator v6 TrendVolatility & bands
Updated yesterday · MIT GitHub repository of Market Tradability Engine [WavesUnchained]

This overlay indicator draws trendlines on the price chart and marks breakouts with optional targets. It builds a slope from successive changes in a wick or body source over a user-set period, then extends the line by a selected multiple of the bar interval. P

Indicator v5 TrendVolatility & bands
Updated 9 months ago · None stated GitHub repository of Trendline Breakouts With Targets [ Chartprime ]

[RS]Donchian Fans

by ricardosantos79
261 stars

This indicator plots Donchian Channel boundary lines along with dynamic fan projections directly on the price chart. It calculates the highest high, lowest low, and median price over a customizable lookback period. Whenever price establishes a new channel high

Indicator v4 Support & resistanceTrend
Updated 4 years ago · None stated GitHub repository of [RS]Donchian Fans

Sideway Zones Live

by dearvn
257 stars

Sideway Zones Live is an overlay indicator that estimates inner and outer sideways bands from recent highs and lows with a rational quadratic kernel. It tracks swing pivots over a loopback period and counts bars that remain between the outer high and low. Afte

Indicator v5 TrendSupport & resistance
Updated 6 weeks ago · None stated GitHub repository of Sideway Zones Live

Dynamic Linear Regression

by TradersPost
218 stars

Dynamic Linear Regression calculates and plots linear regression trendlines and standard deviation channels directly on the price chart over a user-selected time period. Traders can configure static channels locked at the end time, dynamic channels that contin

Indicator v6 TrendSupport & resistance
Updated 3 months ago · None stated GitHub repository of Dynamic Linear Regression

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