Indicator · Pine Script v5 · On the chart

SuperTrend AI (Clustering) [LuxAlgo]

by bwithai· code credited to LuxAlgo

This overlay indicator builds many SuperTrend trailing stops across a user-set ATR length, factor range, and step.

View on GitHub

GitHub stars9on the repository
Pine versionv5runs as is
Lines of code215
Settings17inputs
LicenceNone stated
Last update3 years ago5 Sep 2023

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above. It reads the file straight from GitHub.
  2. 2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
  3. 3Paste over the templateCreate a new indicator, select all of the template text and paste. Press Save and give it a name.
  4. 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

Each factor is scored with an exponential performance memory. K-means clustering groups those results, and the user chooses the best, average, or worst cluster for the displayed trail. Style options cover trailing-stop and AMA colors, candle coloring, and signals. A dashboard can show cluster information at a chosen corner and text size. Iteration count and historical bar depth limit the calculation.

Details

Published by

bwithai on GitHub

Code credit

LuxAlgo, as written in the script's header

Type

Indicator, Pine Script v5

Draws

On the price chart

Category

Trend, Volatility & bands, AI / machine learning, Screeners & dashboards

Markets

Any symbol

Timeframes

Any timeframe

Risk Notes

No repainting, lookahead or stacked entries were found in its code or README. That says nothing about how well it works: test it first.

Topics

dockergoogle-cloudpythonscraperseleniumtradingtradingview

Settings

The inputs you can change from the gear icon on the chart. Defaults are the author's.

SettingTypeDefaultVariable
ATR Lengthint10length
Factor Rangeint1minMult
maxMultint5maxMult
Stepfloat.5step
Performance Memoryfloat10perfAlpha
From ClusterstringBestfromCluster
Maximum Iteration Stepsint1000maxIter
Historical Bars Calculationint10000maxData
Trailing Stopcolorcolor.redbearCss
bullCsscolorcolor.tealbullCss
AMAcolorcolor.new(color.red, 50)amaBearCss
amaBullCsscolorcolor.new(color.teal, 50)amaBullCss
Show all 17 settings
SettingTypeDefaultVariable
Candle ColoringbooltrueshowGradient
Show SignalsbooltrueshowSignals
Show DashboardbooltrueshowDash
LocationstringTop RightdashLoc
SizestringSmalltextSize
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.

Similar Pine Scripts

46 stars

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

Indicator v5 AI / machine learningTrend
Updated 7 weeks ago · None stated GitHub repository of HMM Enhanced: Regime Probability

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

Indicator v6 TrendVolatility & bands
Updated 4 months ago · MIT GitHub repository of ML SuperTrend (Ultimate) - Auto-Optimized AI with LSTM

Markov State Engine classifies market conditions into six distinct regimes, including strong trends, weak trends, compression, and expansion. It evaluates historical state transitions using an exit-conditional Markov model with Laplace smoothing to estimate re

Indicator v6 AI / machine learningTrend
Updated yesterday · MIT GitHub repository of Markov State Engine [WavesUnchained]
92 stars

This indicator classifies the market into gamma regime types (negative gamma trend, positive gamma mean-reversion, or transition) by calculating a composite score based on daily ATR ratios, session VWAP crossover frequencies, and opening range displacement. It

Indicator v5 Volatility & bandsTrend
Updated 8 weeks ago · Custom licence GitHub repository of Moon Dev GEX Regime & Trap
43 stars

This indicator calculates standardized trend strength and historical volatility to estimate position sizes. It computes the differences between three user-defined EMAs standardized by price using MACD logic, while historical volatility is derived from the stan

Indicator v5 TrendVolatility & bands
Updated 1 year ago · None stated GitHub repository of Trend Strength & Volatility v2

More indicators

Trade Your Charts With a Regulated Broker

Compare brokers that connect to TradingView, with spreads, minimum deposits and leverage side by side.

Compare brokers