RSI +WMA+ MA + Div SETUPRSI +WMA+ MA + Div SETUP
Индикатор объединяет анализ RSI, скользящих средних RSI (EMA/WMA), дивергенций, автоматические уровни поддержки/сопротивления на RSI, «лестницу цен» для целевых уровней RSI и фильтр тренда со старшего таймфрейма (HTF).
Точки входа формируются строго в месте пересечения RSI с заданным уровнем после выполнения выбранного сетапа. Поддержан режим «без повторов до смены направления».
Что показывает
Линии RSI, EMA(9) от RSI и WMA(45) от RSI.
Фон панели: бычий/медвежий/нейтральный режим импульса RSI (по соотношению EMA и WMA и наклону WMA).
Маркеры ▲/▼ — смена фазы импульса RSI (не торговые сигналы).
Дивергенции (регулярные): Bull/Bear с метками.
Auto SnR на RSI: динамические уровни поддержки/сопротивления по экстремумам RSI.
WMA SnR points: точки ретеста WMA на RSI.
Лестница цен: оценка цены, при которой RSI достигнет выбранных уровней.
HTF-линия: WMA(45) от RSI на старшем ТФ (по желанию).
Торговые сигналы (BUY/SELL)
Сигналы строятся в окне осциллятора RSI ровно в точке кросса:
BUY: (по выбранному сетапу) + пересечение RSI↑ заданного уровня (по умолчанию 40) + (опционально) выполнен HTF-фильтр.
SELL: (по выбранному сетапу) + пересечение RSI↓ заданного уровня (по умолчанию 60) + (опционально) выполнен HTF-фильтр.
Сетапы входа (переключатель)
Setup 1: Div + Cross — требуется подтверждённая дивергенция (Bull/Bear) и кросс RSI уровня в пределах заданного «окна» баров.
Setup 2: Cross only — только кросс RSI уровня, без требования дивергенции.
HTF-фильтр тренда
Расчёт WMA(45) от RSI на настраиваемом HTF (M, H1=60, H4=240, D и т. д.).
Разрешение Лонга, если HTF_WMA45 ≥ L-уровня (например, 50).
Разрешение Шорта, если HTF_WMA45 ≤ S-уровня.
Опция «Только после закрытия HTF-свечи» исключает перерисовку фильтра до закрытия старшего бара.
Основные настройки
RSI Length, Source.
EMA Length / WMA Length (для линий на RSI).
Визуальные уровни RSI (Up/Down) и подсветка фона.
Divergence: пороги показа (RSI ≤ X / ≥ Y), метки.
Price ladder: список целевых уровней RSI и «шаг» вывода цен.
Auto SnR: три окна lookback, цвета линий.
WMA SnR: чувствительность к ретестам WMA.
Entries: выбор сетапа, окно после дивергенции, уровни для Лонга/Шорта (по умолчанию 40/60), «ставить метку по фактическому RSI», без повторов.
HTF Filter: вкл/выкл, ТФ, уровни для Лонга/Шорта, «только по закрытию», показать HTF-линию.
Алерты
BUY: HTF ok + Setup OK + RSI cross up
SELL: HTF ok + Setup OK + RSI cross down
 Сообщения алертов — константные строки (совместимы с Pine).
Перерисовка
Локальные сигналы ставятся на закрытии бара кросса RSI — не перерисовываются.
Дивергенции используют pivot-логику (подтверждаются через lookback) — метка появляется после подтверждения.
HTF-фильтр без перерисовки при включённой опции «Только после закрытия HTF-свечи».
Пример использования
H1 фильтр ≥ 50, M5 Setup 1: дождитесь Bull-дивергенции на M5, затем кросса RSI↑40 в течение N баров — получите BUY.
Для входов без дивергенций выберите Setup 2.
English Description
RSI +WMA+ MA + Div SETUP
All-in-one RSI toolkit: native RSI, RSI-based EMA/WMA, divergence detection, automatic RSI Support/Resistance, price ladder (target prices for chosen RSI levels), and a configurable Higher-Timeframe (HTF) trend filter.
Entry markers are printed exactly at the RSI level cross once the selected setup conditions are met. Includes a No-Repeat option to avoid duplicate signals.
Visuals
RSI, EMA(9) of RSI, WMA(45) of RSI.
Background shading for bull/bear/neutral RSI impulse phases (EMA vs WMA and WMA slope).
▲/▼ phase-change markers (context only, not trade signals).
Regular Bull/Bear divergences with optional labels.
Auto RSI SnR lines from RSI extremes.
WMA SnR points (RSI retests of WMA).
Price ladder: estimated price to reach given RSI levels.
Optional HTF line: WMA(45) of RSI calculated on a higher timeframe.
Trade Signals (BUY/SELL)
Signals plot in the RSI pane at the cross point:
BUY: selected setup satisfied + RSI crosses up the chosen level (default 40) + optional HTF filter passes.
SELL: selected setup satisfied + RSI crosses down the chosen level (default 60) + optional HTF filter passes.
Entry Setups (selector)
Setup 1: Div + Cross — requires a confirmed Bull/Bear divergence and an RSI level cross within a user-defined bar window.
Setup 2: Cross only — RSI level cross only (no divergence required).
HTF Trend Filter
Computes WMA(45) of RSI on a configurable higher timeframe (e.g., 60=H1, 240=H4, D, etc.).
Long allowed if HTF_WMA45 ≥ Long threshold (e.g., 50).
Short allowed if HTF_WMA45 ≤ Short threshold.
“Close-only” option ensures the HTF filter updates only after the HTF bar closes (no repaint).
Key Inputs
RSI length/source; EMA/WMA lengths.
Visual RSI up/down levels & background shading.
Divergence thresholds (RSI ≤ / ≥), labels.
Price ladder: target RSI levels & label spacing.
Auto SnR: three lookback windows, colors.
WMA SnR: retest sensitivity.
Entries: setup selector, divergence window, Long/Short levels (40/60 by default), “mark at actual RSI value”, no-repeat.
HTF Filter: enable, timeframe, Long/Short thresholds, close-only, show HTF line.
Alerts
BUY: HTF ok + Setup OK + RSI cross up
SELL: HTF ok + Setup OK + RSI cross down
 Alert messages are constant strings (Pine-compatible).
Repaint Notes
LTF entry signals are placed at bar close when the cross occurs — no repaint.
Divergences rely on pivots; labels plot after confirmation.
HTF filter does not repaint when Close-only is enabled.
Example
H1 filter ≥ 50, M5 Setup 1: wait for a Bull divergence on M5 and an RSI cross up 40 within N bars — you’ll get a BUY.
Choose Setup 2 for cross-only entries.
Rsi_divergence
PDB - RSI Buy & Sell Zones + SMA (PrintDemBandz)PDB - RSI Buy & Sell Zones 
A clean, upgraded version of the RSI with  shaded momentum zones  to make entries and exits easier to spot. The background is divided into five color-coded zones so you instantly see when the market is shifting from bullish to bearish momentum.
 Shaded Zones Explained: 
 | Zone                        |         RSI Range |                   Zone Meaning       | 
| --------------------------- | --------- | ----------------------------------------------------- |
|  Strong Buy (Dark Green) | < 30   | Oversold extreme – high probability bounce zone       
|  Buy Zone (Light Green)  | 30–40  | Early accumulation & potential reversal area    
|  Neutral (Grey)          | 40–60  | No edge zone – stay patient and wait for direction    |
|  Sell Zone (Light Red)   | 60–70  | Market heating up – take profit or prepare to short   |
|  Strong Sell (Dark Red)  | > 70   | Overbought extreme – high probability correction zone |
A  dashed midline at 50  helps instantly gauge trend bias (above = bullish, below = bearish).
Use this RSI alone or combine with MACD or MA for stronger confirmations.
Search "PDB" in the indicators section for more free indicators.
RSI Divergence Strategy v6 What this does
Detects regular and hidden divergences between price and RSI using confirmed RSI pivots. Adds RSI@pivot entry gates, a normalized strength + volume filter, optional volume gate, delayed entries, and transparent risk management with rigid SL and activatable trailing. Visuals are throttled for clarity and include a gap-free horizontal RSI gradient.
How it works (simple)
🧮 RSI is calculated on your selected source/period.
📌 RSI pivots are confirmed with left/right lookbacks (lbL/lbR). A pivot becomes final only after lbR bars; before that, it can move (expected).
🔎 The latest confirmed pivot is compared against the previous confirmed pivot within your bar window:
• Regular Bullish = price lower low + RSI higher low
• Hidden Bullish = price higher low + RSI lower low
• Regular Bearish = price higher high + RSI lower high
• Hidden Bearish = price lower high + RSI higher high
💪 Each divergence gets a strength score that multiplies price % change, RSI change, and a volume ratio (Volume SMA / Baseline Volume SMA).
• Set Min divergence strength to filter tiny/noisy signals.
• Turn on the volume gate to require volume ratio ≥ your threshold (e.g., 1.0).
🎯 RSI@pivot gating:
• Longs only if RSI at the bullish pivot ≤ 30 (default).
• Shorts only if RSI at the bearish pivot ≥ 70 (default).
⏱ Entry timing:
• Immediate: on divergence confirm (delay = 0).
• Delayed: after N bars if RSI is still valid.
• RSI-only mode: ignore divergences; use RSI thresholds only.
🛡 Risk:
• Rigid SL is placed from average entry.
• Trailing activates only after unrealized gain ≥ threshold; it re-anchors on new highs (long) or new lows (short).
What’s NEW here (vs. the reference) — and why you may care
• Improved pivots + bar window → fewer early/misaligned signals; cleaner drawings.
• RSI@pivot gates → entries aligned with true oversold/overbought at the exact decision bar.
• Normalized strength + volume gate → ignore weak or low-volume divergences.
• Delayed entries → require the signal to persist N bars if you want more confirmation.
• Rigid SL + activatable trailing → trailing engages only after a cushion, so it’s less noisy.
• Clutter control + gradient → readable chart with a smooth RSI band look.
Suggested starting values (clear ranges)
• RSI@pivot thresholds: LONG ≤ 30 (oversold), SHORT ≥ 70 (overbought).
• Min divergence strength:
0.0 = off
3–6 = moderate filter
7–12 = strict filter for noisy LTFs
• Volume gate (ratio):
1.0 = at least baseline volume
1.2–1.5 = strong-volume only (fewer but cleaner signals)
• Pivot lookbacks:
lbL 1–2, lbR 3–4 (raise lbR to confirm later and reduce noise)
• Bar window (between pivots):
Min 5–10, Max 30–60 (increase Min if you see micro-pivots; increase Max for wider structures)
• Risk:
Rigid SL 2–5% on liquid majors; 5–10% on higher-volatility symbols
Trailing activation 1–3%, trailing 0.5–1.5% are common intraday starts
Plain-text examples
• BTCUSDT 1h → RSI 9, lbL 1, lbR 3, Min strength 5.0, Volume gate 1.0, SL 4.5%, Trail on 2.0%, Trail 1.0%.
• SPY 15m → RSI 8, lbL 1, lbR 3, Min strength 7.0, Volume gate 1.2, SL 3.0%, Trail on 1.5%, Trail 0.8%.
• EURUSD 4h → RSI 14, lbL 2, lbR 4, Min strength 4.0, Volume gate 1.0, SL 2.5%, Trail on 1.0%, Trail 0.5%.
Notes & limitations
• Pivot confirmation means the newest candidate pivot can move until lbR confirms it (expected).
• Results vary by timeframe/symbol/settings; always forward-test.
• Educational tool — no performance or profit claims.
Credits
• RSI by J. Welles Wilder Jr. (1978).
• Reference divergence script by eemani123: 
• This version by tagstrading 2025 adds: improved pivot engine, RSI@pivot gating, normalized strength + optional volume gate, delayed entries, rigid SL and activatable trailing, and a gap-free RSI gradient.
Divergences: Price × RSI × OBV The Triple Confirmation Divergence indicator is a sophisticated momentum and volume-based tool designed to identify high-probability trend exhaustion points and potential reversals. It moves beyond traditional single-indicator divergence analysis by synthesizing signals from three core pillars of technical analysis: Price Action, Momentum, and Volume Flow.
This indicator works better on the time frames: 1H, 4H, 1D, 1W and 1M.
RSI DD – RSI Divergence DetectorRSI DD – RSI Divergence Detector (closed-source): 
 What it does: 
