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
Version 3 adds an adaptive KAMA component to the baseline and a reversal acceptance step that checks directional energy, close location, retracement depth and opposite structure. Ordinary flips are blocked when choppiness, efficiency or ATR expansion still describe a noisy market. An optional higher-timeframe bias can be required. It is signal-only, with no orders.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Auto-adapt settings by timeframe
bool
true
autoTune
Use completed higher-timeframe bias
bool
true
useHtf
Hard HTF alignment
bool
false
htfHard
Auto-select higher timeframe
bool
true
autoHtf
Manual higher timeframe
timeframe
240
manualHtf
HTF trail factor
float
3.0
htfFactor
HTF ATR length
int
14
htfAtrLen
ATR length
int
14
atrLen
Trail distance x ATR
float
2.80
trailFactor
Trail widening in range
float
1.25
rangeTrailBoost
Use ZLEMA for fast structure
bool
true
useZlema
Fast length
int
10
fastLen
Show all 40 settings
Setting
Type
Default
Variable
Slow baseline length
int
34
slowLen
Baseline slope lookback
int
3
slopeLookback
Adaptive KAMA length
int
18
kamaLen
KAMA fast length
int
2
kamaFastLen
KAMA slow length
int
30
kamaSlowLen
Adaptive baseline weight
float
0.42
kamaWeight
ATR baseline length
int
50
atrBaseLen
Pause new signals above ATR ratio
float
2.40
shockAtrRatio
Pause new signals above candle range x ATR
float
2.80
shockRangeAtr
Pause after abnormal gap
bool
true
useGapFilter
Abnormal gap x previous ATR
float
1.50
gapAtrFactor
DMI/ADX length
int
14
adxLen
Trend ADX threshold
float
19.0
adxTrend
Range ADX threshold
float
16.0
adxRange
Minimum DMI spread
float
2.5
diSpread
Choppiness length
int
14
chopLen
Enter range above choppiness
float
61.8
chopEnter
Release range below choppiness
float
55.0
chopRelease
Efficiency length
int
12
effLen
Range efficiency threshold
float
0.24
effRange
Trend efficiency threshold
float
0.32
effTrend
RSI length
int
14
rsiLen
Structure lookback
int
20
structureLen
Breakout buffer x ATR
float
0.05
breakoutBufferAtr
Pullback buffer x ATR
float
0.35
pullbackBufferAtr
Use volume when available
bool
true
useVolume
Volume average length
int
20
volumeLen
Volume threshold x average
float
1.05
volumeFactor
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