An overlay that draws a SuperTrend-style trend line built from a volume-weighted moving average, selectable from SMA, EMA, WMA, RMA or VWMA types, with a fixed ATR factor.
1Copy the scriptPress Copy script above, or the copy button on the code below.
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
174 lines of Pine Script v5 from src/indicators/custom/tshArrow.pine, published under MIT. Keep the author's credit and licence lines when you reuse it.
A k-nearest neighbours routine compares recent prices with the smoothed trend line to produce trend signals, with arrows and background colours for up, down and neutral states. Length and colours are adjustable. The method uses a small data window, so its signals are sensitive to settings.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Trend Signals
bool
true
aisignals
Arrow
bool
true
voir_fleche
Bullish_col
color
color.lime
Bullish_col
Bearish_col
color
color.red
Bearish_col
Moving Average Source
string
WMA
maSrc
Length
int
20
len
Up
color
color.new(color.lime,80)
upCol
Down
color
color.new(color.red,80)
dnCol
Neutral
color
color.new(color.blue,80)
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 indicator uses a Lorentzian distance k-nearest neighbors classification algorithm to predict market direction based on up to five technical features, such as RSI, WaveTrend, CCI, and ADX. It compares current feature values against historical bar patterns
This indicator calculates a locally weighted regression curve alongside a standard linear regression line to detect directional price shifts. It identifies potential buy signals when the weighted line crosses below the linear regression while falling over a de
This indicator calculates a trend direction and smoothed moving average using a k-nearest neighbours (k-NN) classification algorithm directly on the main price chart. Users can select input price types, target values, neighborhood size, and smoothing periods.
An overlay indicator that applies a k-nearest-neighbors machine learning classifier using Lorentzian distance to predict price movement. It evaluates historical market features, such as RSI, WaveTrend, CCI, and ADX, to identify similar price-time patterns and
This indicator uses a Hidden Markov Model (HMM) framework combined with an adaptive dual moving average engine and Directional Movement Index (DMI) features to identify market regimes (bullish, bearish, or ranging/chop). It calculates regime probabilities on e
This overlay indicator plots a SuperTrend-style band on the price chart using ATR length, a selectable source, and a base factor. Optional settings enable an adaptive factor driven by rate of change, a volatility filter, K-means clustering, and an LSTM layer w