Detects and plots regular and hidden RSI–price divergences using confirmed pivots on both series. Lines are drawn between the two most recent qualifying pivots; optional marks highlight OB/OS peaks at confirmation.
 Detection method: 
1.	Compute RSI on a user-selected source and length. Optional EMA/SMA smoothing controls lag.
2.	Build price and RSI pivot points with left/right lookbacks; a pivot confirms on the bar where right completes.
3.	Pair the latest two pivots of the same type within a user-defined bar-distance window:
•	Regular Bullish: price makes a lower low while RSI makes a higher low.
•	Hidden Bullish: price makes a higher low while RSI makes a lower low.
•	Regular Bearish: price makes a higher high while RSI makes a lower high.
•	Hidden Bearish: price makes a lower high while RSI makes a higher high.
4.	When a valid pair is found, draw a line on the RSI pane from the first RSI pivot to the second; color encodes divergence type.
5.	Optional ticks mark RSI extremes when the confirming pivot is beyond OB/OS thresholds.
 Inputs (key settings): 
•	RSI Period / Source: oscillator base.
•	Pivot Lookback Left/Right: structure sensitivity; larger = fewer but stronger pivots.
•	Min/Max Pairing Range: bars allowed between the two pivots; filters stale or too-tight pairs.
•	Plot Toggles: enable/disable each divergence class.
•	Signal Pair (visual): optional fast/slow MA pair and smoothing plotted as context; not used in detection.
•	Levels: OB/OS and midline for visual regime.
 Plots: 
•	RSI line.
•	Optional RSI signal line.
•	Midline (50), OB, OS levels.
•	Colored divergence lines on RSI:
o	Regular Bullish (aqua), Hidden Bullish (lime), Regular Bearish (yellow), Hidden Bearish (red).
•	Optional OB/OS ticks at confirming pivots.
 How to use: 
•	Works on any symbol and timeframe; higher timeframes reduce noise.
•	Treat divergences as context. Combine with structure, trend, volume, and risk rules.
•	Tighten stops or scale when divergence aligns with S/R and higher-TF bias.
•	Increase right lookback and raise Min Range to reduce whipsaws; lower them to catch earlier turns.
 Practical guidance: 
•	Swing trading: RSI 14, left=3/right=5, min=8/max=80, OB/OS 70/30.
•	Intraday: RSI 14, left=2/right=3, min=4/max=40; consider slightly higher smoothing.
•	If you see too many short lines, raise Min Range or increase right.
•	If valid turns are missed, lower right or Min Range.
 Limitations: 
•	Divergences can persist in strong trends.
•	Pivot detection waits for confirmation, so signals are not predictive on the unconfirmed bar.
•	OB/OS thresholds are conventional and not optimized to any asset.
Alerts (if you add alertcondition)
•	Regular/Hidden Bullish/ Bearish detected on confirmation bar.
•	Optional alert when RSI crosses back through midline after a divergence.
 Version notes: 
 v2: pivot-pair range filter, optional OB/OS peak markers, object count management to prevent clutter, cosmetic controls, and visual signal pair. 
 Copyright © 2025 imaclone (Zen Silva). All rights reserved.
License: Private. No copying, sharing, or derivative works. Use limited to this TradingView script. Contact owner for access.
Diwali Lights Pro — 7-Diyas Signal Matrix [KedArc Quant]🎯 Overview
“Diwali Lights Pro — 7-Diyas Signal Matrix” is a precision-built trend-sentiment indicator that blends the glow of seven technical “diyas” — each representing a different momentum or strength dimension — into one intuitive signal matrix. It was designed to celebrate light, discipline, and clarity in trading — helping traders filter noise, identify strong trend shifts, and take trades with conviction. Each diya is powered by a proven indicator component: RSI, Stochastic, EMA trend strength, and momentum slopes.Together, they light up your chart with buy/sell signals only when technical confluence aligns — like the diyas of Diwali shining in harmony.
💡 Core Concept
The indicator computes a composite score (–9 to +9) by evaluating seven key parameters:
| # | Diya           | Logic                 | Interpretation                 |
| 1 | RSI            | Overbought / Oversold | Short-term momentum exhaustion |
| 2 | Stochastic     | Direction & zones     | Confirmation of RSI            |
| 3 | Price vs EMA20 | Position of price     | Near-term trend bias           |
| 4 | EMA20 Slope    | Short-term momentum   | Strength confirmation          |
| 5 | EMA50 Slope    | Mid-term trend        | Trend stability                |
| 6 | EMA100 Slope   | Medium-term sentiment | Institutional bias             |
| 7 | EMA200 Slope   | Long-term sentiment   | Market direction baseline      |
The total of these 7 diyas creates a signal matrix that dynamically adapts to trend conditions.
⚙️ Inputs & Configuration
| RSI Length                  | 14               | Standard RSI window                  |
| Stochastic Length           | 14               | Measures momentum oscillation        |
| EMA Periods                 | 20, 50, 100, 200 | Multi-layer trend structure          |
| Overbought / Oversold Zones | 70 / 30          | Configurable thresholds              |
| Show Buy/Sell Labels        | ✅                | Toggle signal markers                |
| Show Banner                 | ✅                | Festive Diwali header with fireworks |
| Twinkle Interval            | 10 bars          | Animation timing                     |
| Fireworks Count             | 18               | Visual celebration intensity         |
| Background Opacity          | 100%             | Style preference                     |
🧭 Entry & Exit Logic
# ✅ Buy Signal (🪔)
A Buy triggers when:
* The total diya score crosses above zero,
* And at least four of seven components turn bullish.
This indicates that short-term oscillators, price action, and moving averages are all turning in unison — a strong entry zone after a pullback.
# 🔥 Sell Signal (🔥)
A Sell triggers when:
* The total diya score crosses below zero,
* And multiple slopes or price conditions flip bearish.
This flags weakening momentum and possible trend exhaustion.
# 💬 Suggested Usage
* Works beautifully on 5-min to 1-hour charts.
* Best when used with trend confirmation tools (volume, price structure).
* Avoid entering trades when signals flip rapidly within narrow ranges (sideways zones).
🧪 Mathematical Formulae
1. RSI Bucket (p₁):
p₁ = 
  2  if RSI < Very Oversold  
  1  if RSI < Oversold  
  0  if neutral  
 -1  if RSI > Overbought  
 -2  if RSI > Very Overbought
2. Stochastic Bucket (p₂): Similar to RSI bucketing.
3. Price vs EMA20 (p₃):
p₃ = sign(close - EMA20)
4–7. Slope Sign (EMA20, 50, 100, 200):
p₄₋₇ = sign(EMA  - EMA )
Total Score = Σ(p₁…p₇)
→ Crossover(total_score, 0) → Buy Signal
→ Crossunder(total_score, 0) → Sell Signal
📊 Why It’s Not Just a Mash-Up
Diwali Lights Pro uses:
* A unified scoring engine with weighted logic rather than conflicting triggers.
* Each component (diya) contributes equally, creating a normalized sentiment index.
* Smart signal filtering prevents repetitive false flips by enforcing trend alignment across multiple time frames.
* A dynamic, responsive structure optimized for clarity and minimal repainting.
 🎆 Unique Add-Ons
* Top-Right Diwali Banner: Festive “Happy Diwali” with animated fireworks 🎇 and diyas 🪔.
* Signal Filtering: Reduces noise in volatile ranges.
* EMA Cloud Context: Visual clarity of multi-layer trend zones.
* Optional Light Mode: Change fireworks opacity for a subtle or bright effect.
 📘 FAQ
Q1: Does this repaint?
No — it uses confirmed values (RSI, Stochastic, EMA slopes). Signals appear only after the bar closes.
Q2: Which timeframes work best?
Between 5m and 1h, depending on your strategy.
Use higher EMAs for swing setups.
Q3: Can I use it with alerts?
Yes, both Buy and Sell triggers come with built-in `alertcondition()` for instant notifications.
Q4: Can it be combined with other indicators?
Absolutely — it pairs well with volume profiles, volatility bands, or order-flow systems.
 🪔 Glossary
| Diya          | Candle or light — here, each diya = one technical indicator         |
| EMA           | Exponential Moving Average — measures smoothed trend bias           |
| RSI           | Relative Strength Index — momentum overbought/oversold oscillator   |
| Stochastic    | Momentum oscillator measuring closing levels relative to highs/lows |
| Slope Sign    | Direction of EMA movement — rising or falling                       |
| Signal Matrix | The combined system of all seven diyas generating a unified score   |
🧭 Final Note
> *Diwali Lights Pro* is not just a trading tool — it’s a visual celebration of confluence and discipline.
> When the diyas align, trends shine. Use it to trade in harmony with light, not against it. 🌟
⚠️ Disclaimer 
This script is provided for educational purposes only.
Past performance does not guarantee future results.
Trading involves risk, and users should exercise caution and use proper risk management when applying this strategy.
Relative Strength Index Remastered [CHE]Relative Strength Index Remastered   — Enhanced RSI with robust divergence detection using price-based pivots and line-of-sight validation to reduce false signals compared to the standard RSI indicator.
  Summary 
