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
Self-Aware Trend System draws ATR bands whose width reacts to an efficiency-based trend quality index that blends efficiency, volatility regime, structure and momentum persistence. Options include asymmetric bands, an efficiency-weighted ATR, character-flip detection, presets for scalping, swing or crypto, and a self-learning component. Signals are graded by a score, stop and target settings are included, and a dashboard summarizes the state.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Preset
string
Auto
presetInput
ATR Length
int
13
atrLenInput
Base Band Width (xATR)
float
2.0
baseMultInput
Source
source
close
sourceInput
Enable Vol-Adaptive Bands (legacy ER)
bool
true
useAdaptiveInput
Efficiency Window
int
20
erLengthInput
Adaptation Strength
float
0.5
adaptStrengthInput
ATR Baseline Length
int
100
atrBaselineLenInput
Enable Trend Quality Engine
bool
true
useTqiInput
Quality Influence
float
0.4
qualityStrengthInput
Quality Curve Power
float
1.5
qualityCurveInput
Smooth Adaptive Multipliers
bool
true
multSmoothInput
Show all 40 settings
Setting
Type
Default
Variable
Asymmetric Bands
bool
true
useAsymBandsInput
Asymmetry Strength
float
0.5
asymStrengthInput
Efficiency-Weighted ATR
bool
true
useEffAtrInput
Character-Flip Detection
bool
true
useCharFlipInput
Char-Flip: Min Trend Age / Window
int
5
charFlipMinAgeInput
Char-Flip: High TQI
float
0.55
charFlipHighInput
Char-Flip: Low TQI
float
0.25
charFlipLowInput
Weight: Efficiency
float
0.35
tqiWeightErInput
Weight: Volatility Regime
float
0.20
tqiWeightVolInput
Weight: Structure
float
0.25
tqiWeightStructInput
Weight: Momentum Persist
float
0.20
tqiWeightMomInput
Structure Window
int
20
tqiStructLenInput
Momentum Persist Window
int
10
tqiMomLenInput
Use Structure in Score (display)
bool
true
useStructureInput
Pivot Strength
int
3
pivotLenInput
Use RSI in Score (display)
bool
true
useRsiInput
RSI Length
int
14
rsiLenInput
RSI Overbought
int
70
rsiOBInput
RSI Oversold
int
30
rsiOSInput
RSI Memory (bars)
int
20
rsiLookbackInput
Use Volume in Score (display)
bool
true
useVolInput
Volume Z Window
int
20
volLenInput
Show TP/SL Levels
bool
true
showRiskInput
SL Buffer (xATR)
float
1.5
slAtrMultInput
Max SL Distance (xATR)
float
4.0
slMaxDistInput
TP Mode
string
Fixed
tpModeInput
TP1 (R-multiple)
float
1.0
tp1RInput
TP2 (R-multiple)
float
2.0
tp2RInput
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