OPEN-SOURCE SCRIPT

RSI ADX Bollinger Analysis

229
High-level purpose and design philosophy
This indicator — RSI-ADX-Bollinger Analysis — is a compact, educational market-analysis toolkit that blends momentum (RSI), trend strength (ADX), volatility structure (Bollinger Bands) and simple volumetrics to provide traders a snapshot of market condition and trade idea quality. The design philosophy is explicit and layered: use each component to answer a different question about price action (momentum, conviction, volatility, participation), then combine answers to form a more robust, explainable signal. The mashup is intended for analysis and learning, not automatic execution: it surfaces the why behind signals so traders can test, learn and apply rules with risk management.
________________________________________
What each indicator contributes (component-by-component)
RSI (Relative Strength Index) — role and behavior: RSI measures short-term momentum by comparing recent gains to recent losses. A high RSI (near or above the overbought threshold) indicates strong recent buying pressure and potential exhaustion if price is extended. A low RSI (near or below the oversold threshold) indicates strong recent selling pressure and potential exhaustion or a value area for mean-reversion. In this dashboard RSI is used as the primary momentum trigger: it helps identify whether price is locally over-extended on the buy or sell side.
ADX (Average Directional Index) — role and behavior: ADX measures trend strength independently of direction. When ADX rises above a chosen threshold (e.g., 25), it signals that the market is trending with conviction; ADX below the threshold suggests range or weak trend. Because patterns and momentum signals perform differently in trending vs. ranging markets, ADX is used here as a filter: only when ADX indicates sufficient directional strength does the system treat RSI+BB breakouts as meaningful trade candidates.
Bollinger Bands — role and behavior: Bollinger Bands (20-period basis ± N standard deviations) show volatility envelope and relative price position vs. a volatility-adjusted mean. Price outside the upper band suggests pronounced extension relative to recent volatility; price outside the lower band suggests extended weakness. A band expansion (increasing width) signals volatility breakout potential; contraction signals range-bound conditions and potential squeeze. In this dashboard, Bollinger Bands provide the volatility/structural context: RSI extremes plus price beyond the band imply a stronger, volatility-backed move.
Volume split & basic MA trend — role and behavior: Buy-like and sell-like volume (simple heuristic using close>open or close<open) help approximate whether participants supported the price move. Two simple SMAs (20/50 shown in the script for trend bias) give structural trend direction. The volume heuristic helps distinguish thin, retail-driven spikes from moves with participation; trend SMAs bias signal interpretation (prefer buy signals in bullish structure, sell signals in bearish structure).
Signal logic distilled: the script marks a BUY when RSI is below the oversold threshold and price is below the lower Bollinger band and ADX has just crossed above the ADX threshold (i.e., momentum reversal with expanding volatility and rising trend strength). It marks a SELL when RSI is overbought and price is above the upper band and ADX crossed up. This three-part agreement (momentum extreme + volatility expansion + trend/strength confirmation) is intentionally conservative — it reduces noise compared with any single indicator alone.
________________________________________
Why the combination is stronger than single indicators (mashup rationale)
Each indicator has well-known failure modes on its own. RSI gives false overbought/sold readings in strong trends; Bollinger Band breakouts can occur in one-sided moves with little follow-through; ADX can lag early in a trend. By combining them you get complementary coverage of weaknesses: RSI pinpoints local extremes; BB identifies the volatility context of that extreme; ADX vouches for whether the market has the strength to sustain a move beyond the extreme. Volume adds a participation check. The mashup is not a random “more indicators” bundle — it’s an ensemble where each indicator answers a different question, and only when answers align does the dashboard surface an active BUY/SELL state. This alignment reduces type-I errors (false positives) and gives a transparent reason for each signal — exactly what TradingView wants: explain why components were merged and how they interact.
________________________________________
Step-by-step signal generation (plain English flow)
1. Compute RSI over the configured lookback to detect short-term momentum extremes.
2. Compute Bollinger Bands (basis and ±stddev) to find whether price is outside the normal volatility envelope and whether the band width is expanding (volatility rising).
3. Compute ADX and DI to measure whether trend strength has risen above a configurable threshold — ADX rising implies stronger directional conviction.
4. Apply SMA or trend check (optional) to bias interpretation (e.g., prefer buys when price is above a fast SMA and sells when below).
5. Approximate buy/sell volume by classifying candles as buy-like (close>open) or sell-like (close<open) and compare to a volume moving average to evaluate participation.
6. Fire a BUY alert only when RSI is oversold, price below lower Bollinger band, and ADX crosses above threshold — these three conditions together indicate a likely mean-reversion into a trending expansion or the start of a trend reversal. FIRE a SELL when the inverse conditions hold.
7. Track performance from the signal entry price and present running max profit/loss so users can visually inspect what happens after a signal for learning and backtesting.
________________________________________
How to interpret the dashboard — practical usage rules
Treat the dashboard as an idea filter and teaching device, not as an automatic trade caller. A robust workflow: (A) Check if the dashboard reports BUY/SELL ACTIVE; (B) Confirm higher-timeframe trend and structure (e.g., look at 4h or daily SMA slope); (C) Check volume participation — prefer moves with above-average volume; (D) Use an explicit stop (swing high/low or ATR multiple) and predefine risk:reward; (E) Backtest the exact combination and holding period you plan to use (e.g., 3 bars, 10 bars, daily close). For intraday traders, tighten stops and consider only trades during market liquidity windows.
________________________________________
Parameter tuning — how to choose inputs and why they matter
• RSI length and thresholds: Short RSI (e.g., 9–14) is more sensitive; longer (e.g., 21) smooths noise. For scalping, keep RSI shorter; for swing trading, lengthen it. Overbought/oversold levels can be adjusted — 70/30 is classic; 80/20 is more selective.
• Bollinger length and stddev: 20/2 is standard. Increasing stddev makes band breakouts rarer (more selective); decreasing stddev makes the system more sensitive. Band length also affects responsiveness.
• ADX threshold & smoothing: 25 is common to indicate a tradable trend. Lowering threshold (e.g., 20) catches weaker trends faster but increases noise. ADX smoothing affects lag—more smoothing reduces whipsaws but lags more.
• Volume MA length: Short MA responds faster to session changes; long MA provides a sturdier baseline. Match this to your instrument’s liquidity.
Tune parameters via walk-forward testing and keep changes small. Always record the out-of-sample performance.
________________________________________
Experiments and backtest exercises (learning plan)
1. Baseline test: Run the scanner on a year of historical data with default settings. Record signals and measure average outcome at 3, 10, and 30 bars after signal.
2. A/B test: Compare results when ADX filter is enabled versus disabled. Expect more false positives without ADX.
3. Volume gating: Require volume ratio >1.2 for validation and compare win rate and expectancy.
4. TF alignment: Accept signals only when higher timeframe (e.g., 4h) trend agrees — compare results.
5. Parameter sensitivity: Vary RSI threshold (70/30 vs 80/20), Bollinger stddev (2 vs 2.5), and ADX threshold (25 vs 30) and measure stability of results.
These exercises teach both statistical thinking and the specific failure modes of the mashup.
________________________________________
Limitations, failure modes and caveats (explicit & teachable)
• ADX and Bollinger measures lag during fast-moving news events — signals can be late or wrong during earnings, macro shocks, or illiquid sessions.
• Volume classification by open/close is a heuristic; it does not equal TAPEDATA, footprint or signed volume. Use it as supportive evidence, not definitive proof.
• RSI can remain overbought or oversold for extended stretches in persistent trends — relying solely on RSI extremes without ADX or BB context invites large drawdowns.
• Small-cap or low-liquidity instruments yield noisy band behavior and unreliable volume ratios.
Being explicit about these limitations is a strong point in a TradingView description — it demonstrates transparency and educational intent.
________________________________________
Originality & mashup justification (text you can paste)
This script intentionally combines classical momentum (RSI), volatility envelope (Bollinger Bands) and trend-strength (ADX) because each indicator answers a different and complementary question: RSI answers is price locally extreme?, Bollinger answers is price outside normal volatility?, and ADX answers is the market moving with conviction?. Volume participation then acts as a practical check for real market involvement. This combination is not a simple “indicator mashup”; it is a designed ensemble where each element reduces the others’ failure modes and together produce a teachable, testable signal framework. The script’s purpose is educational and analytical — to show traders how to interpret the interplay of momentum, volatility, and trend strength.
________________________________________
TradingView publication guidance & compliance checklist
To satisfy TradingView rules about mashups and descriptions, include the following items in your script description (without exposing source code):
1. Purpose statement: One or two lines describing the script’s objective (educational multi-indicator market overview and idea filter).
2. Component list: Name the major modules (RSI, Bollinger Bands, ADX, volume heuristic, SMA trend checks, signal tracking) and one-sentence reason for each.
3. How they interact: A succinct non-code explanation: “RSI finds momentum extremes; Bollinger confirms volatility expansion; ADX confirms trend strength; all three must align for a BUY/SELL.”
4. Inputs: List adjustable inputs (RSI length and thresholds, BB length & stddev, ADX threshold & smoothing, volume MA, table position/size).
5. Usage instructions: Short workflow (check TF alignment → confirm participation → define stop & R:R → backtest).
6. Limitations & assumptions: Explicitly state volume is approximated, ADX has lag, and avoid promising guaranteed profits.
7. Non-promotional language: No external contact info, ads, claims of exclusivity or guaranteed outcomes.
8. Trademark clause: If you used trademark symbols, remove or provide registration proof.
9. Risk disclaimer: Add the copy-ready disclaimer below.
This matches TradingView’s request for meaningful descriptions that explain originality and inter-component reasoning.
________________________________________
Copy-ready short publication description (paste into TradingView)
Advanced RSI-ADX-Bollinger Market Overview — educational multi-indicator dashboard. This script combines RSI (momentum extremes), Bollinger Bands (volatility envelope and band expansion), ADX (trend strength), simple SMA trend bias and a basic buy/sell volume heuristic to surface high-quality idea candidates. Signals require alignment of momentum, volatility expansion and rising ADX; volume participation is displayed to support signal confidence. Inputs are configurable (RSI length/levels, BB length/stddev, ADX length/threshold, volume MA, display options). This tool is intended for analysis and learning — not for automated execution. Users should back test and apply robust risk management. Limitations: volume classification here is a heuristic (close>open), ADX and BB measures lag in fast news events, and results vary by instrument liquidity.
________________________________________
Copy-ready risk & misuse disclaimer (paste into description or help file)
This script is provided for educational and analytical purposes only and does not constitute financial or investment advice. It does not guarantee profits. Indicators are heuristics and may give false or late signals; always back test and paper-trade before using real capital. The author is not responsible for trading losses resulting from the use or misuse of this indicator. Use proper position sizing and risk controls.
________________________________________

Risk Disclaimer: This tool is provided for education and analysis only. It is not financial advice and does not guarantee returns. Users assume all risk for trades made based on this script. Back test thoroughly and use proper risk management.

Wyłączenie odpowiedzialności

Informacje i publikacje przygotowane przez TradingView lub jego użytkowników, prezentowane na tej stronie, nie stanowią rekomendacji ani porad handlowych, inwestycyjnych i finansowych i nie powinny być w ten sposób traktowane ani wykorzystywane. Więcej informacji na ten temat znajdziesz w naszym Regulaminie.