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
Volume SuperTrend AI (Expo) computes a SuperTrend using customizable moving average types, including simple, exponential, weighted, smoothed, or volume-weighted moving averages, alongside a KNN algorithm to detect trend direction. Users can modify the neighbor count, lookback evaluation lengths, SuperTrend factor, and color themes. Visual trend lines and AI signal shapes are plotted directly on the main price chart.
K-nearest neighbors algorithm for trend classification
Multiple moving average options for SuperTrend calculation
Customizable KNN neighbor count and data lookback lengths
On-chart SuperTrend lines and AI trend signal markers
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Neighbors
int
3
k
Data
int
10
n_
Price Trend
int
20
KNN_PriceLen
Prediction Trend
int
100
KNN_STLen
AI Trend Signals
bool
true
aisignals
Bullish_col
color
color.lime
Bullish_col
Bearish_col
color
color.red
Bearish_col
Length
int
10
len
factor
float
3.0
factor
Moving Average Source
string
WMA
maSrc
Bullish Color
color
color.lime
upCol
Bearish Color
color
color.red
dnCol
Show all 13 settings
Setting
Type
Default
Variable
Neutral Color
color
color.blue
neCol
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 overlay classifies the chart into bull, bear, or neutral regimes from moving-average zone position and an adaptive engine driven by the efficiency ratio and ATR entry and exit bands. A volatility percentile rank adds quiet, normal, or volatile context, pl
This indicator plots standard Bollinger Bands and three configurable moving averages directly on the price chart. Users can toggle the Bollinger Bands, adjust their length and multiplier, and choose between exponential or simple moving averages for fast, slow,
This indicator plots four customizable moving averages directly on the main price chart using default lengths of 3, 8, 21, and 50 periods. It fills the space between adjacent averages in green or maroon depending on trend alignment. Additionally, it computes B
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 modifies standard Bollinger Bands to measure directional trend force based on line alignment. It calculates a simple moving average basis along with upper and lower volatility bands. When all three lines move upward or downward simultaneously, i
This indicator overlays trend-following Supertrend bands on the price chart using Average True Range calculations. It plots trailing stop lines, highlights active trend directions, and prints buy or sell shape labels when price closes across band thresholds. I