RSI Remastered builds on the classic Relative Strength Index by adding a more reliable divergence detection system that relies on price pivots rather than RSI pivots alone, incorporating a line-of-sight check to ensure the RSI path between points remains clear. This approach filters out many false divergences that occur in the original RSI indicator due to its volatile pivot detection on the RSI line itself. Users benefit from clearer reversal and continuation signals, especially in noisy markets, with optional hidden divergence support for trend confirmation. The core RSI calculation and smoothing options remain familiar, but the divergence logic provides materially fewer alerts while maintaining sensitivity.
  Motivation: Why this design? 
The standard RSI indicator often generates misleading divergence signals because it detects pivots directly on the RSI values, which can fluctuate erratically in volatile conditions, leading to frequent false positives that confuse traders during ranging or choppy price action. RSI Remastered addresses this by shifting pivot detection to the underlying price highs and lows, which are more stable, and adding a validation step that confirms the RSI line does not cross the direct path between pivot points. This design targets the real problem of over-signaling in the original, promoting more actionable insights without altering the RSI's core momentum measurement.
  What’s different vs. standard approaches? 
- Reference baseline: The classical TradingView RSI indicator, which uses simple RSI-based pivot detection for divergences.
- Architecture differences:
  - Pivot identification on price extremes (highs and lows) instead of RSI values, extracting RSI levels at those points for comparison.
  - Addition of a line-of-sight validation that checks the RSI path bar by bar between pivots to prevent signals where the line is interrupted.
  - Inclusion of hidden divergence types alongside regular ones, using the same robust framework.
  - Configurable drawing of connecting lines between validated pivot RSI points for visual clarity.
- Practical effect: Charts show fewer but higher-quality divergence markers and lines, reducing clutter from the original's frequent RSI pivot triggers; this matters for avoiding whipsaws in intraday trading, where the standard version might flag dozens of invalid setups per session.
  Key Comparison Aspects 
 Aspect:  Title/Shorttitle  
Original RSI: "Relative Strength Index" / "RSI"  
Robust Variant: "Relative Strength Index Remastered  " / "RSI RM"
 Aspect:  Max. Lines/Labels  
Original RSI: No specification (Standard: 50/50)  
Robust Variant: max_lines_count=200, max_labels_count=200 (for more lines/markers in divergences)
 Aspect:  RSI Calculation & Plots  
Original RSI: Identical: RSI with RMA, Plots (line, bands, gradient fills)  
Robust Variant: Identical: RSI with RMA, Plots (line, bands, gradient fills)
 Aspect:  Smoothing (MA)  
Original RSI: Identical: Inputs for MA types (SMA, EMA etc.), Bollinger Bands optional  
Robust Variant: Identical: Inputs for MA types (SMA, EMA etc.), Bollinger Bands optional
 Aspect:  Divergence Activation  
Original RSI: input.bool(false, "Calculate Divergence") (disabled by default)  
Robust Variant: input.bool(true, "Calculate Divergence") (enabled by default, with tooltip)
 Aspect:  Pivot Calculation  
Original RSI: Pivots on RSI (ta.pivotlow/high on RSI values)  
Robust Variant: Pivots on price (ta.pivotlow/high on low/high), RSI values then extracted
 Aspect:  Lookback Values  
Original RSI: Fixed: lookbackLeft=5, lookbackRight=5  
Robust Variant: Input: L=5 (Pivot Left), R=5 (Pivot Right), adjustable (min=1, max=50)
 Aspect:  Range Between Pivots  
Original RSI: Fixed: rangeUpper=60, rangeLower=5 (via _inRange function)  
Robust Variant: Input: rangeUpper=60 (Max Bars), rangeLower=5 (Min Bars), adjustable (min=1–6, max=100–300)
 Aspect:  Divergence Types  
Original RSI: Only Regular Bullish/Bearish: - Bull: Price LL + RSI HL - Bear: Price HH + RSI LH  
Robust Variant: Regular + Hidden (optional via showHidden=true): - Regular Bull: Price LL + RSI HL - Regular Bear: Price HH + RSI LH - Hidden Bull: Price HL + RSI LL - Hidden Bear: Price LH + RSI HH
 Aspect:  Validation  
Original RSI: No additional check (only pivot + range check)  
Robust Variant: Line-of-Sight Check: RSI line must not cross the connecting line between pivots (line_clear function with slope calculation and loop for each bar in between)
 Aspect:  Signals (Plots/Shapes)  
Original RSI: - Plot of pivot points (if divergence) - Shapes: "Bull"/"Bear" at RSI value, offset=-5  
Robust Variant: - No pivot plots, instead shapes at RSI , offset=-R (adjustable) - Shapes: "Bull"/"Bear" (Regular), "HBull"/"HBear" (Hidden) - Colors: Lime/Red (Regular), Teal/Orange (Hidden)
 Aspect:  Line Drawing  
Original RSI: No lines  
Robust Variant: Optional (showLines=true): Lines between RSI pivots (thick for regular, dashed/thin for hidden), extend=none
 Aspect:  Alerts  
Original RSI: Only Regular Bullish/Bearish (with pivot lookback reference)  
Robust Variant: Regular Bullish/Bearish + Hidden Bullish/Bearish (specific "at latest pivot low/high")
 Aspect:  Robustness  
Original RSI: Simple, prone to false signals (RSI pivots can be volatile)  
Robust Variant: Higher: Price pivots are more stable, line-of-sight filters "broken" divergences, hidden support for trend continuations
 Aspect:  Code Length/Structure  
Original RSI: ~100 lines, simple if-blocks for bull/bear  
Robust Variant: ~150 lines, extended helper functions (e.g., inRange, line_clear), var group for inputs
  How it works (technical) 
The indicator first computes the core RSI value based on recent price changes, separating upward and downward movements over the specified length and smoothing them to derive a momentum reading scaled between zero and one hundred. This value is then plotted in a separate pane with fixed upper and lower reference lines at seventy and thirty, along with optional gradient fills to highlight overbought and oversold zones.
For smoothing, a moving average type is applied to the RSI if enabled, with an option to add bands around it based on the variability of recent RSI values scaled by a multiplier. Divergence detection activates on confirmed price pivots: lows for bullish checks and highs for bearish. At each new pivot, the system retrieves the bar index and values (price and RSI) for the current and prior pivot, ensuring they fall within a configurable bar range to avoid unrelated points.
Comparisons then assess whether the price has made a lower low (or higher high) while the RSI at those points moves in the opposite direction—higher for bullish regular, lower for bearish regular. For hidden types, the directions reverse to capture trend strength. The line-of-sight check calculates the straight path between the two RSI points and verifies that the actual RSI values in between stay entirely above (for bullish) or below (for bearish) that path, breaking the signal if any bar violates it. Valid signals trigger shapes at the RSI level of the new pivot and optional lines connecting the points. Initialization uses built-in functions to track prior occurrences, with states persisting across bars for accurate historical comparisons. No higher timeframe data is used, so confirmation occurs after the right pivot bars close, minimizing live-bar repaints.
  Parameter Guide 
Length — Controls the period for measuring price momentum changes — Default: 14 — Trade-offs/Tips: Shorter values increase responsiveness but add noise and more false signals; longer smooths trends but delays entries in fast markets.  
Source — Selects the price input for RSI calculation — Default: Close — Trade-offs/Tips: Use high or low for volatility focus, but close works best for most assets; mismatches can skew overbought/oversold reads.  
Calculate Divergence — Enables the enhanced divergence logic — Default: True — Trade-offs/Tips: Disable for pure RSI view to save computation; essential for signal reliability over the standard method.  
Type (Smoothing) — Chooses the moving average applied to RSI — Default: SMA — Trade-offs/Tips: None for raw RSI; EMA for quicker adaptation, but SMA reduces whipsaws; Bollinger Bands option adds volatility context at cost of added lines.  
Length (Smoothing) — Period for the smoothing average — Default: 14 — Trade-offs/Tips: Match RSI length for consistency; shorter boosts signal speed but amplifies noise in the smoothed line.  
BB StdDev — Multiplier for band width around smoothed RSI — Default: 2.0 — Trade-offs/Tips: Lower narrows bands for tighter signals, risking more touches; higher widens for fewer but stronger breakouts.  
Pivot Left — Bars to the left for confirming price pivots — Default: 5 — Trade-offs/Tips: Increase for stricter pivots in noisy data, reducing signals; too high delays confirmation excessively.  
Pivot Right — Bars to the right for confirming price pivots — Default: 5 — Trade-offs/Tips: Balances with left for symmetry; longer right ensures maturity but shifts signals backward.  
Max Bars Between Pivots — Upper limit on distance for valid pivot pairs — Default: 60 — Trade-offs/Tips: Tighten for short-term trades to focus recent action; widen for swing setups but risks unrelated comparisons.  
Min Bars Between Pivots — Lower limit to avoid clustered pivots — Default: 5 — Trade-offs/Tips: Raise to filter micro-moves; too low invites overlapping signals like the original RSI.  
Detect Hidden — Includes trend-continuation hidden types — Default: True — Trade-offs/Tips: Enable for full trend analysis; disable simplifies to reversals only, akin to basic RSI.  
Draw Lines — Shows connecting lines between valid pivots — Default: True — Trade-offs/Tips: Turn off for cleaner charts; helps visually confirm line-of-sight in backtests.
  Reading & Interpretation 
The main RSI line oscillates between zero and one hundred, crossing above fifty suggesting building momentum and below indicating weakness; touches near seventy or thirty flag potential extremes. The optional smoothed line and bands provide a filtered view—price above the upper band on the RSI pane hints at overextension. Divergence shapes appear as upward labels for bullish (lime for regular, teal for hidden) and downward for bearish (red regular, orange hidden) at the pivot's RSI level, signaling a mismatch only after validation. Connecting lines, if drawn, slope between points without RSI interference, their color matching the shape type; a dashed style denotes hidden. Fewer shapes overall compared to the standard RSI mean higher conviction, but always confirm with price structure.
  Practical Workflows & Combinations 
