1Copy the scriptPress Copy script above. It reads the file straight from GitHub.
2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
3Paste over the templateCreate a new indicator, select all of the template text and paste. Press Save and give it a name.
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
A weighted score combines price location against ATR zones, baseline slope, momentum and position within the recent range. A regime changes only after the score passes an activation threshold and holds for a set number of confirmation bars. It draws a trend ribbon and boundary line, with optional baseline, bar colours and up and down labels.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Price Source
source
close
source
Fast Smoothing Length
int
21
fastLength
Slow Smoothing Length
int
100
slowLength
Efficiency Measurement Length
int
20
efficiencyLength
Final Baseline Smoothing
int
5
baselineSmoothing
Volatility Length
int
14
atrLength
Volatility Context Length
int
50
volatilityLookback
Baseline Slope Length
int
5
slopeLength
Momentum Length
int
10
momentumLength
Range Position Length
int
20
rangeLength
Context Zone Multiplier
float
1.20
bandMultiplier
Regime Activation Threshold
float
0.35
entryThreshold
Show all 29 settings
Setting
Type
Default
Variable
Neutral Zone Threshold
float
0.10
neutralThreshold
Minimum Directional Efficiency
float
0.08
minimumEfficiency
Direction Confirmation Bars
int
2
confirmationBars
Neutral Confirmation Bars
int
2
neutralConfirmationBars
Price Location Weight
float
0.35
locationWeight
Baseline Slope Weight
float
0.30
slopeWeight
Momentum Weight
float
0.20
momentumWeight
Range Position Weight
float
0.15
rangeWeight
UP Color
color
color.rgb(64, 217, 143)
upColor
DOWN Color
color
color.rgb(246, 113, 113)
downColor
Neutral Color
color
color.rgb(145, 151, 163)
neutralColor
Show Trend Ribbon
bool
true
showRibbon
Show Active Boundary Line
bool
true
showBoundaryLine
Show Adaptive Baseline
bool
false
showBaseline
Show Baseline In Neutral State
bool
false
showNeutralBaseline
Color Price Bars
bool
false
showBarColors
Show UP / DOWN Labels
bool
false
showSignals
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.
This indicator plots an ATR-based Chandelier Exit trailing stop on the price chart. It tracks a long stop under recent highs and a short stop above recent lows, then switches direction when price crosses the opposite stop. Buy and sell labels mark those flips.
The Momentum Setup is a multi-indicator visual tool designed for trend and momentum analysis directly on the price chart. It combines Relative Strength Index (RSI), Money Flow Index (MFI), Commodity Channel Index (CCI), Supertrend, and a 250-bar percentage cha
Range Filter [Alorse] is a technical indicator overlay for TradingView designed to filter market volatility and identify price trends. It calculates a smoothed range based on historical volatility using a configurable sampling period and multiplier applied to
This indicator calculates an ATR trailing stop line derived from the highest high minus an average true range multiple over a specified lookback period. It plots the trailing stop line directly on the price chart and colors price bars based on whether the clos
This indicator plots three exponential moving averages and ATR volatility envelopes on the price chart. It compares the fast and slow EMAs to shade a trend ribbon and marks confirmed upward and downward crossovers with triangle labels. Settings change the thre
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