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 6 targets pullbacks inside a strong trend by adding a macro EMA of 100 bars with a slope test. Ordinary reversals must invalidate the macro direction as well as local and major structure, while a deep emergency break can override it. It keeps the ATR and structure trails, higher-timeframe context and shock and gap filters.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Auto-adapt thresholds by timeframe
bool
true
v6AutoTune
Use completed higher-timeframe context
bool
true
v6UseHtf
Require HTF agreement for ordinary signals
bool
true
v6HtfFilter
Auto-select higher timeframe
bool
true
v6AutoHtf
Manual higher timeframe
timeframe
240
v6ManualHtf
HTF trail factor
float
3.0
v6HtfFactor
HTF ATR length
int
14
v6HtfAtrLen
ATR length
int
14
v6AtrLen
Fast ZLEMA length
int
13
v6FastLen
Slow baseline length
int
55
v6SlowLen
Normalized slope lookback
int
5
v6SlopeLen
Minimum baseline slope x ATR
float
0.12
v6MinSlopeAtr
Show all 40 settings
Setting
Type
Default
Variable
Macro EMA length
int
100
v6MacroEmaLen
Macro slope lookback
int
8
v6MacroSlopeLen
Minimum macro slope x ATR
float
0.05
v6MinMacroSlopeAtr
Use macro trend-integrity veto
bool
true
v6UseMacroIntegrity
Adaptive KAMA length
int
24
v6KamaLen
KAMA fast length
int
2
v6KamaFast
KAMA slow length
int
45
v6KamaSlow
Adaptive baseline weight
float
0.55
v6KamaWeight
Trail distance x ATR
float
3.40
v6TrailFactor
Trail widening in noisy regime
float
1.50
v6RangeTrailBoost
Structure trail lookback
int
24
v6StructureTrailLen
Structure trail buffer x ATR
float
0.22
v6StructureTrailBuffer
ATR baseline length
int
50
v6AtrBaseLen
Pause ordinary signals above ATR ratio
float
2.80
v6ShockAtrRatio
Pause ordinary signals above candle range x ATR
float
3.20
v6ShockRangeAtr
Pause ordinary signals after abnormal gap
bool
true
v6UseGapFilter
Abnormal gap x previous ATR
float
1.75
v6GapAtrFactor
DMI/ADX length
int
14
v6AdxLen
Minimum trend ADX
float
21.0
v6AdxTrend
Minimum DMI spread
float
4.0
v6DiSpread
Choppiness length
int
21
v6ChopLen
Range state above choppiness
float
61.8
v6ChopEnter
Trend release below choppiness
float
53.5
v6ChopRelease
Efficiency length
int
20
v6EfficiencyLen
Range efficiency threshold
float
0.25
v6EfficiencyRange
Trend efficiency threshold
float
0.38
v6EfficiencyTrend
Minimum ATR ratio for ordinary signals
float
0.95
v6MinAtrRatio
Minimum ATR ratio for reversal energy
float
1.00
v6MinExpansionRatio
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