- Trend following: Enter longs on regular bullish shapes near support with higher highs in price; filter hidden bullish for pullback buys in uptrends, pairing with a rising smoothed RSI above fifty.
- Exits/Stops: Use bearish regular as reversal warnings to tighten stops; hidden bearish in downtrends confirms continuation—exit if lines show RSI crossing the path.
- Multi-asset/Multi-TF: Defaults suit forex and stocks on one-hour charts; for crypto volatility, widen pivot ranges to ten; scale min/max bars proportionally on daily for swings, avoiding the original's intraday spam.
  Behavior, Constraints & Performance 
Signals confirm only after the right pivot bars close, so live bars may show tentative pivots that vanish on close, unlike the standard RSI's immediate RSI-pivot triggers—plan for this delay in automation. No higher timeframe calls, so no security-related repaints. Resources include up to two hundred lines and labels for dense charts, with a loop in validation scanning up to three hundred bars between pivots, which is efficient but could slow on very long histories. Known limits: Slight lag at pivot confirmation in trending markets; volatile RSI might rarely miss fine path violations; not ideal for gap-heavy assets where pivots skip.
  Sensible Defaults & Quick Tuning 
Start with defaults for balanced momentum and divergence on most timeframes. For too many signals (like the original), raise pivot left/right to eight and min bars to ten to filter noise. If sluggish in trends, shorten RSI length to nine and enable EMA smoothing for faster adaptation. In high-volatility assets, widen max bars to one hundred but disable hidden to focus essentials. For clean reversal hunts, set smoothing to none and lines on.
  What this indicator is—and isn’t 
RSI Remastered serves as a refined momentum and divergence visualization tool, enhancing the standard RSI for better signal quality in technical analysis setups. It is not a standalone trading system, nor does it predict price moves—pair it with volume, structure breaks, and risk rules for decisions. Use alongside position sizing and broader context, not in isolation.
  Disclaimer 
The content provided, including all code and materials, is strictly for educational and informational purposes only. It is not intended as, and should not be interpreted as, financial advice, a recommendation to buy or sell any financial instrument, or an offer of any financial product or service. All strategies, tools, and examples discussed are provided for illustrative purposes to demonstrate coding techniques and the functionality of Pine Script within a trading context.
Any results from strategies or tools provided are hypothetical, and past performance is not indicative of future results. Trading and investing involve high risk, including the potential loss of principal, and may not be suitable for all individuals. Before making any trading decisions, please consult with a qualified financial professional to understand the risks involved.
By using this script, you acknowledge and agree that any trading decisions are made solely at your discretion and risk.
Do not use this indicator on Heikin-Ashi, Renko, Kagi, Point-and-Figure, or Range charts, as these chart types can produce unrealistic results for signal markers and alerts.
 Best regards and happy trading
Chervolino
BLACK MAGIC RSIWhat Is the RSI?
The Relative Strength Index (RSI) is a momentum indicator used in technical analysis to measure the speed and strength of recent price movements. It was developed by J. Welles Wilder Jr. and is one of the most popular tools for identifying whether an asset is overbought or oversold.
🔹 How It Works
The RSI moves on a scale from 0 to 100 and compares the size of recent gains to recent losses.
When the RSI value is high, it means prices have risen quickly.
When the RSI value is low, it means prices have fallen sharply.
Eyas's EyeTry it and see!!
# 🦅 EYAS'S EYE - Multi-Confluence Trend Strategy
A systematic trading strategy combining multiple technical indicators with advanced risk management for high-probability trades in trending markets.
## 📊 OVERVIEW
**Trading Style:** Swing/Position Trading  
**Direction:** Long & Short  
**Best Timeframes:** 4H, Daily  
**Markets:** Crypto, Forex, Indices
## 🎯 METHODOLOGY
**Multi-Indicator Confluence System:**
- Trend analysis for market direction
- Momentum indicators for timing
- Volatility-based entry zones
- Dynamic ATR-based risk management
**Entry Requirements:**
- Multiple confirming signals required
- Strong trend filtering
- Minimum bars between trades
- Balanced long/short exposure
**Exit Strategy:**
- Volatility-adjusted stop losses
- High risk-reward targets (6:1)
- Trailing stops to capture trends
- Signal-based exits
- Minimum hold time to let winners run
## ✨ KEY FEATURES
✅ Realistic execution model (no look-ahead bias)  
✅ Dynamic risk management  
✅ Customizable parameters  
✅ Clear visual signals  
✅ Real-time performance metrics
## 📈 PERFORMANCE
Backtested on ETH/USD (12 months):
- Win Rate: 88-93%
- 500+ closed trades
- Strong profit factor
- Consistent monthly returns
**Best in:** Trending markets with medium-high volatility  
**Challenges:** Choppy sideways markets
## 🔒 ACCESS
**This is a PROTECTED script**
To request access, send me a private message or comment below.
## ⚠️ DISCLAIMER
Trading involves substantial risk. Past performance does not guarantee future results. This is not financial advice. Always test with paper trading first and never risk more than you can afford to lose.
---
**Strategy Philosophy:** Quality over quantity. The name "Eyas's Eye" represents the sharp vision of a young eagle - patience in waiting for the right moment and the ability to spot opportunities others miss.
🦅 **Trade with vision. Trade with Eyas's Eye.**
FirstStrike Long 200 - Daily Trend Rider [KedArc Quant]Strategy Description
FirstStrike Long 200 is a disciplined, long-only momentum strategy designed for daily "strike-first" entries in trending markets. It scans for RSI momentum above a customizable trigger (default 50), confirmed by EMA trend filters, and limits you to *exactly one trade per day* to avoid overtrading. It uses ATR for dynamic risk management (1.5x stop, 2:1 RR target) and optional trailing stops to ride winners. Backtested with realistic commissions and sizing, it prioritizes low drawdowns (<1% max in tests) over aggressive gains—ideal for swing traders seeking quality setups in bull runs.
Why It's Different from Other Strategies
Unlike generic RSI crossover bots or EMA ribbon mashups that spam signals and bleed in chop, FirstStrike enforces a "one-and-done" daily gate, blending precision momentum (RSI modes with grace/sustain) with robust filters (volume, sessions, rearm dips). 
How It Helps Traders
- Reduces Emotional Trading: One entry/day forces discipline—miss a setup? Wait for tomorrow. Perfect for busy pros avoiding screen fatigue.
- Adapts to Regimes: Switch modes for trends ("Cross+Grace") vs. ranges ("Any bar")—boosts win rates 5-10% in backtests on high-beta names like .
- Risk-First Design: ATR scales stops to vol  capping DD at 0.2% while targeting 2R winners. Trailing option locks +3-5% runs without early exits.
- Quick Insights: Labels/alerts flag entries with RSI values; bgcolor highlights signals for visual scanning. Helps spot "first-strike" edges in uptrends, filtering ~60% noise.
Why This Is Not a Mashup
This isn't a Frankenstein of off-the-shelf indicators—while it uses standard RSI/EMA/ATR (core Pine primitives), the innovation lies in:
- Custom Trigger Engine: Switchable modes (e.g., "Cross+Grace+Sustain" requires post-cross hold) prevent perpetual signals, unlike basic `ta.crossover()`.
- Daily Rearm Gate: Resets eligibility only after a dip (if enabled), tying momentum to mean-reversion—original logic not found in common scripts.
- Per-Day Isolation: `var` vars + `ta.change(time("D"))` ensure zero pyramiding/overlaps, beyond simple session filters.
All formulae are derived in-house for "first-strike" (early RSI pops in trends), not copied from public repos.
Input Configurations
Let's break down every input in the FirstStrike Long 200 strategy. These settings let you tweak the strategy like a dashboard—start with defaults for quick testing, 
then adjust based on your asset  or timeframe (5m for intraday).  They're grouped logically to keep things organized, and most have tooltips in the script for quick reminders.
RSI / Trigger Group: The Heart of Momentum Detection
This is where the magic starts—the strategy hunts for "upward energy" using RSI (Relative Strength Index), a tool that measures if a stock is overbought (too hot) or oversold (too cold) on a 0-100 scale. 
- RSI Length: How many bars (candles) back to calculate RSI. Default is 14, like a 14-day window for daily charts. Shorter (e.g., 9) makes it snappier for fast markets; longer (21) smooths out noise but misses quick turns.
- Trigger Level (RSI >= this): The key RSI value where the strategy says, "Go time!" Default 50 means enter when RSI crosses or holds above the neutral midline. Why is this trigger required? It acts as your "green light" filter—without it, you'd enter on every tiny price wiggle, leading to endless losers. RSI above this shows building buyer power, avoiding weak or sideways moves. It's essential for quality over quantity, especially in one-trade-per-day setups.
- Trigger Mode: Picks how strict the RSI signal must be. Options: "Cross only" (exact RSI crossover above trigger—super precise, fewer trades); "Cross+Grace" (crossover or within a grace window after—gives a second chance); "Cross+Grace+Sustain" (crossover/grace plus RSI holding steady for bars—best for steady climbs); "Any bar >= trigger" (looser, any bar above—more opportunities but riskier in chop). Start with "Any bar" for trends, switch to "Cross only" for caution.
- Grace Window (bars after cross): If mode allows, how many bars post-RSI-cross you can still enter if RSI dips but recovers. Default 30 (about 2.5 hours on 5m). Zero means no wiggle room—pure precision.
- Sustain Bars (RSI >= trigger): In sustain mode, how many straight bars RSI must stay above trigger. Default 3 ensures it's not a fluke spike.
- Require RSI Dip Below Rearm Before Any Entry?: A yes/no toggle. If on, the strategy "rearms" only after RSI dips below a low level (like a breather), preventing back-to-back signals in overextended rallies.
- Rearm Level (if requireDip=true): The dip threshold for rearming. Default 45—RSI must go below this to reset eligibility. Lower (30) for deeper pullbacks in volatile stocks.
For the trigger level itself, presets matter a lot—default 50 is neutral and versatile for broad trends. Bump to 55-60 for "strong momentum only" (fewer but higher-win trades, great in bull runs like tech surges); drop to 40-45 for "early bird" catches in recoveries (more signals but watch for fakes in ranges). The optimize hint (40-60) lets you test these in TradingView to match your risk—higher presets cut noise by 20-30% in backtests.
 Trend / Filters Group: Keeping You on the Right Side of the Market
