Indicator · Pine Script v6 · Own pane

AI Trend Detector | Adaptive Signals

by AlienAlgorithms

The AI Trend Detector utilizes a native Pine Script machine learning runtime to classify market trends into bearish, neutral, or bullish probabilities.

View on GitHub

GitHub stars7on the repository
Pine versionv6current
Lines of code424
Settings36inputs
LicenceCustom licence
Last update5 weeks ago15 Oct 2026

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

AI Trend Detector | Adaptive Signals processes normalized feature sequences from price volatility and adaptive moving averages through a temporal convolutional neural network trained on historical bars. The script plots a directional confidence oscillator in a separate pane along with signal markers and an optional dashboard. Settings allow customization of feature lengths, trend horizons, network architecture, and learning parameters.

Details

Published by

AlienAlgorithms on GitHub

Draws

Separate pane below the chart

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.

Settings

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

SettingTypeDefaultVariable
Price sourcesourceclosesrcInput
Adaptive MA lengthint34maLenInput
Fast responseint4maFastInput
Slow responseint60maSlowInput
Decision volatilityint30volLenInput
Trend horizonint8horizonInput
Neutral thresholdfloat0.6neutralThresholdInput
Probability temperaturefloat1.0temperatureInput
Temporal state windowint30sequenceLenInput
Temporal filtersint6temporalFiltersInput
Temporal kernelint3temporalKernelInput
Temporal conv layersint1temporalLayersInput
Show all 36 settings
SettingTypeDefaultVariable
Classifier neuronsint12hiddenUnitsInput
Classifier layersint1hiddenLayersInput
Dropoutfloat0.0dropoutInput
Learning ratefloat0.003learningRateInput
Random seedint13seedInput
Training windowsint60trainingWindowsInput
Training passesint1trainPassesInput
Train every N barsint4trainStrideInput
Historical train windowint1000trainWindowInput
Adaptive MAbooltrueshowMaInput
DashboardbooltrueshowDashInput
Cyan-purple oscillatorbooltrueshowGradientInput
Directional confidencebooltrueshowConfidenceInput
Zero-lag smoothingint6signalSmoothInput
AI MA cloud strengthfloat1.6maCloudStrengthInput
Chart trianglesbooltrueshowChartTrianglesInput
Triangle triggerstringMARKER_MODE_ROTATIONtriangleModeInput
Rotation confirmationint1rotationConfirmBarsInput
Overbought levelfloat65.0overboughtLevelInput
Oversold levelfloat18.2oversoldLevelInput
Bullcolor#00e5ffbullColorInput
Neutralcolor#8f9bffneutralColorInput
Bearcolor#a855f7bearColorInput
state_windowinputarray.from(modelInputCount)state_window
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

228 stars

Multi-Timeframe Analysis Suite calculates trend direction and momentum conditions across five user-selected timeframes using moving averages, RSI, and Stochastic oscillators. It evaluates moving average slope and oscillator levels to compute trend alignment, m

Indicator v6 Screeners & dashboardsTrend
Updated 4 months ago · None stated GitHub repository of Multi-Timeframe Analysis Suite

KamaFama

by Mastaaa1987
141 stars

KamaFama is an indicator that translates a Freqtrade trading strategy into Pine Script for visualization. It combines Kaufman Adaptive Moving Average (KAMA), MAMA/FAMA calculations derived via Hilbert Transform, Williams %R, and correlation trend filters to ev

Indicator v6 Moving averagesOscillators & momentum
Updated 2 months ago · MIT GitHub repository of KamaFama

This indicator combines a dynamic Seasonal Random Index (SRI) with a dynamic Karobein Oscillator and a pattern-similarity search algorithm in a separate pane. It normalizes SRI into seasoned and deseasoned series, shading the area green or red to signal trend

Indicator v4 Oscillators & momentumTrend
Updated 2 years ago · None stated GitHub repository of Similarity Search, Karobein and Seasonal Random Index

This indicator plots an oscillator in a separate pane. It builds several SuperTrend series across a user-defined factor range and step, using ATR as the band width. On each bar it measures the distance between the close and each SuperTrend output, then groups

Indicator v5 TrendVolatility & bands
Updated 2 years ago · GPL-3.0 GitHub repository of AI SuperTrend Clustering Oscillator [LuxAlgo]

Nexural Pressure Pro

by JasonTeixeira
11 stars

Nexural Pressure Pro is a composite pressure indicator that measures directional market momentum using volume-weighted directional movement, order flow delta, aggression, and efficiency ratio metrics. It filters out low-activity bars using configurable volume

Indicator v6 Oscillators & momentumVolume
Updated 5 weeks ago · Custom licence GitHub repository of Nexural Pressure Pro

The Adaptive Cycle Detector estimates the dominant market cycle from WaveTrend oscillator zero-crossing frequency and applies smoothing to recommend adaptive indicator lengths. Fast markets with frequent crossings receive shorter lengths while slow swing marke

Indicator v6 Oscillators & momentumVolatility & bands
Updated 4 weeks ago · MIT GitHub repository of Adaptive Cycle Detector [WavesUnchained]

More AI / machine learning scripts

Related on ForexR

Trade Your Charts With a Regulated Broker

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

Compare brokers