OPEN-SOURCE SCRIPT

RSI OB/OS

281
RSI OB/OS Signals indicator

The RSI OB/OS Signals indicator is an analysis and training tool that uses simple statistical learning (rolling correlations and z-scoring) to produce a smoothed, adaptive RSI weighting and signal line intended to highlight probable short-term RSI movements. The script does not attempt black-box machine-learning model export instead, it uses transparent building blocks — returns, RSI, ATR percentage, volume change (log), and raw volume — as predictors to estimate the likely next-bar RSI, then converts that estimate into a bounded “weight” and a smoothed signal line. The objective is educational: show how simple correlation-based weighting of standardized features can serve as an RSI augmentation and help traders identify higher-probability bullish or bearish RSI cross conditions, while making all internal reasoning visible and explainable.

At its core the indicator performs three conceptual steps each bar: first it computes a set of per-bar features aligned to the target (prior bar RSI) — specifically prior-bar log returns, prior-bar RSI, ATR as percent of price, the log change in volume and the prior-bar raw volume.

Second it standardizes these predictors through rolling z-scoring and computes rolling Pearson correlations between each standardized predictor and the target RSI over a user-configurable learning window. These correlations act as signed linear weights: predictors with higher absolute correlation are treated as more informative for that window.

Third it forms a linear prediction by summing correlation × z(feature) across the top correlated predictors, then maps that standardized prediction back to RSI scale using the rolling mean and standard deviation of the target. The mapped prediction is finally converted to a bounded “rsiWeight,” smoothed by a signal moving average, and used to produce bullish/bearish events on crossovers of preconfigured thresholds.

VWAP, buy/sell volume breakdown and simple tracking of the price move since the last signal are also displayed to help traders interpret the quality of signals.
The components are chosen for clear, complementary roles rather than as a random mashup. Prior-bar RSI embodies short-term momentum and is the natural prediction target.

Log returns add price-direction information; ATR percent encodes the intrabar volatility regime (helpful because RSI behaviour differs in high vs low volatility); the volume log-change and raw volume provide a participation signal indicating whether structural moves are supported by real activity. Standardizing predictors and using rolling correlations lets the script adapt its emphasis to the current regime: when volume changes correlate strongly with subsequent RSI moves, the algorithm will weight that predictor more heavily; when returns correlate more, weight shifts accordingly. Because the method is linear, transparent and computed on rolling windows you can reproduce and reason about the weight changes — a key requirement for educational clarity and TradingView compliance.

How to read and use the indicator practically: treat the smoothed rsiWeight line (ma_rsi) and its threshold crossings as an RSI-augmentation alert — not as a standalone automated buy/sell system. A practical workflow is: first inspect the dashboard and confirm the underlying drivers (which predictors show strong z-scores and which had high rolling correlation in the learning window); second check VWAP position and volume split to ensure that the price move is supported; third only consider signals that coincide with your higher-timeframe bias or structural support/resistance.

For example, a bullish crossover (ma_rsi crossing above −0.5) that occurs while VWAP is below price, buy volume share is elevated, and ATR is moderate is a higher-quality setup than the same crossing on thin volume and extreme ATR.

Use ATR or recent swing structure for stop placement and predefine risk per trade. Because the indicator tracks max points since the last signal, you can also use that metric as a simple intraday performance monitor.

Parameter tuning guidance: the learning window (learnLen) controls how quickly the correlation weights adapt; a short window (e.g., 10–20) makes the predictor weights responsive to regime shifts but also noisier; a longer window (e.g., 40–80) smooths weights and emphasizes longer-term relationships.

The rsiLen (target RSI length) should match your intended horizon — 14 is standard and balances responsiveness and smoothness. sigLen controls the smoothing of the predicted RSI weight: lower values make the signal line more reactive (useful for scalping), higher values produce smoother signals (useful for swing trades).

For low-liquidity instruments increase learnLen and sigLen to reduce false alarms; for high-speed intra-day work shorten them. Volume heuristics (volume thresholds) are instrument dependent — calibrate volume formatting and volumetric thresholds for equities versus futures or crypto.