These EMAs (Exponential Moving Averages) act like guardrails, ensuring you only long in uptrends.
- EMA (Fast) Confirmation: Short-term EMA for price action. Default 20 periods—price must be above this for "recent strength." Shorter (10) reacts faster to intraday pops.
- EMA (Trend Filter): Long-term EMA for big-picture trend. Default 200 (classic "above the 200-day" rule)—price above it confirms bull market. Minimum 50 to avoid over-smoothing.
 Optional Hour Window Group: Timing Your Strikes
Avoid bad hours like lunch lulls or after-hours tricks.
- Restrict by Session?: Yes/no for using exact market hours. Default off.
- Session (e.g., 0930-1600 for NYSE): Time string like "0930-1600" for open to close. Auto-skips pre/post-market noise.
- Restrict by Hour Range?: Fallback yes/no for simple hours. Default off.
- Start Hour / End Hour: Clock times (0-23). Defaults 9-15 ET—focus on peak volume.
 Volume Filter Group: No Volume, No Party
Confirms conviction—big moves need big participation.
- Require Volume > SMA?: Yes/no toggle. Default off—only fires on above-average volume.
- Volume SMA Length: Periods for the average. Default 20—compares current bar to recent norm.
 Risk / Exits Group: Protecting and Profiting Smartly
Dynamic stops based on volatility (ATR = Average True Range) keep things realistic.
- ATR Length: Bars for ATR calc. Default 14—measures recent "wiggle room" in price.
- ATR Stop Multiplier: How far below entry for stop-loss. Default 1.5x ATR—gives breathing space without huge risk
- Take-Profit R Multiple: Reward target as multiple of risk. Default 2.0 (2:1 ratio)—aims for twice your stop distance.
- Use Trailing Stop?: Yes/no for profit-locking trail. Default off—activates after entry.
- Trailing ATR Multiplier: Trail distance. Default 2.0x ATR—looser than initial stop to let winners run.
These inputs make the strategy plug-and-play: Defaults work out-of-box for trending stocks, but tweak RSI trigger/modes first for your style. 
Always backtest changes—small shifts can flip a 40% win rate to 50%+!
Outputs (Visuals & Alerts):
- Plots: Blue EMA200 (trend line), Orange EMA20 (price filter), Green dashed entry price.
- Labels: Green "LONG" arrow with RSI value on entries.
- Background: Light green highlight on signal bars.
- Alerts: "FirstStrike Long Entry" fires on conditions (integrates with TradingView notifications).
 Entry-Exit Logic
Entry (Long Only, One Per Day):
1. Daily Reset: New day clears trade gate and (if required) rearm status.
2. Filters Pass: Time/session OK + Close > EMA200 (trend) + Close > EMA20 (price) + Volume > SMA (if enabled) + Rearmed (dip below rearm if toggled).
3. Trigger Fires: RSI >= trigger via selected mode (e.g., crossover + grace window).
4. Execute: Enter long at close; set daily flag to block repeats.
Exit:
- Stop-Loss: Entry - (ATR * 1.5) – dynamic, vol-scaled.
- Take-Profit: Entry + (Risk * 2.0) – fixed RR.
- Trailing (Optional): Activates post-entry; trails at Close - (ATR * 2.0), updating on each bar for trend extension.
No shorts or hedging—pure long bias.
 Formulae Used
- RSI: `ta.rsi(close, rsiLen)` – Standard 14-period momentum oscillator (0-100).
- EMAs: `ta.ema(close, len)` – Exponential moving averages for trend/price filters.
- ATR: `ta.atr(atrLen)` – True range average for stop sizing: Stop = Entry - (ATR * mult).
- Volume SMA: `ta.sma(volume, volLen)` – Simple average for relative strength filter.
- Grace Window: `bar_index - lastCrossBarIndex <= graceBars` – Counts bars since RSI crossover.
- Sustain: `ta.barssince(rsi < trigger) >= sustainBars` – Consecutive bars above threshold.
- Session Check: `time(timeframe.period, sessionStr) != 0` – TradingView's built-in session validator.
- Risk Distance: `riskPS = entry - stop; TP = entry + (riskPS * RR)` – Asymmetric reward calc.
 FAQ
Q: Why only one trade/day?  
A: Prevents revenge trading in volatile sessions . Backtests show it cuts losers by 20-30% vs. multi-entry bots.
Q: Does it work on all assets/timeframes?  
A: Best for trending stocks/indices  on 5m-1H. Test on crypto/forex with wider ATR mult (2.0+).
Q: How to optimize?  
A: Use TradingView's optimizer on RSI trigger (40-60) and EMA fast (10-30). Aim for PF >1.0 over 1Y data.
Q: Alerts don't fire—why?  
A: Ensure `alertcondition` is enabled in script settings. Test with "Any alert() function calls only."
Q: Trailing stop too loose?  
A: Tune `trailMult` to 1.5 for tighter; it activates alongside fixed TP/SL for hybrid protection.
 Glossary
- Grace Window: Post-RSI-cross period (bars) where entry still allowed if RSI holds trigger.
- Rearm Dip: Optional pullback below a low RSI level (e.g., 45) to "reset" eligibility after signals.
- Profit Factor (PF): Gross profit / gross loss—>1.0 means winners outweigh losers.
- R Multiple: Risk units (e.g., 2R = 2x stop distance as target).
- Sustain Bars: Consecutive bars RSI stays >= trigger for mode confirmation.
 Recommendations
- Backtest First: Run on your symbols (/) over 6-12M; tweak RSI to 55 for +5% win rate.
- Live Use: Start paper trading with `useSession=true` and `useVol=true` to filter noise.
- Pairs Well With: Higher TF (daily) for bias; add ADX (>25) filter for strong trends (code snippet in prior chats).
- Risk Note: 10% sizing suits $100k+ accounts; scale down for smaller. Not financial advice—past performance ≠ future.
- Publish Tip: Add tags like "momentum," "RSI," "long-only" on TradingView for visibility.
Strategy Properties & Backtesting Setup
FirstStrike Long 200 is configured with conservative, realistic backtesting parameters to ensure reliable performance simulations. These settings prioritize capital preservation and transparency, making it suitable for both novice and experienced traders testing on stocks.
 Initial Capital      
	$100,000       Standard starting equity for portfolio-level testing; scales well for retail accounts. Adjust lower (e.g., $10k) for smaller simulations. 
 Base Currency         
	Default (USD)  Aligns with most US equities (e.g., NASDAQ symbols); auto-converts for other assets. 
 Order Size            
	1 (Quantity)   Fixed share contracts for simplicity—e.g., buys 1 share per trade. For % of equity, switch to "Percent of Equity" in strategy code. 
 Pyramiding            
	0 Orders       No additional entries on open positions; enforces strict one-trade-per-day discipline to avoid overexposure. 
 Commission            
	0.1%           Realistic broker fee (e.g., Interactive Brokers tier); factors in round-trip costs without over-penalizing winners. 
 Verify Price for Limit Orders  
	0 Ticks  No slippage delay on TPs—assumes ideal fills for historical accuracy. 
 Slippage              
	0 Ticks        Zero assumed slippage for clean backtests; real-world trading may add 1-2 ticks on volatile opens. 
These defaults yield low drawdowns (<0.3% max in tests) while capturing trend edges. For live trading, enable slippage (1-3 ticks) to mimic execution gaps. Always forward-test before deploying!
⚠️ Disclaimer 
This script is provided for educational purposes only.
Past performance does not guarantee future results.
Trading involves risk, and users should exercise caution and use proper risk management when applying this strategy.
RSI-like VWAP — DivergencesThis script introduces a unique RSI-style oscillator built from VWAP (Volume-Weighted Average Price) instead of price alone, offering a more volume-aware perspective of market momentum.
🔹 Key Features:
 
 Computes an RSI-like indicator using either a per-bar VWAP proxy (HLC3/OHLC4) or true intrabar VWAP (via lower timeframe aggregation).
 
 Customizable overbought, oversold, midline, and deadband levels for better signal filtering.
 
 Divergence detection (regular + hidden) between price and the VWAP-RSI oscillator, with clear lines and labels in the indicator pane.
 
 Auto-scaled pivot sensitivity across different chart timeframes to maintain consistency.
 
 Built-in alert conditions for bullish/bearish divergences, making it watchlist-friendly.
 
 
🔹 Use Cases:
This tool helps traders spot momentum shifts and early reversal signals by blending the logic of RSI with the weighting power of VWAP. It’s especially useful for detecting divergences where price action may be misleading without volume context.
Universal Breakout Strategy [KedArc Quant]Description:
A flexible breakout framework where you can test different logics (Prev Day, Bollinger, Volume, ATR, EMA Trend, RSI Confirm, Candle Confirm, Time Filter) under one system.
Choose your breakout mode, and the strategy will handle entries, exits, and optional risk management (ATR stops, take-profits, daily loss guard, cooldowns). 
An on-chart info table shows live mode values (like Prev High/Low, Bollinger levels, RSI, etc.) plus P&L stats for quick analysis.
Use it to compare which breakout style works best on your instrument and timeframe, whether intraday, swing, or positional trading
 🔑 Why it’s useful
* Flexibility: Switch between breakout strategies without loading different indicators.
* Clarity: On-chart info table displays current mode, relevant indicator levels, and live strategy P&L stats.
* Testing efficiency: Quickly A/B test different breakout styles under the same backtest environment.
* Transparency: Every trade is rule-based and displayed with entry/exit markers.
 🚀 How it helps traders
* Lets you experiment with breakout strategies quickly without loading multiple scripts.
* Helps identify which breakout method fits your instrument & timeframe.
* Gives clear on-chart visual + statistical feedback for confident decision-making.
 ⚙️ Input Configuration
* Breakout Mode → choose which strategy to test:
  * *Prev Day* → breakouts of yesterday’s High/Low.
  * *Bollinger* → Upper/Lower BB pierce.
  * *Volume* → Breakout confirmed with volume above average.
  * *ATR Stop* → Wide range breakout using ATR filter.
  * *Time Filter* → Breakouts inside defined session hours.
  * *EMA Trend* → Breakouts only in EMA fast > slow alignment.
  * *RSI Confirm* → Breakouts with RSI confirmation (e.g. >55 for longs).
  * *Candle Confirm* → Breakouts validated by bullish/bearish candle.
* Lookback / ATR / Bollinger inputs → adjust sensitivity.
* Intrabar mode → option to evaluate breakouts using bar highs/lows instead of closes.
* Table options → show/hide info table, show/hide P&L stats, choose corner placement.
 📈 Entry & Exit Logic
