OPEN-SOURCE SCRIPT
Güncellendi NeuroTrend

NeuroTrend is an advanced, self-adjusting trend analysis system that continuously adapts to changing market conditions using volatility-aware smoothing, momentum weighting, and intelligent trend classification. It provides real-time trend detection, confidence scoring, early reversal warnings, and slope projection, all delivered through a coaching dashboard and structured rule-based commentary system.
At its core, NeuroTrend uses two EMAs whose smoothing lengths change automatically based on current volatility, measured by the ATR relative to price, and momentum bias, measured by RSI displacement from the neutral level. These adaptive EMAs create a flexible baseline that adjusts to the pace of the market. From these EMAs, the system calculates angular slope and derives a slope power score, which reflects directional momentum weighted by volatility.
NeuroTrend classifies each bar into one of five market phases: Impulse, Cooling, Reversal Risk, Stall, or Neutral. This classification is based on slope strength, slope variability, and RSI behavior. Each phase offers specific context for whether to enter, continue, or avoid a position.
The indicator uses what is referred to as a neural memory engine, which is inspired by the idea of memory but is not a neural network or machine learning model. Instead, it is a statistical recalibration system that adjusts thresholds using recent ATR conditions and slope standard deviation. This allows the indicator to remain aligned with the current market environment without the need for manual tuning.
Although NeuroTrend is fully adaptive, it includes inputs for the base fast and slow EMAs. These inputs define the central anchor points around which the adaptive logic operates. This gives the trader the ability to control the default behavior of the indicator while still benefiting from real-time responsiveness to volatility and momentum.
To assess the strength of a trend, NeuroTrend computes a confidence score based on four elements: DMI trend strength, directional bias from DI+ and DI–, slope normalization, and volatility efficiency measured by ATR in relation to EMA distance. This score is used to inform alerts, commentary, and dashboard visualization.
The indicator also includes a slope projection engine that estimates near-term direction based on slope change and acceleration. This projection is scaled and clamped using a dynamic volatility factor to prevent unrealistic or unstable values.
Reversal and stall detection are built in. Reversal detection is based on slope collapsing, sign flipping, and RSI weakness. Stall detection is triggered when slope magnitude is low, RSI is flat, and ATR is compressed. These filters help prevent entries in low-quality or high-risk environments.
The system also includes AI-style commentary. This feature is not powered by machine learning or natural language processing. It is rule-based, using prioritized conditions to generate clear statements that reflect the current market state. Messages such as "Strong trend forming" or "Reversal risk rising" are created by predefined logic that adapts to the market.
A visual dashboard is provided on the chart. It displays the current phase, trend direction, slope score, confidence level, reversal status, stall condition, and projected slope angle. This helps traders interpret market behavior at a glance without scanning multiple indicators.
Alerts are triggered only when specific conditions are met: trend strength must be in the impulse phase, confidence must be high, and there must be no active reversal or stall conditions. This ensures alerts are reserved for high-quality setups with strong directional alignment.
Disclaimer:
This script is intended for educational and informational use only. It does not constitute financial advice. The author accepts no responsibility for any trading or investment decisions made using this tool. Always do your own research and consult a licensed financial advisor before making financial decisions.
At its core, NeuroTrend uses two EMAs whose smoothing lengths change automatically based on current volatility, measured by the ATR relative to price, and momentum bias, measured by RSI displacement from the neutral level. These adaptive EMAs create a flexible baseline that adjusts to the pace of the market. From these EMAs, the system calculates angular slope and derives a slope power score, which reflects directional momentum weighted by volatility.
NeuroTrend classifies each bar into one of five market phases: Impulse, Cooling, Reversal Risk, Stall, or Neutral. This classification is based on slope strength, slope variability, and RSI behavior. Each phase offers specific context for whether to enter, continue, or avoid a position.
The indicator uses what is referred to as a neural memory engine, which is inspired by the idea of memory but is not a neural network or machine learning model. Instead, it is a statistical recalibration system that adjusts thresholds using recent ATR conditions and slope standard deviation. This allows the indicator to remain aligned with the current market environment without the need for manual tuning.
Although NeuroTrend is fully adaptive, it includes inputs for the base fast and slow EMAs. These inputs define the central anchor points around which the adaptive logic operates. This gives the trader the ability to control the default behavior of the indicator while still benefiting from real-time responsiveness to volatility and momentum.
To assess the strength of a trend, NeuroTrend computes a confidence score based on four elements: DMI trend strength, directional bias from DI+ and DI–, slope normalization, and volatility efficiency measured by ATR in relation to EMA distance. This score is used to inform alerts, commentary, and dashboard visualization.
The indicator also includes a slope projection engine that estimates near-term direction based on slope change and acceleration. This projection is scaled and clamped using a dynamic volatility factor to prevent unrealistic or unstable values.
Reversal and stall detection are built in. Reversal detection is based on slope collapsing, sign flipping, and RSI weakness. Stall detection is triggered when slope magnitude is low, RSI is flat, and ATR is compressed. These filters help prevent entries in low-quality or high-risk environments.
The system also includes AI-style commentary. This feature is not powered by machine learning or natural language processing. It is rule-based, using prioritized conditions to generate clear statements that reflect the current market state. Messages such as "Strong trend forming" or "Reversal risk rising" are created by predefined logic that adapts to the market.
A visual dashboard is provided on the chart. It displays the current phase, trend direction, slope score, confidence level, reversal status, stall condition, and projected slope angle. This helps traders interpret market behavior at a glance without scanning multiple indicators.
Alerts are triggered only when specific conditions are met: trend strength must be in the impulse phase, confidence must be high, and there must be no active reversal or stall conditions. This ensures alerts are reserved for high-quality setups with strong directional alignment.
Disclaimer:
This script is intended for educational and informational use only. It does not constitute financial advice. The author accepts no responsibility for any trading or investment decisions made using this tool. Always do your own research and consult a licensed financial advisor before making financial decisions.
Sürüm Notları
Reflex ModeReflex Mode is an optional performance upgrade designed to reduce lag and increase responsiveness in high-speed trading environments such as 0DTE options. When enabled, the indicator shifts to a faster, more reactive configuration while preserving its adaptive core.
Changes Introduced in Reflex Mode:
EMA Engine:
Fast EMA length reduced to 75% of base; slow EMA to 85%
Smoothing Logic:
Faster alpha values applied for quicker response to price changes
Slope Power Calculation:
Momentum sensitivity increased to improve early trend acceleration detection
Neural Memory Engine:
ATR and slope memory lookbacks reduced from 50 to 20 bars
Reflex Mode Benefits:
Responds more quickly to shifts in trend and structure
Detects early-stage momentum and reversals with reduced lag
Preserves adaptive logic with enhanced reactivity
Recommended Timeframes:
1-minute, 3-minute, and 5-minute charts
Ideal Use Case:
0DTE options trading and other ultra-short-term strategies
Sürüm Notları
Custom Commentary Text ColorAdded user input for selecting the text color of AI commentary labels
Sürüm Notları
OverviewThis update improves visual flexibility and adds user-defined alert customization.
New Features
1. Customizable Dashboard Positioning
Users can now reposition the NeuroTrend dashboard to any chart location using a dropdown menu. Available options are:
Top Left
Top Middle
Top Right
Bottom Left
Bottom Middle
Bottom Right
2. Dashboard Text Color
A new input allows users to change the dashboard text color. This improves readability across
both light and dark TradingView themes.
3. Custom Alert Builder
A modular alert system has been added for traders who want full control over when alerts
trigger. Inputs include:
Enable or disable custom alerts independently from the default smart alert
Minimum confidence score threshold
Impulse-only mode
Bullish-only or Bearish-only trend filtering
Block alert if reversal risk is present
Block alert if a momentum stall is detected
How to Use
Go to the Alerts section in the settings panel.
Enable Custom Alerts to define your own alert logic using dropdowns and thresholds.
Use TradingView’s Create Alert feature and choose either
"NeuroTrend Smart Alert"
"Custom NeuroTrend Alert"
Sürüm Notları
What’s New in v2.0:• Bullish and Bearish Reversal Detection
Reversal logic is now symmetrical. The system detects and labels both bullish breakouts and bearish breakdowns in real-time.
• Recovery Rally Recognition
Identifies recovery bounces when price reclaims structure during a reversal from a bearish phase. Useful for catching early uptrend continuations after dips.
• Phase Shift Tracking
Tracks changes in trend phase (Impulse, Cooling, Neutral, Reversal) and highlights phase transitions. Helps traders react to trend evolution, not just current state.
• Momentum Fading Alerts
Detects weakening momentum before the trend fully stalls or reverses. A useful early signal to reduce risk exposure or avoid late entries.
• Slope Projection Confidence Score
Slope forecasts now include a confidence rating (High, Medium, Low), based on acceleration strength. Adds context to trend continuation expectations.
• Time-of-Day Context Awareness
Commentary and internal logic now reflect intraday session timing. NeuroTrend distinguishes between Morning Drive, Midday Drift, Power Hour, and After Hours conditions.
• Confidence Decay Based on Trend Age
Older trends automatically reduce confidence score over time. Helps avoid false conviction in stale or overextended moves.
• Smart Entry Zone Detection
Highlights ideal pullback entry zones during active impulse trends. Detects reclaim of EMAs after minor dips with trend strength intact.
Sürüm Notları
Toggle added for buy/sell signalsSürüm Notları
Slope calculations are now properly normalized using ATR. This fixes the issue where slope angle and trend signals appeared weak or flat on short timeframes like the 1-minute or 5-minute chart. Trends now reflect more accurately regardless of timeframe.The slope projection engine has also been upgraded. It now uses volatility-adjusted slope changes to forecast future trend angle more reliably. This improves directional projection and confidence scoring across all market types.
The confidence scoring system has been stabilized. A potential division-by-zero issue in the volatility ratio has been resolved. As a result, confidence scores are smoother and better reflect true trend strength and directional bias.
A redundant RSI calculation was removed. The indicator now uses a single, consistent RSI value throughout all systems including reversal detection, stall zones, and commentary logic.
Commentary and entry signals are now more consistent. Smart entry signals based on impulse pullbacks are cleaner due to improved slope and confidence input. Commentary messages also align better with real-time behavior.
All unused variables such as slopeRaw and old slopeNorm logic have been removed.
This update improves performance, clarity, and signal quality without changing the core behavior of the indicator.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuna uygun olarak, bu komut dosyasının oluşturucusu bunu açık kaynaklı hale getirmiştir, böylece yatırımcılar betiğin işlevselliğini inceleyip doğrulayabilir. Yazara saygı! Ücretsiz olarak kullanabilirsiniz, ancak kodu yeniden yayınlamanın Site Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuna uygun olarak, bu komut dosyasının oluşturucusu bunu açık kaynaklı hale getirmiştir, böylece yatırımcılar betiğin işlevselliğini inceleyip doğrulayabilir. Yazara saygı! Ücretsiz olarak kullanabilirsiniz, ancak kodu yeniden yayınlamanın Site Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.