The AI Trend Detector utilizes a native Pine Script machine learning runtime to classify market trends into bearish, neutral, or bullish probabilities.
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
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.
Native Pine Script deep learning model using NeuraLib
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Price source
source
close
srcInput
Adaptive MA length
int
34
maLenInput
Fast response
int
4
maFastInput
Slow response
int
60
maSlowInput
Decision volatility
int
30
volLenInput
Trend horizon
int
8
horizonInput
Neutral threshold
float
0.6
neutralThresholdInput
Probability temperature
float
1.0
temperatureInput
Temporal state window
int
30
sequenceLenInput
Temporal filters
int
6
temporalFiltersInput
Temporal kernel
int
3
temporalKernelInput
Temporal conv layers
int
1
temporalLayersInput
Show all 36 settings
Setting
Type
Default
Variable
Classifier neurons
int
12
hiddenUnitsInput
Classifier layers
int
1
hiddenLayersInput
Dropout
float
0.0
dropoutInput
Learning rate
float
0.003
learningRateInput
Random seed
int
13
seedInput
Training windows
int
60
trainingWindowsInput
Training passes
int
1
trainPassesInput
Train every N bars
int
4
trainStrideInput
Historical train window
int
1000
trainWindowInput
Adaptive MA
bool
true
showMaInput
Dashboard
bool
true
showDashInput
Cyan-purple oscillator
bool
true
showGradientInput
Directional confidence
bool
true
showConfidenceInput
Zero-lag smoothing
int
6
signalSmoothInput
AI MA cloud strength
float
1.6
maCloudStrengthInput
Chart triangles
bool
true
showChartTrianglesInput
Triangle trigger
string
MARKER_MODE_ROTATION
triangleModeInput
Rotation confirmation
int
1
rotationConfirmBarsInput
Overbought level
float
65.0
overboughtLevelInput
Oversold level
float
18.2
oversoldLevelInput
Bull
color
#00e5ff
bullColorInput
Neutral
color
#8f9bff
neutralColorInput
Bear
color
#a855f7
bearColorInput
state_window
input
array.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.
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
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
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
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
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
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