* Entry → occurs when breakout condition of chosen mode is met.
* Exit → default exits via opposite signals or optional stop/target if enabled.
* Session filter → optional auto-flat at session end.
* P&L management → optional daily loss guard, cooldown between trades, and ATR-based stop/take profit.
 ❓ FAQ — Choosing the best setup
Q: Which strategy should I use for which chart?
* *Prev Day Breakouts*: Best on indices, FX, and liquid futures with strong daily levels.
* *Bollinger*: Works well in range-bound environments, or crypto pairs with volatility compression.
* *Volume*: Good on equities where breakout strength is tied to volume spikes.
* *ATR Stop*: Suits volatile instruments (commodities, crypto).
* *EMA Trend*: Useful in trending markets (stocks, indices).
* *RSI Confirm*: Adds momentum filter, better for swing trades.
* *Candle Confirm*: Ideal for scalpers needing visual confirmation.
* *Time Filter*: For intraday traders who want signals only in high-liquidity sessions.
Q: What timeframe should I use?
* Intraday traders → 5m to 15m (Time Filter, Candle Confirm).
* Swing traders → 1H to 4H (EMA Trend, RSI Confirm, ATR Stop).
* Position traders → Daily (Prev Day, Bollinger).
* Breakout
	A trade entry condition triggered when price crosses above a resistance level (for longs) or below a support level (for shorts).
* Prev Day High/Low
	Formula:
	Prev High = High of (Day )
	Prev Low = Low of (Day )
* Bollinger Bands
	Formula:
	Basis = SMA(Close, Length)
	Upper Band = Basis + (Multiplier × StdDev(Close, Length))
	Lower Band = Basis – (Multiplier × StdDev(Close, Length))
* Volume Confirmation
	A breakout is only valid if:
	Volume > SMA(Volume, Length)
* ATR (Average True Range)
	Measures volatility.
	
	Formula:
	ATR = SMA(True Range, Length)
	where True Range = max(High–Low, |High–Close |, |Low–Close |)
* EMA (Exponential Moving Average)
	Weighted moving average giving more weight to recent prices.
	Formula:
	EMA = (Price × α) + (EMA  × (1–α))
	with α = 2 / (Length + 1)
* RSI (Relative Strength Index)
	
	Momentum oscillator scaled 0–100.
	
	Formula:
	RSI = 100 – (100 / (1 + RS))
	where RS = Avg(Gain, Length) ÷ Avg(Loss, Length)
* Candle Confirmation
	
	Bullish candle: Close > Open AND Close > Close 
	Bearish candle: Close < Open AND Close < Close 
	Win Rate (%)
	Formula:
	Win Rate = (Winning Trades ÷ Total Trades) × 100
* Average Trade P&L
	Formula:
	Avg Trade = Net Profit ÷ Total Trades
📊 Performance Notes
	The Universal Breakout Strategy is designed as a framework rather than a single-asset optimized system. Results will vary depending on the chart, timeframe, and asset chosen.
	On the current defaults (15-minute, INR-denominated example), the backtest produced 132 trades over the selected period. This provides a statistically sufficient sample size.
	Win rate (~35%) is relatively low, but this is balanced by a positive reward-to-risk ratio (~1.8). In practice, a lower win rate with larger wins versus smaller losses is sustainable.
	The average P&L per trade is close to breakeven under default settings. This is expected, as the strategy is not tuned for a single symbol but offered as a universal breakout framework.
	Commissions (0.1%) and slippage (1 tick) are included in the simulation, ensuring realistic conditions.
	Risk management is conservative, with order sizing set at 1 unit per trade. This avoids over-leveraging and keeps exposure well under the 5-10% equity risk guideline.
👉 Traders are encouraged to:
	Experiment with inputs such as ATR period, breakout length, or Bollinger parameters.
	Test across different timeframes and instruments (equities, futures, forex, crypto) to find optimal setups.
	Combine with filters (trend direction, volatility regimes, or volume conditions) for further refinement.
⚠️ Disclaimer This script is provided for educational purposes only.
Past performance does not guarantee future results.
Trading involves risk, and users should exercise caution and use proper risk management when applying this strategy.
Tomazz.nq – RSI Dynamic DisplayThis script displays the  RSI value  directly on your  chart  for  quick and efficient market monitoring. 
 Fully customizable settings : RSI length, overbought/oversold levels, and colors.
 Clear color logic : red when RSI is above the overbought threshold, red when below the oversold threshold, green otherwise.
Compact display in the  top-right corner  keeps your chart clean and focused.
➡️ Perfect for intraday and swing traders who want an at-a-glance RSI reading without opening a separate indicator window.
icreature RSI Divergence + OB/OSThis script simply showing all divergences and fill in colours when ob or os . Enjoy!
icreature RSI Divergence Indicator with Customizable OB/OS Spotsicreature RSI Divergence Indicator with Customizable OB/OS Spots
MAxRSI Signals [KedArc Quant]Description:
MAxRSI Indicator Marks LONG/SHORT signals from a Moving Average crossover and (optionally) confirms them with RSI. Includes repaint-safe confirmation, optional higher-timeframe (HTF) smoothing, bar coloring, and alert conditions.
Why combine MA + RSI
* The MA crossover is the primary trend signal (fast trend vs slow trend).
* RSI is a gate, not a second, separate signal. A crossover only becomes a trade signal if momentum agrees (e.g., RSI ≥ level for LONG, ≤ level for SHORT). This reduces weak crosses in ranging markets.
* The parts are integrated in one rule: *Crossover AND RSI condition (if enabled)* → plot signal/alert. No duplicated outputs or unrelated indicators.
How it works (logic)
* MA types: SMA / EMA / WMA / HMA (HMA is built via WMA of `len/2` and `len`, then WMA with `sqrt(len)`).
* Signals:
* LONG when *Fast MA crosses above Slow MA* and (if enabled) *RSI ≥ Long Min*.
* SHORT when *Fast MA crosses below Slow MA* and (if enabled) *RSI ≤ Short Max*.
* Repaint-safe (optional): confirms crosses on closed bars to avoid intrabar repaint.
* HTF (optional): computes MA/RSI on a higher timeframe to smooth noise on lower charts.
* Alerts: crossover alerts + state-flip (bull↔bear) alerts.
How to use (step-by-step)
1. Add to chart. Set MA Type, Fast and Slow (keep Fast < Slow).
2. Turn Use RSI Filter ON for confirmation (default: RSI 14 with 50/50 levels).
3. (Optional) Turn Repaint-Safe ON for close-confirmed signals.
4. (Optional) Turn HTF ON (e.g., 60 = 1h) for smoother signals on low TFs.
5. Enable alerts: pick “MAxRSI Long/Short” or “Bullish/Bearish State”.
Timeframe guidance
* Intraday (1–15m): EMA 9–20 fast vs EMA 50 slow, RSI filter at 50/50.
* Swing (1h–D): EMA 20 fast vs EMA 200 slow, RSI 50/50 (55/45 for stricter).
What makes it original
* Repaint-safe cross confirmation (previous-bar check) for reliable signals/alerts.
* HTF gating (doesn’t compute both branches) for speed and clarity.
* Warning-free MA helper (precomputes SMA/EMA/WMA/HMA each bar), HMA built from built-ins only.
* State-flip alerts and optional RSI overlay on price pane.
Built-ins used
`ta.sma`, `ta.ema`, `ta.wma`, (HMA built from these), `ta.rsi`, `ta.crossover`, `ta.crossunder`, `request.security`, `plot`, `plotshape`, `barcolor`, `alertcondition`, `input.*`, `math.*`.
Note: Indicator only (no orders). Test settings per symbol. Not financial advice.
⚠️ Disclaimer
This script is provided for educational purposes only.
Past performance does not guarantee future results.
Trading involves risk, and users should exercise caution and use proper risk management when applying this strategy.
ZenAlgo - MarsThis indicator is a momentum-based oscillator built around a modified RSI calculation and subsequent smoothing with moving averages. It introduces a layered structure where divergences, signal crossovers, histogram dynamics, and multi-timeframe tables all combine into a comprehensive framework. The purpose is not to forecast markets with certainty but to provide structured context on momentum shifts, divergences, and trend bias.
 Core Calculation 
 
  The base source is the closing price.
  From it, relative upward and downward movements are measured over a chosen lookback length (by preset or manual input).
  These values are normalized into an oscillator bounded between 0–100, equivalent to a traditional RSI structure.
  This oscillator is smoothed by a moving average (SMA by default), producing the main line (MA).
  A secondary smoothing (EMA by default) of the MA produces a signal line, against which crossovers are monitored.
 
 Why this structure: 
RSI captures momentum imbalance between gains and losses. Smoothing removes noise and makes divergences more stable to identify. Adding a signal line allows crossover events to highlight relative strengthening or weakening momentum phases.
 Zones and Visual Guides 
 
  Static horizontal levels are placed at 70 (upper bound), 50 (mid-line), and 30 (lower bound).
  The region between 30–70 is softly filled to emphasize the neutral zone.
  Color changes on the MA line occur depending on whether it is above or below the signal line.
 
 Why these levels: 
Values above 70 or below 30 are commonly interpreted as overextended regions. A central 50 line separates positive from negative bias. These anchors allow consistent interpretation of oscillator movements.
 Crossover Events 
 
  Alerts and conditions are defined for when the MA crosses above or below the signal line.
  These are not entry signals by themselves but indicate shifts in relative momentum strength.
 
 Divergence Detection 
  Divergences are calculated on the smoothed MA rather than raw RSI.
Four conditions are tracked:
 
  Regular bullish (price makes a lower low while MA makes a higher low).
  Hidden bullish (price higher low with MA lower low).
  Regular bearish (price higher high with MA lower high).
  Hidden bearish (price lower high with MA higher high).
 
Each detected divergence is marked with shapes and labeled "R" (regular) or "H" (hidden).
 Why divergences are used: 
They highlight when oscillator momentum disagrees with price structure. Regular divergences often suggest exhaustion, while hidden divergences may appear during continuation phases.
 RSI & MA Multi-Timeframe Table 
 
  A table can be displayed showing RSI and MA values across multiple timeframes (1m, 5m, 15m, 1h, 4h, 1D).
  For each, the relationship (Rising, Falling, Neutral) is determined by comparing RSI and MA.
  Colors are adjusted depending on value ranges (extreme low, oversold, overbought, etc.).
 
 Added value: 