Limitations and failure modes are explicit and important: the feature-selection approach is linear and based on Pearson correlation — it cannot capture nonlinear dependencies or temporal lags beyond the single lag studied, so it may miss relationships that require higher-order features.

The volume split used (close>open vs close<open) is an approximation and is not equivalent to signed trade-by-trade tape; treat it as a participation heuristic. During earnings, macro news, or thin overnight sessions, volatility and volume patterns change rapidly and the rolling correlations can be unstable; short learnLen values may cause the system to overweight noise in such windows.

Also, because the predictor set is small and handcrafted, the indicator is not a universal oracle — it is a lens that works best when combined with structural analysis (support/resistance, higher-timeframe trend) and sound risk management.

Finally, the indicator raises potential false positives in strongly trending markets where RSI can stay overbought or oversold for extended periods; combine rsiWeight signals with VWAP and volume confirmation to reduce such errors.

For learning and testing, recommended experiments include: (1) log all bullish and bearish cross events and compute median outcome for 5, 15 and 60 bar horizons to estimate expectancy; (2) test different learnLen values to understand the bias-variance tradeoff in rolling correlation weighting; (3) disable one predictor at a time to measure its marginal contribution (i.e., remove ATR% or volume change and observe signal degradation); (4) run the indicator on instruments with different liquidity profiles (large-cap equities, small caps, futures) to see how volume heuristics generalize. These exercises convert the indicator from a black box into a reproducible classroom exercise and are strongly recommended prior to any live trading.

Originality and mashup justification (concise): this indicator is original because it combines a transparent, rolling correlation-based feature weighting method with classic technical inputs to produce an adaptive, explainable RSI augmentation. Rather than simply overlaying multiple black-box indicators, it explicitly computes which predictors are informative in the current regime and uses them as signed coefficients for a standardized linear prediction mapped back to RSI scale. The emphasis on transparency, reproducibility and educational experiments makes this a learning-first tool rather than an opaque indicator mashup.

Finally, for publication on TradingView include a clear description that lists the components, explains the correlation-based weighting concept in plain English, specifies tunable inputs and recommended defaults, documents limitations, and contains the risk disclaimer below. Do not include promotional content, external contact details or trademark claims in the description field — follow TradingView’s ad-free policy.
________________________________________

RSI OB/OS Signals () — Educational RSI augmentation and idea generator.
This script uses prior-bar predictors (returns, RSI, ATR%, log volume change and raw volume), rolling z-scoring and rolling Pearson correlations to compute an explainable, adaptive linear prediction of the next-bar RSI. The highest-correlated predictors are weighted by their signed correlation to produce a standardized prediction, mapped back to RSI scale and converted to a smoothed signal line. Crosses of the smoothed weight line generate bullish/bearish events; a compact dashboard shows VWAP, buy/sell volume share and max points since last signal to help evaluate signal quality. Inputs allow tuning of RSI length, learning window and signal smoothing. The approach is intentionally transparent — designed for learning and backtesting, not automated trading.
________________________________________

This indicator is provided for educational and analysis purposes only. It does not constitute financial, legal, or investment advice and does not guarantee profit. Predictor weights are computed from short rolling correlations and are an approximation; volume breakdowns are a heuristic (close>open vs close<open) and do not replace trade-by-trade tape. Backtest thoroughly, use demo accounts, and apply strict risk management before trading with real capital. The author is not responsible for losses resulting from use or misuse of this script.
________________________________________

Disclaimer
Training & Educational Only — This material and the RSI OB/OS indicator are provided for educational purposes only. Nothing here is investment advice or a solicitation to buy or sell financial instruments. Past simulated or historical performance does not predict future results. Always perform full back testing and risk management, and consider seeking advice from a qualified financial professional before trading with real capital.
________________________________________

Отказ от ответственности

Все виды контента, которые вы можете увидеть на TradingView, не являются финансовыми, инвестиционными, торговыми или любыми другими рекомендациями. Мы не предоставляем советы по покупке и продаже активов. Подробнее — в Условиях использования TradingView.