RSI Neural Engine
Jun 4, 2026

The RSI Neural Engine indicator is a real-time neural network tool that learns market patterns directly on the chart to predict future price regimes. It utilizes forward propagation, backpropagation, and an Adam optimizer to analyze RSI-derived features and market context, providing a probabilistic outlook on whether the market is bullish, bearish, or neutral.
Usage
The Usage section describes how the script can be used to filter entries and identify market regimes.
- Warm-up Period: Upon adding the script to a chart, the network starts with randomized weights. It requires a "warm-up" period (defined by the Warm-up Samples setting) to learn the specific market's behavior before it begins coloring candles.
- Regime Identification: The indicator paints candles based on its conviction. Strong green indicates a high-probability bullish regime, strong red indicates a high-probability bearish regime, and faded or uncolored candles represent a neutral or "unsure" state where the user may choose to stand aside.
- Forecasting: Users should adjust the Forecast Horizon to match their specific trading style. A low horizon (e.g., 5-8) is suitable for scalping, while a higher horizon (e.g., 14-20) is better for swing trading.
- Dashboard Analysis: The live dashboard provides real-time metrics including out-of-sample accuracy. If the "Live Accuracy" stays above the baseline (33.3% for a 3-class model), the network has successfully identified tradable structures in the data.
Details
The RSI Neural Engine is built as a true multi-layer perceptron (MLP) within Pine Script. Unlike static indicators, it performs a continuous learning loop on every bar.
- Feature Engineering: The network is fed 10 distinct features, including RSI value, slope, acceleration, and volatility, as well as higher-timeframe context and price distance from a trend EMA.
- Learning Mechanism: It uses a "Replay Batch" system, revisiting recent historical samples to update its internal weights. The labels for these samples are generated by looking ahead at the price move over the "Forecast Horizon" and comparing it to the ATR-normalized "Move Threshold."
- Softmax Output: The network outputs a probability distribution across three classes: Bullish, Bearish, and Neutral. This allows the indicator to express confidence levels rather than just binary signals.
Settings
RSI & Context
- Price Source: The price data used to calculate the RSI.
- RSI Length: The lookback period for the primary RSI calculation.
- ATR Length: Period used for volatility normalization of labels and features.
- Higher Timeframe: The timeframe for the secondary RSI input, providing swing-level context.
- Trend EMA Length: The period for the trend-tracking EMA.
- ADX Length: The lookback for trend strength filtering.
Network & Learning
- Hidden Units: The number of neurons in the hidden layer; more units increase capacity but also the risk of overfitting.
- Forecast Horizon (bars): The number of bars into the future the network attempts to predict.
- Move Threshold (×ATR): The minimum price move required to categorize a sample as bullish or bearish rather than neutral.
- Learning Rate: Controls how aggressively the network updates its weights per error.
- Epochs / bar: The number of training passes performed on each new candle.
- Replay Batch: The number of recent samples revisited during each training cycle.
- Normalization Window: The window size for standardizing input features (Z-score).
Candle Coloring & Display
- Style: Choose between Gradient (intensity based on conviction) or Discrete (solid colors).
- Neutral Zone (%): The probability threshold below which candles remain neutral.
- Show Network Dashboard: Toggles the visibility of the performance metrics table.
- Conviction Smoothing: Applies a moving average to the network's output to reduce visual noise.
FAQ
How does the "Live Accuracy" metric work? The Live Accuracy measures how often the network's highest-probability prediction matched the actual price outcome after the Forecast Horizon has passed. It only tracks "out-of-sample" data that the network hasn't seen yet.
Why are my candles not changing color? The network requires a minimum number of samples (set by "Warm-up Samples") to train before it outputs predictions. Additionally, if the network's conviction is lower than the "Neutral Zone" setting, the candles will remain their default color.
How do I get access to the RSI Neural Engine? You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
Free indicator
Get free access to this indicator on the platforms below.
Unlock the entire LuxAlgo Library
Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.