Instead of analyzing divergences or crossovers only on one chart, the table provides a compact overview of aligned or conflicting conditions across timeframes.
 Strong and Warning Indications 
 
  "Strong" mark (Diamond) appear when the MA is firmly biased above or below 50 and hidden divergence supports the trend.
  "Warning" mark (Triangle) appear when bias is strong but a regular divergence forms in the opposite direction.
  Shapes mark these conditions, and alerts are available.
 
 Why this distinction: 
Hidden divergences often accompany continuation phases, while regular divergences may challenge the prevailing bias. Marking them separately allows the user to distinguish between potential trend reinforcement versus warning conditions.
 Signal Table 
A separate table summarizes:
 
  Overall trend bias (Bull, Full Bull, Bear, Full Bear, Flat).
  Time spent in each key zone.
  Current MA trend (Rising, Falling, Flat).
  Visual icons and color codes provide quick interpretation.
 
 Time in Zones 
The indicator measures how many bars (converted into minutes) the MA has spent:
 
  above 70
  above 50
  below 50
  below 30
  These values appear in the signal table.
 
 Why this matters: 
Extended time in an extreme zone can show persistent momentum. Quick reversals versus sustained positioning give different context for bias strength.
 MA vs Signal Histogram 
 
  A histogram plots the difference between MA and signal line, shifted around the 50 level.
  Rising differences are shown with brighter coloring, falling differences with faded tones.
  This emphasizes whether momentum is accelerating or decelerating.
 
 Daily VWAP Integration 
 
  When the MA crosses the 50 level, additional conditions check whether the histogram is aligned and whether price is above or below the daily VWAP.
  Only when both momentum bias and VWAP alignment agree are triangle markers shown.
 
 Why VWAP is included: 
VWAP serves as an intraday mean reference. Requiring alignment between oscillator momentum and price position relative to VWAP reduces random crossover noise.
 Added Value Over Free Indicators 
 
  Divergences are calculated on smoothed momentum rather than raw RSI, reducing false positives.
  Integration of multi-timeframe tables avoids the need to manually switch charts.
  Bias measurement in terms of time spent in zones adds a temporal dimension often missing in basic oscillators.
  Combining histogram dynamics with VWAP filtering provides context not present in typical RSI or MA overlays.
 
 Limitations and Disclaimers 
 
  Divergences are not predictive on their own; price may continue without respecting them.
  Extreme readings (e.g., above 70) can remain extended for long periods, especially in strong trends.
  Multi-timeframe aggregation may introduce repainting effects when lower timeframes update faster than higher ones.
  Signals must be interpreted in broader market context; the indicator does not provide trade entries or exits by itself.
 
 How to Interpret Values 
 
   Above 70:  momentum is strongly stretched upward.
   Below 30:  momentum is strongly stretched downward.
   Crossing 50:  often marks a structural change in directional bias.
   MA rising vs. falling:  tracks whether momentum pressure is increasing or decreasing.
   Divergence labels:  "R" = potential reversal, "H" = potential continuation.
   Tables:  confirm whether bias is consistent across multiple timeframes.
 
 Best Use 
 
  Observe divergences in conjunction with bias tables to understand whether short-term moves align with higher-timeframe conditions.
  Treat "Strong" and "Warning" markers as contextual alerts, not direct signals.
  Use the histogram and VWAP alignment to filter out weaker crossovers.
  Combine with price action and risk management rather than using in isolation.
 
RSI DivergenceThe code originally belongs to Matthew J. Slabosz, the founder of Zen Trading (The Art of Trading). ✍️📈
👉 My contribution and improvement was adding a divergence line directly on the RSI chart.
Why? Because most people can’t confirm correctness just by reading the code. 🧑💻❌
They need to see it with their own eyes 👀✔️ — this prevents misinterpretation and makes divergences crystal clear.
✨ By adding these visual confirmations, the efficiency and usability of the code has been significantly enhanced. 🚀📊
𝑨𝒔𝒕𝒂𝒓 - TyrAstar – Tyr is a dynamic RSI system with adaptive EMA and divergence detection.
@v1.0
 
 Dynamic RSI period adjusts to volatility & market activity
 Adaptive EMA smooths RSI with variable length
 Optional Gaussian Kernel smoothing for noise reduction
 Highlights bullish & bearish divergences automatically
 Clean visualization with color coding and fills
 Works in real time with no repainting
NPM Rsi DivergenceNPM RSI Divergence Indicator
The NPM RSI Divergence Indicator is a closed-source tool designed to help traders identify potential reversals and high-probability trade setups using divergence between price action and the Relative Strength Index (RSI). It highlights areas where momentum is weakening or strengthening, giving traders early signals of potential trend changes.
What it does
Detects divergences between RSI and price movement, indicating potential trend reversals or continuation.
Shows the strength or reliability of each divergence signal to help traders gauge probability.
Plots visual markers directly on the chart for easier recognition of potential setups.
Helps traders spot early exhaustion points in trends before price reverses or continues strongly.
How it works (concept-level)
Compares price highs/lows with RSI highs/lows to detect hidden or regular divergences.
Applies adaptive filtering to reduce false signals in choppy or low-volatility markets.
Aggregates divergence signals into clear visual markers and strength indicators.
Incorporates momentum context to highlight divergences that are more likely to produce actionable moves.
How to use it
1. Apply the indicator to your chosen symbol and timeframe.
2. Observe divergence markers and their strength indicators on the chart.
3. Confirm potential trade opportunities by considering trend direction and market context.
4. Use divergence signals to assist with trade entry, exit, or risk management decisions.
Alerts
Optionally set alerts when divergence signals appear or when the strength indicator exceeds a user-defined threshold.
Notes
Suitable for multiple markets, including forex, indices, crypto, and equities.
Can be used on intraday or swing trading timeframes depending on your trading strategy.
⚠️ Disclaimer: This script is for educational purposes only and is not financial advice. Trading involves risk, and you can lose money. Always test strategies on a demo account and practice proper risk management.
T-Virus Sentiment [hapharmonic]🧬  T-Virus Sentiment: Visualize the Market's DNA 
 Remember the iconic T-Virus vial from the first Resident Evil? That powerful, swirling helix of potential has always fascinated me. It sparked an idea: what if we could visualize the market's underlying health in a similar way? What if we could capture the "genetic code" of market sentiment and contain it within a dynamic, 3D indicator? This project is the result of that idea, brought to life with Pine Script. 
The indicator's main goal is to measure the strength and direction of market sentiment by analyzing the "genetic code" of price action through a variety of trusted indicators. The result is displayed as a liquid level within a DNA helix, a bubble density representing buying pressure, and a T-Virus mascot that reflects the overall mood.
🧐  Core Concept: How It Works 
The primary output of the indicator is the "Active %" gauge you see on the right side of the vial. This percentage represents the overall sentiment score, calculated as an average from 7 different technical analysis tools. Each tool is analyzed on every bar and assigned a score from 1 (strong bearish pressure) to 5 (strong bullish potential).
  
In this indicator, we re-imagine market dynamics through the lens of a viral outbreak. A strong  bear market  is like a  virus  taking hold, pulling all technical signals down into a state of weakness. Conversely, a powerful  bull market  is like an  antiviral serum ; positive signals rise and spread toward the top of the vial, indicating that the system is being injected with strength.
This is not just another line on a chart. It's a comprehensive sentiment dashboard designed to give an immediate, at-a-glance understanding of the confluence between 7 classic technical indicators. The incredible 3D model of the vial itself was inspired by a design concept found  here .
⚛️  The 4 Core Elements of T-Virus Sentiment 
These four elements work in harmony to give a complete, multi-faceted picture of market sentiment. Each component tells a different part of the story.
  
 
   The Virus Mascot:  An instant emotional cue. This character provides the quickest possible read on the overall market mood, combining sentiment with volume pressure.
   The Antiviral Serum Level:  The main quantitative output. This is the liquid level in the DNA helix and the percentage gauge on the right, representing the average sentiment score from all 7 indicators.
   Buy Pressure & Bubble Density:  This visualizes volume flow. The density of bubbles represents the intensity of accumulation (buying) versus distribution (selling). It's the "power" behind the move.
   The Signal Distribution:  This shows the confluence (or dispersion) of sentiment. Are all signals bullish and clustered at the top, or are they scattered, indicating a conflicted market? The position of the indicator labels is crucial, as each is assigned to one of five distinct zones:
     
       Base Bottom:  The market is at its weakest. Signals here suggest strong bearish control and distribution.
       Lower Zone:  The market is still bearish, but signals may be showing early signs of accumulation or bottoming.
       Neutral Core (Center):  A state of balance or sideways consolidation. The market is waiting for a new direction.
       Upper Zone:  Bullish momentum is becoming clear. Signals are strengthening and showing bullish control.
       Top Cap:  The market is "heating up" with strong bullish sentiment, potentially nearing overbought conditions.
     
 
🐂🐻  The Virus Mascot: The At-a-Glance Indicator 
This character acts as a shortcut to confirm market health. It combines the sentiment score with volume, preventing false confidence in a low-volume rally.
  
Its state is determined by a dual-check: the overall "Antiviral Serum Level" and the "Buy Pressure" must  both  be above 50%.
 
   Green & Smiling:  The 'all clear' signal. This means that not only is the overall technical sentiment bullish, but it's also being supported by real buying pressure. This is a sign of a healthy bull market.
   Red & Angry:  A warning sign. This appears if either the sentiment is weak,  or  a bullish sentiment is not being confirmed by buying volume. The latter could indicate a potential "bull trap" or an exhaustive move.
 
 This mascot can be disabled from the settings page under "Virus Mascot Styling" if a cleaner look is preferred. 
🫧  Bubble Density: Gauging Buy vs. Sell Pressure 
The bubbles visualize the battle between buyers and sellers. There are two modes to control how this is calculated:
 Mode 1: Visible Range (The 'Big Picture' View) 
  
This default mode is best for getting a broad, contextual understanding of the current session. It dynamically analyzes the volume of  every single candlestick currently visible on the screen  to calculate the buy/sell pressure ratio. It answers the question: "Over the entire period I'm looking at, who is in control?" As you zoom in or out, the calculation adapts.
 Mode 2: Custom Lookback (The 'Precision' View) 
  
This mode is for traders who need to analyze short-term pressure. You can define a fixed number of recent bars to analyze, which is perfect for scalping or understanding the volume dynamics leading into a key level. It answers the question: "What is happening  right now ?" In the example above, a lookback of 2 focuses only on the most recent action, clearly showing intense, immediate selling pressure (few bubbles) and a corresponding drop in the sentiment score to 29%.
ℹ️  Interactive Tooltips: Dive Deeper 
We believe in transparency, not 'black box' indicators. This feature transforms the indicator from a visual aid into an active learning tool.
  
Simply hover the mouse over any indicator label (like EMA, OBV, etc.) to get a detailed tooltip. It will explain the specific data points and thresholds that signal met to be placed in its current zone. This helps build trust in the signals and allows users to fine-tune the indicator settings to better match their own trading style.
🎯  The Scoring Logic Breakdown 
The "Antiviral Serum Level" gauge is the average score from 7 technical analysis tools. Each is graded on a 5-point scale (1=Strong Bearish to 5=Strong Bullish). Here’s a detailed, transparent look at how each "gene" is evaluated:
 
   Relative Strength Index (RSI) 
Measures momentum and overbought/oversold conditions.
 
   Group 1 (Strong Bearish):  RSI > 80 (Extreme Overbought)
   Group 2 (Bearish):  70 < RSI ≤ 80 (Overbought)
   Group 3 (Neutral):  30 ≤ RSI ≤ 70
   Group 4 (Bullish):  20 ≤ RSI < 30 (Oversold)
   Group 5 (Strong Bullish):  RSI < 20 (Extreme Oversold)
 
   Exponential Moving Averages (EMA) 
Evaluates the trend's strength and structure based on the alignment of multiple EMAs (9, 21, 50, 100, 200, 250).
 
   Group 1 (Strong Bearish):  A perfect bearish sequence (9 < 21 < 50 < ...)
   Group 2 (Bearish Transition):  Early signs of a potential reversal (e.g., 9 > 21 but still below 50)
   Group 3 (Neutral / Mixed):  MAs are intertwined or showing a partial bullish sequence.
   Group 4 (Bullish):  A strong bullish sequence is forming (e.g., 9 > 21 > 50 > 100)
   Group 5 (Strong Bullish):  A perfect bullish sequence (9 > 21 > 50 > 100 > 200 > 250)
 
   Moving Average Convergence Divergence (MACD) 
Analyzes the relationship between two moving averages to gauge momentum.
 
   Group 1 (Strong Bearish):  MACD & Histogram are negative and momentum is falling.
   Group 2 (Weakening Bearish):  MACD is negative but the histogram is rising or positive.
   Group 3 (Neutral / Crossover):  A crossover event is occurring near the zero line.
   Group 4 (Bullish):  MACD & Histogram are positive.
   Group 5 (Strong Bullish):  MACD & Histogram are positive, rising strongly, and accelerating.
 
   Average Directional Index (ADX) 
Measures trend strength, not direction. The score is based on both ADX value and the dominance of DI+ vs DI-.
 
   Group 1 (Bearish / No Trend):  ADX < 20 and DI- is dominant.
   Group 2 (Developing Bearish Trend):  20 ≤ ADX < 25 and DI- is dominant.
   Group 3 (Neutral / Indecision):  Trend is weak or DI+ and DI- are nearly equal.
   Group 4 (Developing Bullish Trend):  25 ≤ ADX ≤ 40 and DI+ is dominant.
   Group 5 (Strong Bullish Trend):  ADX > 40 and DI+ is dominant.
 
   Ichimoku Cloud (IKH) 
A comprehensive indicator that defines support/resistance, momentum, and trend direction.
 
   Group 1 (Strong Bearish):  Price is below the Kumo, Tenkan < Kijun, and Chikou is below price.
   Group 2 (Bearish):  Price is inside or below the Kumo, with mixed secondary signals.
   Group 3 (Neutral / Ranging):  Price is inside the Kumo, often with a Tenkan/Kijun cross.
   Group 4 (Bullish):  Price is above the Kumo with strong primary signals.
   Group 5 (Strong Bullish):  All signals are aligned bullishly: price above Kumo, bullish Tenkan/Kijun cross, bullish future Kumo, and Chikou above price.
 
   Bollinger Bands (BB) 
Measures volatility and relative price levels.
 
   Group 1 (Strong Bearish):  Price is below the lower band.
   Group 2 (Bearish Territory):  Price is between the lower band and the basis line.
   Group 3 (Neutral):  Price is hovering around the basis line.
   Group 4 (Bullish Territory):  Price is between the basis line and the upper band.
   Group 5 (Strong Bullish):  Price is above the upper band.
 
   On-Balance Volume (OBV) 
Uses volume flow to predict price changes. The score is based on OBV's trend and its position relative to its moving average.
 
   Group 1 (Strong Bearish):  OBV is below its MA and falling.
   Group 2 (Weakening Bearish):  OBV is below its MA but showing signs of rising.
   Group 3 (Neutral):  OBV is very close to its MA.
   Group 4 (Bullish):  OBV is above its MA and rising.
   Group 5 (Strong Bullish):  OBV is above its MA, rising strongly, and showing signs of a volume spike.
 
 
🧭  How to Use the T-Virus Sentiment Indicator 
 IMPORTANT: This indicator is a  sentiment dashboard , not a direct buy/sell signal generator. Its strength lies in showing confluence and providing a quick, holistic view of the market's technical health. 
 
   Confirmation Tool:  Use the "Active %" gauge to confirm a trade setup from your primary strategy. For example, if you see a bullish chart pattern, a high and rising sentiment score can add confidence to your trade.
   Momentum & Trend Gauge:  A consistently high score (e.g., > 75%) suggests strong, established bullish momentum. A consistently low score (< 25%) suggests strong bearish control. A score hovering around 50% often indicates a ranging or indecisive market.
   Divergence & Warning System:  Pay attention to divergences. If the price is making new highs but the sentiment score is failing to follow or is actively decreasing, it could be an early warning sign that the underlying momentum is weakening.
 
⚙️  Settings & Customization 
The indicator is highly customizable to fit any trading style.
 
   Position & Anchor:  Control where the vial appears on the chart.
   Styling (Vial, Helix, etc.):  Nearly every visual element can be color-customized.
   Signals:  This is where the real power is. All underlying indicator parameters (RSI length, MACD settings, etc.) can be fine-tuned to match a personal strategy. The text labels can also be disabled if the chart feels cluttered.
 
Enjoy visualizing the market's DNA with the  T-Virus Sentiment  indicator
RSI Divergence detector by Jaehee📌 RSI DIVERGENCE DETECTOR — Instant Detection of Regular & Hidden Divergences with Color-Coded Labels
🔍 WHAT IT IS
• Detects regular and hidden divergences between price and RSI instantly, without the delay common in other divergence indicators
• Displays divergences directly on the chart with color-coded labels and connecting lines for instant visual recognition
• Uses different label colors for each divergence type so traders can identify setups at a glance
⚙️ HOW IT WORKS
• RSI Calculation — RSI is computed from a chosen price source with adjustable length
• Immediate Pivot Detection — Identifies pivots just one bar after formation for minimal delay
• RSI Delta Filter — Requires a minimum RSI difference to reduce noise and false signals
• Divergence Logic
Regular Bullish: Price lower low • RSI higher low
Regular Bearish: Price higher high • RSI lower high
Hidden Bullish: Price higher low • RSI lower low
Hidden Bearish: Price lower high • RSI higher high
• Visual Output — Connects pivot points with lines and adds labels above/below bars in colors you set
💡 WHY THIS COMBINATION
• Instant feedback — Acts faster than typical divergence tools that wait for multiple bar confirmations
• All-in-one detection — Regular and hidden divergences in the same tool
• Visual clarity — Distinct label colors make type recognition immediate
• Customizable — Adjust RSI length, pivot sensitivity, color scheme, and filtering to your style
🆚 HOW IT DIFFERS FROM COMMON DIVERGENCE INDICATORS
• Displays divergence the moment a pivot forms
• Detects both regular and hidden divergences in real time
• Applies RSI difference filtering for better quality
• Offers full color customization for each divergence type
📖 HOW TO READ IT (CONTEXT, NOT SIGNALS)
• Regular Bullish ↑ — Possible upward reversal or trend continuation after pullback
• Regular Bearish ↓ — Possible downward reversal or continuation after rally
• Hidden Bullish ↑ — Often a trend continuation signal in uptrends
• Hidden Bearish ↓ — Often a trend continuation signal in downtrends
• Always confirm with trend, momentum, or volume tools before trading
🛠 INPUTS
• RSI source and length
• Pivot lookback bars (left/right)
• Minimum RSI difference
• Custom colors for each divergence type
🎨 DESIGN NOTES
• Overlay on price chart for context
• Lines connect relevant pivots for clarity
• Labels placed near pivot highs/lows for easy spotting
• Customizable colors for personal visual preferences
⚠️ LIMITATIONS AND GOOD PRACTICE
• Divergence is not a guaranteed reversal signal
• Strong trends may override divergence setups
• False signals can occur in low volume or choppy markets
• Best used with a complete trading system and risk management
📂 DEFAULTS AND SCOPE
• Works on all OHLCV instruments and timeframes
• No repainting after pivot confirmation
💬 AUTHOR’S NOTE FOR REVIEW
This script is not a repackaging of existing tools. It integrates immediate divergence detection, hidden divergence analysis, and visual type separation into a single, customizable package. All features interact to deliver faster, clearer market context without generating trade signals or making performance claims.
Advanced RSI Divergence & Signal TrackerThis indicator offers a unique edge over traditional RSI divergence tools by supporting both  Live  and  Confirmed  modes of divergence detection.
 Key Features: 
 
 Two Detection Modes 
    -  Live Mode:  Detects divergences as price moves. Ideal for faster signal generation when early entries matter. Only the most recent signal may repaint to stay aligned with live market data.
    -  Confirmed Mode:  Waits for full pivot confirmation before signaling. This results in more stable, but delayed, signals — great for traders who prefer validation over speed.
 Multiple Divergence Types   
Supports detection and visualization for the following:
        - Bullish Divergence  
        - Hidden Bullish Divergence  
        - Bullish Convergence  
        - Bearish Divergence  
        - Hidden Bearish Divergence  
        - Bearish Convergence  
Each signal is marked directly on the RSI chart with labeled lines for clarity.
 RSI Signal Tracker Panel   
A built-in, optional status table displays:
    - Current signal type  
    - RSI value at the signal  
    - Price at the signal  
    - Age of the signal (in bars)  
    - Previous signal (if enabled)  
Fully customizable in the settings — show only what you want to see.
 Alerts Included   
Alerts are available for all divergence and convergence signal types.
 
This indicator is designed for traders who want flexibility — whether you need early signals or prefer confirmed ones. Perfect for both reversal and trend-following strategies, with complete control over what is shown on your chart.






















