Indicator

Sector Rotation Map [ITA]See where institutional money is flowing across all 11 S&P sectors at a glance.
This indicator ranks every sector ETF (XLK, XLF, XLE, XLV, XLY, XLP, XLI, XLB, XLU, XLRE, XLC) by Relative Strength vs SPY and its momentum, then classifies each into one of four rotation states:
- Leading (strong + rising)
- Weakening (strong but fading)
- Lagging (weak + falling)
- Improving (weak but recovering)
Instead of flipping through 11 charts every morning, you get the full market rotation picture in one clean table.
Features:
- All 11 S&P sectors ranked automatically
- Relative Strength + Momentum, normalized around 100
- Four-state rotation classification, color-coded
- Configurable benchmark, lookbacks, table position and size
- Toggle any sector on/off
Feedback and suggestions welcome. Indicator

Stocks vs Sector Leaderboard**Stocks vs Sector Leaderboard** compares the performance of up to 10 selected stocks against a sector index or other benchmark.
The indicator is designed to quickly show which stocks are **outperforming or underperforming their sector** over a configurable lookback period.
The default configuration compares a selection of ASX Energy stocks against the **S&P/ASX 200 Energy Index (XEJ)**, but both the stocks and benchmark are fully configurable.
**How it works**
For each selected stock, the indicator:
* Calculates performance over the selected number of bars.
* Calculates the benchmark's performance over the same period.
* Calculates relative performance as **Stock Performance − Sector Performance**.
* Estimates market capitalization using the latest available shares outstanding and current share price.
* Ranks the selected stocks by estimated market capitalization.
* Displays the results in a configurable leaderboard directly on the chart.
A positive **vs Sector** value means the stock has outperformed the benchmark over the selected period. A negative value means it has underperformed.
The lookback uses the **current chart timeframe**. For example, a lookback of 60 means 60 daily bars on a daily chart, 60 hourly bars on a 1-hour chart, or 60 weekly bars on a weekly chart.
**Configuration**
The indicator allows you to configure the benchmark, up to 10 stock symbols, performance lookback, table position, font size, normal text color, outperforming color, and underperforming color.
Although the default configuration uses ASX Energy stocks and XEJ, the indicator can be used with other sectors, indices, exchanges, or groups of stocks by changing the symbols in the settings.
**PulseWire request limit**
The indicator intentionally supports a maximum of **10 stocks** because it needs to retrieve external price and financial data for each symbol using Pine Script `request.*()` functions.
PulseWire imposes limits on the number of unique `request.*()` calls a script may make. On plans with a **40 unique-request limit**, increasing the number of stocks can cause the script to exceed that limit and fail to execute.
Because request limits and access to financial data can depend on the user's PulseWire plan, **this indicator may not work, or may have limited functionality, on PulseWire's free plan**.
**Note**
Market capitalization is an estimate based on share price and the latest shares-outstanding data available through PulseWire. It should be used for ranking and comparison rather than as an authoritative real-time market-cap figure.
This indicator is intended as an analysis tool and does not provide trading or investment advice.
Indicator

Watchlist Curator Stock RankerPick a sector — it scores ten of that sector's biggest names and ranks the top five leaders. A fast, honest starting point for your watchlist.
You've spotted the strong sector. Now — which stocks? Watchlist Curator takes one sector, scores ten of its biggest, most-traded names against the same yardstick, and hands you the top five in ranked order. That's a working watchlist in one look, instead of an hour of chart-flipping.
It works on its own — nothing else required.
Why a composite rank instead of raw relative strength?
Sorting a basket by relative strength alone hands you whatever ran the hardest — which is often the name that's most stretched and least enterable. The Curator's score starts with RS but lets the other components confirm or veto it: the trend stack rewards names in clean uptrends, the RSI sweet-spot deliberately down-ranks anything already overbought, and volume confirms real participation. The point of combining them is to surface leaders you can still enter — a different question than "what went up the most."
What it ranks — clearly said
Each of the 11 sectors carries a fixed basket of ten household-name bellwethers (Technology = AAPL, MSFT, NVDA, AVGO, CRM, AMD, ADBE, ORCL, CSCO, ACN — and so on for the rest). The Curator ranks *within that basket*. It doesn't scan every stock in the sector — it tells you which of the sector's big liquid names lead, which is where most swing traders should be looking anyway.
The Leadership Score (hover the Score header for this on the chart)
Relative strength vs SPY — the stock's % move minus SPY's over the lookback (20 bars by default). The backbone of the score.
Trend stack — up to +6: above the fast EMA, fast EMA above slow, above the slow EMA (+2 each).
RSI sweet spot — +3 only when RSI sits between 50 and 70: trending, but not overbought. This is deliberate — a red-hot name that's already stretched ranks lower on purpose, so the list points you at leaders you can still enter, not chases.
Volume — +2 for trading above its average.
The score is relative-strength % plus points — not a 0–100 scale. The Rating column translates it: 15+ Strong · 5–15 Good · 0–5 Fair · below 0 Lagging the market. The #1 row is highlighted in gold; a name whose data can't load shows "n/a".
How to use it
1. Find the leading sector — use whatever sector-strength read you trust.
2. Pick that sector in the dropdown.
3. Read the top five. Gold row = the current leader.
4. Those names are the charts worth your study time.
Settings — defaults work out of the box
Sector (dropdown, 11 choices) and timeframe (Daily by default — the ranking uses this timeframe no matter what chart you're on).
RS/momentum lookback (20), fast/slow EMA (20/50), RSI length (14).
Stocks to show (up to 5), table position, text size, dark/light theme, colors.
⚠ Educational tool for building a focused watchlist. It ranks relative strength — it does not give buy/sell signals or predict price. Not financial advice. Indicator

Swing Trade Scanner Setup Grade and VerdictGrades the stock on your chart as a long swing setup — a 0–100 score, an A+ to D grade, and a plain-English verdict.
You've found a stock. Is it actually a setup? Swing Trade Scanner grades the chart in front of you the way a swing trader reads it — trend, momentum, relative strength, volume — and gives you one honest answer: a score, a grade, and a verdict in plain English.
It works on its own — nothing else required.
Why one score instead of five separate indicators?
Every check in this script exists on its own — but alone, each one whipsaws. What makes a swing setup is confluence: trend, momentum, proximity to highs, relative strength, and volume confirming each other at the same time.
The Scanner's contribution is the weighting and the interaction between the checks: MA alignment counts most because trend is what pays swing traders, and the extension penalty can override an otherwise perfect score — because the same chart that grades well near the fast MA is a bad entry 8% above it. That interaction is what a stack of separate indicators won't show you.
What goes into the score (0–100)
Five checks, each weighted by how much it matters:
MA alignment (up to 35 pts) — is price stacked cleanly above the 4-MA ribbon? A full bull stack (price > fast MA > each slower MA) earns full points.
Momentum (up to 20) — how far price has moved over the lookback (60 bars by default).
Distance from the recent high (up to 20) — leaders sit near their highs; a stock 10% below its high has repair work to do first.
Relative strength vs SPY (up to 15) — is the stock beating the market (SPY = S&P 500 ETF), not just rising with it?
Volume (up to 10) — is it trading above its 20-day average?
Then one guardrail: the extension penalty . More than 6% above the fast MA and the score gets docked (−12 points, −20 past 10%). Chasing a stretched chart is how good setups become bad entries — the Scanner won't grade one highly.
The verdict reads in plain English
HIGH QUALITY (score 75+) — everything lined up.
MODERATE (55–74) — decent, not complete.
WEAK (40–54) — most of the checklist is missing.
AVOID (under 40) — not a long setup right now.
EXTENDED / WAIT — the setup grades well BUT price is stretched more than 6% above the fast MA. Good stock, bad moment. Let it pull in.
What you see on the chart
The 4-MA ribbon — four moving averages (EMA 20 / 50 / 100 / 200 by default; EMA, SMA or WMA), with the zone between the two fastest shaded green in an uptrend, red in a downtrend.
Candle coloring (optional) — green in a full bull stack, teal in a partial one, red in a full bear stack, so the trend state reads at a glance.
The dashboard — grade + score up top, then the four core metrics (MA Alignment, 60-bar Momentum, RS vs SPY, Volume Ratio) and the Verdict row.
Long setups only
This tool grades the long (buy) side. On a downtrending chart it won't invent an opportunity — it shows Full Bear and AVOID and tells you to look elsewhere.
Settings — defaults work out of the box
MA ribbon — four lengths, MA type, and colors.
Lookback (60 bars) — the window for momentum, relative strength, and the recent high.
Volume MA length (20).
Table position, text size, dark/light theme, and status colors.
⚠ Educational tool for reading and grading charts. The grade measures how complete a setup is by these rules — it does not generate buy/sell signals or predict price. Not financial advice. Indicator

FULCRUM: Rates & Vol Adjusted Ratio VWAPWHAT IT DOES
The fulcrum of the index complex: a rates-and-volatility-adjusted VWAP for the relationship between two markets. It rebuilds the NQ/ES ratio bar by bar — 2500·NQ/ES, normalized by VXN×US10Y — then anchors a volume-weighted mean with ±1σ and ±2σ bands on that relative-value series. One line that says whether tech is rich or cheap against the broad market, and how stretched the move is. It lives in its own pane, works on any chart, and configures itself.
HOW IT WORKS
Both legs are requested at chart resolution, and the bar's ratio high/low come from the cross-extremes (NQ high over ES low, and the reverse) — the VWAP sees the bar's true range, not just closes.
A spread has no volume of its own, so weighting borrows the geometric mean of both legs' volume.
The rates/vol divisor uses the PRIOR session's confirmed VXN and US10Y closes — identical live and on reload. No repaint.
The anchor is automatic: session on charts up to 20m, week up to 4h, month above. Override it if you disagree.
Bands come from cumulative volume-weighted variance, not a rolling stdev, and stay hidden for the first bars after each reset while they cook.
The ratio line holds its color until the move clears ±0.15σ — color changes are regime, not noise. A faint tint marks ±2σ extension.
A live table reads VWAP, ratio, Δ%, σ-distance, zone, and the divisor's status — if a feed is missing it says so instead of guessing silently.
HOW TO USE IT
Read the relationship against its anchored mean: +2σ on a ratio behaves like +2σ on price — stretched, and usually walked back. Cross alerts on VWAP, ±1σ, and ±2σ are included. Swap the symbols and multiplier and it generalizes to any pair you trade.
WHAT IT CAN'T DO
It describes the relationship, not direction — the ratio falling doesn't say whether NQ is weak or ES is strong. If the VXN or US10Y feed is unavailable, the divisor falls back to sane defaults and the table flags it; it will not pretend.
SETTINGS
Numerator, denominator, and multiplier; VXN×US10Y normalization; auto or manual anchor (session, week, month); band multipliers; warm-up hiding; colors, fill, labels, table.
Open source. Free. Where the balance sits. Indicator

RSI Divergence Entry Engine [trade_w_samet]🎯 RSI Divergence Entry Engine
RSI Divergence Entry Engine is a pivot-confirmed RSI divergence, optional trend-filtering, ATR-based trade-mapping, historical visualization, alert, and statistics indicator designed to help traders study how regular bullish and bearish RSI divergences can be converted into a structured chart workflow.
The script is built around one central idea:
A confirmed RSI divergence should be treated as analytical context first, and as a tracked trade setup only when the active direction filter and trade-state rules allow it.
The engine identifies regular RSI divergence between confirmed RSI pivots and corresponding price pivots.
When a divergence is confirmed, the script can:
• Display the divergence inside the RSI panel
• Fill the region between the RSI path and its divergence reference line
• Draw a three-layer neon divergence line directly between the corresponding price pivots on the main chart
• Evaluate the active trend-filter mode
• Open one tracked bullish or bearish setup when the signal is eligible
• Calculate an ATR-based Stop Loss
• Calculate TP1, TP2, and TP3
• Extend risk/reward boxes while the trade remains active
• Preserve completed trade boxes and historical TP price labels
• Track TP3 wins, Stop Losses, Win Rate, NET R, Average R, and Profit Factor
• Display a full desktop dashboard or a compact mobile dashboard
• Send separate PulseWire alert conditions
• Support one combined “Any alert() function call” workflow
• Apply Dark Mode, Light Mode, or Mobile Theme styling
The indicator includes:
• Fixed RSI 14 calculation using closing prices
• Pivot-based regular bullish divergence detection
• Pivot-based regular bearish divergence detection
• Adjustable Pivot Lookback
• Adjustable Confirmation Bars
• A fixed internal pivot-distance window
• Confirmed-bar divergence acceptance
• RSI-panel bullish and bearish divergence lines
• RSI-panel divergence-area fills
• Main-chart three-layer neon divergence lines
• Adjustable main-chart BULLISH / SELL label size
• Fixed compact RSI-panel labels
• Dark Mode
• Light Mode
• Mobile Theme
• EMA 200 Trend Filter
• Supertrend filter using ATR 10 and factor 3.0
• Higher-timeframe EMA 200 Trend Filter
• Adjustable higher timeframe
• ATR-based Stop Loss
• Adjustable ATR period
• Adjustable ATR Stop Loss multiplier
• Adjustable TP3 target from 1R to 7R
• Automatically calculated TP1 and TP2
• One active tracked trade at a time
• Conservative same-candle TP3 / SL handling
• Permanent historical TP / SL boxes
• Historical TP1, TP2, and TP3 price labels
• Dynamic active-trade price labels
• TP3 TARGET HIT labels
• Stop Loss result labels
• Full desktop statistics dashboard
• Two-row Mobile Theme dashboard
• Static alertcondition() support
• Dynamic alert() support
• “Any alert() function call” compatibility
• Bold-italic visual text
• Pure-white Dark Mode label text
• Hidden status-line input values
• Main-chart overlay visuals from a separate RSI pane
• Loaded-history trade statistics
The purpose of the script is to provide a transparent visual framework for reviewing confirmed RSI divergence, directional context, mapped risk, target structure, and bar-based historical outcomes.
It is not financial advice.
It is not an automated trading system.
It does not execute broker orders.
It does not calculate position size.
It does not guarantee that a divergence will produce a reversal.
It does not guarantee that the displayed Win Rate, NET R, or Profit Factor will continue in future market conditions.
It does not include spread, commission, slippage, latency, financing, or partial fills.
It does not reproduce the exact intrabar path inside historical candles.
━━━━━━━━━━━━━━━━━━━━━━
📌 OVERVIEW
━━━━━━━━━━━━━━━━━━━━━━
At a high level, RSI Divergence Entry Engine does the following:
• Calculates RSI using a fixed 14-period length and closing prices.
• Searches the RSI series for confirmed pivot lows and pivot highs.
• Compares each confirmed RSI pivot with the previous eligible pivot of the same type.
• Compares the corresponding price low or high with the prior price pivot.
• Identifies regular bullish divergence when RSI forms a higher low while price forms a lower low.
• Identifies regular bearish divergence when RSI forms a lower high while price forms a higher high.
• Requires the distance between the two confirmed pivots to remain inside the fixed internal range window.
• Waits for the required right-side confirmation bars before accepting a pivot.
• Displays confirmed divergence inside the RSI panel.
• Draws the same confirmed price-pivot relationship on the main chart with a neon line.
• Evaluates the selected trend-filter mode.
• Rejects a tracked entry when the trend filter does not allow that direction.
• Rejects a tracked entry when an opposite divergence is simultaneously present.
• Rejects a tracked entry while another trade is active.
• Opens a tracked trade at the close of the divergence-confirmation candle.
• Calculates Stop Loss distance from ATR.
• Places TP1 and TP2 at proportional distances inside the final TP3 target.
• Tracks only TP3 as the winning exit.
• Tracks Stop Loss as a -1R loss.
• Extends the active profit and loss boxes until the trade closes.
• Preserves completed boxes as historical trade visuals.
• Preserves historical TP1, TP2, and TP3 price labels.
• Updates the dashboard with bar-based historical statistics.
• Provides separate static alerts and combined dynamic alerts.
The script does not use machine-learning prediction.
It does not claim that RSI divergence predicts the future with certainty.
Its dashboard is not PulseWire Strategy Tester.
Its statistics are calculated internally from the script’s own bar-touch rules.
━━━━━━━━━━━━━━━━━━━━━━
🧠 CORE IDEA
━━━━━━━━━━━━━━━━━━━━━━
RSI divergence describes disagreement between price direction and RSI pivot direction.
A regular bullish divergence occurs when:
• price forms a lower low
• RSI forms a higher low
A regular bearish divergence occurs when:
• price forms a higher high
• RSI forms a lower high
The divergence can indicate that momentum is not confirming the newest price extreme.
However, divergence alone does not answer:
• whether the broader trend supports the reversal
• whether price is above or below a long-term directional reference
• whether Supertrend agrees with the signal
• whether the selected higher timeframe agrees with the signal
• where a volatility-adjusted Stop Loss should be mapped
• where intermediate and final targets should be displayed
• whether another tracked trade is already active
• whether historical bar touches reached TP3 or Stop Loss first
• how the signal behaves across Dark, Light, or Mobile layouts
The script therefore combines the divergence calculation with an optional trend filter and a fixed trade-tracking model.
The complete workflow is:
RSI pivot confirmation
→ price-pivot comparison
→ regular divergence confirmation
→ RSI-panel visualization
→ main-chart neon price-divergence line
→ optional trend-filter validation
→ one-active-trade check
→ entry at confirmation-candle close
→ ATR-based Stop Loss
→ TP1 / TP2 / TP3 mapping
→ historical bar-touch tracking
→ TP3 or SL result
→ dashboard statistics
→ static and dynamic alerts
The modules are not intended to operate as unrelated indicators.
Each module supports the same process: identifying a confirmed divergence, deciding whether it is eligible for tracking, mapping the trade structure, and recording the result under explicit rules.
━━━━━━━━━━━━━━━━━━━━━━
🧩 WHY THIS SCRIPT IS NOT A SIMPLE RSI DIVERGENCE MARKER
━━━━━━━━━━━━━━━━━━━━━━
A basic RSI divergence script can stop after drawing a line between two oscillator pivots.
RSI Divergence Entry Engine continues beyond that step.
A confirmed divergence can move through the following stages:
RSI pivot appears
→ right-side confirmation bars complete
→ previous eligible RSI pivot is located
→ pivot distance is validated
→ corresponding price pivots are compared
→ bullish or bearish divergence is confirmed
→ RSI divergence region is displayed
→ main-chart neon price-divergence line is displayed
→ active trend filter is evaluated
→ opposite-direction conflict is rejected
→ existing active-trade state is checked
→ ATR risk distance is calculated
→ entry, SL, TP1, TP2, and TP3 are stored
→ trade boxes extend through time
→ TP3 or SL is detected
→ completed trade is added to statistics
→ historical TP prices remain visible
The RSI module identifies the momentum disagreement.
The trend-filter module defines whether the tracked entry is directionally permitted.
The ATR module adapts the Stop Loss distance to current volatility.
The target module translates the chosen TP3 R multiple into three visual target levels.
The trade-state module prevents overlapping tracked positions.
The statistics module summarizes the outcomes produced by those exact rules.
The alert module communicates divergence, entry, TP3, and Stop Loss events.
This coordinated process makes the publication an entry-engine framework rather than only a divergence drawing tool.
━━━━━━━━━━━━━━━━━━━━━━
⚙️ HOW THE SCRIPT WORKS
━━━━━━━━━━━━━━━━━━━━━━
The indicator operates from a separate RSI pane while using force-overlay visuals for selected elements on the main chart.
The internal RSI configuration is:
• RSI length: 14
• Source: close
• Regular bullish divergence: enabled
• Regular bearish divergence: enabled
• Hidden bullish divergence: internally disabled
• Hidden bearish divergence: internally disabled
• Minimum pivot separation: 5 bars
• Maximum pivot separation: 60 bars
The user controls:
• Pivot Lookback
• Confirmation Bars
• Main-chart signal-label size
• ATR Period
• Stop Loss Distance in ATR
• TP3 Target in R
• Trend Filter
• Higher-Timeframe Trend Timeframe
• Theme Mode
First, the script calculates RSI:
osc = ta.rsi(close, 14)
The script then detects confirmed RSI pivots:
pivotLowValue = ta.pivotlow(osc, lbL, lbR)
pivotHighValue = ta.pivothigh(osc, lbL, lbR)
A pivot is not known on the pivot candle itself.
It becomes confirmed only after the selected Confirmation Bars have closed to its right.
The script then retrieves the previous confirmed pivot value, price value, and pivot bar.
Regular bullish divergence requires:
• current RSI pivot low above the previous RSI pivot low
• current price low below the previous price low
• valid pivot distance
• confirmed current chart bar
Regular bearish divergence requires:
• current RSI pivot high below the previous RSI pivot high
• current price high above the previous price high
• valid pivot distance
• confirmed current chart bar
The confirmed divergence is then displayed in two places:
• RSI pane
• Main price chart
The trend filter is applied only to the tracked trade entry.
This means a confirmed divergence can remain visible even when:
• the selected trend filter rejects the direction
• another trade is already active
• bullish and bearish conditions conflict on the same calculation
This separation is intentional.
The divergence visual represents analytical context.
The main-chart BULLISH or SELL trade label represents an entry that the tracking engine actually accepted.
━━━━━━━━━━━━━━━━━━━━━━
📉 RSI CALCULATION
━━━━━━━━━━━━━━━━━━━━━━
The Relative Strength Index is calculated from closing prices using a fixed length of 14.
The RSI line is displayed in blue.
The RSI pane includes:
• 70 Overbought line
• 50 Middle line
• 30 Oversold line
Dark Mode uses:
• black RSI-panel background
• red Overbought line
• white dotted Middle line
• green Oversold line
Light Mode uses:
• white RSI-panel background
• dark Middle line
• red Overbought line
• green Oversold line
The 70 and 30 lines provide visual context.
They are not mandatory divergence conditions.
A bullish divergence can be detected outside the Oversold region.
A bearish divergence can be detected outside the Overbought region.
The script does not require RSI to cross 30 or 70 before accepting a divergence.
━━━━━━━━━━━━━━━━━━━━━━
🔍 PIVOT DETECTION MODEL
━━━━━━━━━━━━━━━━━━━━━━
Pivot Lookback controls the number of candles examined on the left side of a potential RSI pivot.
The default value is 5.
Higher values generally produce larger and less frequent swing points.
Lower values generally produce smaller and more frequent swing points.
Confirmation Bars controls the number of completed candles required on the right side of the potential pivot.
The default value is 1.
A higher Confirmation Bars value provides more right-side confirmation but increases delay.
A lower value confirms earlier but can identify smaller structures.
The script also requires the previous pivot to be between 5 and 60 bars away.
These minimum and maximum distance values are fixed internally to keep the public settings panel compact.
The pivot model is symmetrical:
• pivot lows are used for bullish divergence
• pivot highs are used for bearish divergence
━━━━━━━━━━━━━━━━━━━━━━
🟢 REGULAR BULLISH DIVERGENCE
━━━━━━━━━━━━━━━━━━━━━━
A regular bullish divergence is confirmed when:
• a new RSI pivot low is confirmed
• the previous eligible RSI pivot low exists
• the current RSI pivot low is higher than the previous RSI pivot low
• the current corresponding price low is lower than the previous price low
• the pivot distance is between the fixed internal limits
• the current calculation bar is confirmed
Conceptually:
Price:
lower low
RSI:
higher low
The RSI pane displays:
• a green divergence line between the two RSI pivot values
• a translucent green fill between the real RSI path and the straight divergence reference
• a BULLISH label at the confirmed pivot location
The main chart displays:
• a three-layer green neon line between the corresponding price lows
A tracked bullish trade opens only when:
• the bullish divergence is not opposed by a bearish divergence on the same calculation
• the selected trend filter allows bullish entries
• no tracked trade is currently active
• another trade did not close on the same candle
• ATR is available and greater than zero
The tracked entry price is the close of the confirmation candle.
It is not the historical pivot-low price.
━━━━━━━━━━━━━━━━━━━━━━
🔴 REGULAR BEARISH DIVERGENCE
━━━━━━━━━━━━━━━━━━━━━━
A regular bearish divergence is confirmed when:
• a new RSI pivot high is confirmed
• the previous eligible RSI pivot high exists
• the current RSI pivot high is lower than the previous RSI pivot high
• the current corresponding price high is higher than the previous price high
• the pivot distance is between the fixed internal limits
• the current calculation bar is confirmed
Conceptually:
Price:
higher high
RSI:
lower high
The RSI pane displays:
• a red divergence line between the two RSI pivot values
• a translucent red fill between the real RSI path and the straight divergence reference
• a SELL label at the confirmed pivot location
The main chart displays:
• a three-layer red neon line between the corresponding price highs
A tracked bearish trade opens only when:
• the bearish divergence is not opposed by a bullish divergence on the same calculation
• the selected trend filter allows bearish entries
• no tracked trade is currently active
• another trade did not close on the same candle
• ATR is available and greater than zero
The tracked entry price is the close of the confirmation candle.
It is not the historical pivot-high price.
━━━━━━━━━━━━━━━━━━━━━━
⏳ PIVOT CONFIRMATION AND SIGNAL TIMING
━━━━━━━━━━━━━━━━━━━━━━
This section is important.
The script uses ta.pivotlow() and ta.pivothigh().
Pivot functions require candles to the right of the pivot before confirmation.
For example, when Confirmation Bars is 1:
• the potential pivot occurs
• one additional candle closes
• the pivot becomes confirmed
• the divergence condition can then be calculated
The RSI-panel divergence line and RSI divergence label are drawn at the original pivot-bar location after confirmation.
The main-chart neon divergence line also connects the original price-pivot bars after the divergence is confirmed.
This creates a historical visual relationship between the two pivots.
It does not mean the divergence was available in realtime on the original pivot candle.
The tracked trade entry is not placed back on the pivot.
The tracked entry occurs at the close of the later candle where the divergence confirmation becomes available.
Therefore, users must distinguish between:
Pivot Visualization
Shows where the confirmed historical pivots occurred.
Trade Entry Label
Shows the candle where the script actually accepted and opened the tracked setup.
Changing Confirmation Bars changes the confirmation delay.
Increasing Confirmation Bars can materially change signal timing and historical divergence output.
━━━━━━━━━━━━━━━━━━━━━━
✨ MAIN-CHART NEON DIVERGENCE VISUALS
━━━━━━━━━━━━━━━━━━━━━━
Confirmed RSI divergences are also displayed directly on the main price chart.
Bullish divergence:
• connects the two corresponding price lows
• uses green
• uses a three-layer neon appearance
Bearish divergence:
• connects the two corresponding price highs
• uses red
• uses a three-layer neon appearance
The neon effect is created from:
• a wide transparent outer glow
• a medium inner glow
• a bright two-pixel core line
The neon line is a historical divergence visual.
It is not an entry line.
It is not a Stop Loss.
It is not a support or resistance guarantee.
The line is created only after the RSI pivot and divergence have been confirmed.
Older line objects are removed when the configured internal object limit is exceeded.
Deleting an older visual object does not change the underlying signal calculation.
━━━━━━━━━━━━━━━━━━━━━━
🎨 RSI DIVERGENCE AREA SYSTEM
━━━━━━━━━━━━━━━━━━━━━━
Inside the RSI pane, the script creates a filled polygon between:
• the actual RSI path from the first pivot to the second pivot
• the straight divergence line connecting those pivot endpoints
Bullish divergence uses a translucent green fill.
Bearish divergence uses a translucent red fill.
The purpose is to make the momentum disagreement easier to recognize than a thin line alone.
The fill does not measure probability.
A larger visual area does not automatically mean a stronger or more profitable divergence.
The fill depends on:
• RSI movement between the pivots
• distance between the pivots
• selected Pivot Lookback
• selected Confirmation Bars
• chart symbol
• timeframe
• loaded historical data
━━━━━━━━━━━━━━━━━━━━━━
🧭 TREND FILTER SYSTEM
━━━━━━━━━━━━━━━━━━━━━━
The trend filter determines whether a confirmed divergence is eligible to open a tracked trade.
Available modes are:
• Off
• EMA Trend
• Supertrend
• HTF Trend
The filter does not hide the confirmed divergence visuals.
It only changes whether the trade engine accepts the bullish or bearish entry.
This allows users to study:
• all confirmed divergence structures
• only the subset that passed the selected directional filter
The active trend reference is drawn on the main chart when a filter mode is selected.
The reference is green when the active filter state is bullish.
The reference is red when the active filter state is bearish.
━━━━━━━━━━━━━━━━━━━━━━
📈 EMA TREND FILTER
━━━━━━━━━━━━━━━━━━━━━━
EMA Trend uses a fixed chart-timeframe EMA 200.
Bullish entries are allowed when:
• chart close is above EMA 200
Bearish entries are allowed when:
• chart close is below EMA 200
When price equals the EMA exactly, neither directional condition is satisfied.
The EMA filter is intended to align bullish divergence tracking with price above a long-term average and bearish divergence tracking with price below it.
It does not guarantee that price will continue in the filtered direction.
A divergence rejected by the EMA filter can still remain visible as a divergence visual.
━━━━━━━━━━━━━━━━━━━━━━
📊 SUPERTREND FILTER
━━━━━━━━━━━━━━━━━━━━━━
Supertrend mode uses fixed internal parameters:
• ATR length: 10
• factor: 3.0
Bullish entries are allowed when the Supertrend state is bullish.
Bearish entries are allowed when the Supertrend state is bearish.
The Supertrend reference is displayed on the main chart.
The fixed parameters keep the public settings menu simple and make behavior consistent across users.
The Supertrend filter can react differently across symbols and timeframes because ATR and price structure differ.
A bullish Supertrend state does not guarantee a successful bullish divergence trade.
A bearish Supertrend state does not guarantee a successful bearish divergence trade.
━━━━━━━━━━━━━━━━━━━━━━
⏱️ HIGHER-TIMEFRAME TREND FILTER
━━━━━━━━━━━━━━━━━━━━━━
HTF Trend compares the selected higher-timeframe close with its EMA 200.
Bullish entries are allowed when:
• higher-timeframe close is above higher-timeframe EMA 200
Bearish entries are allowed when:
• higher-timeframe close is below higher-timeframe EMA 200
The default higher timeframe is 240 minutes.
The request uses:
• gaps_off
• lookahead_off
The script does not intentionally request future higher-timeframe data.
However, the currently forming higher-timeframe candle can continue changing until that higher-timeframe candle closes.
This means the realtime HTF filter state can change while the active higher-timeframe candle is still developing.
Users who require fully closed higher-timeframe confirmation should account for this timing characteristic when interpreting realtime signals.
Changing the HTF Trend Timeframe recalculates historical eligibility.
━━━━━━━━━━━━━━━━━━━━━━
🎯 ENTRY MODEL
━━━━━━━━━━━━━━━━━━━━━━
The indicator uses the close of the divergence-confirmation candle as the tracked entry reference.
A bullish trade is opened when:
• valid bullish divergence is confirmed
• no bearish divergence conflict exists
• bullish trend permission is true
• no trade is active
• no trade closed on the same candle
• ATR is valid
A bearish trade uses the mirrored conditions.
The entry is stored at close.
The script then calculates:
• ATR-based risk distance
• Stop Loss
• TP1
• TP2
• TP3
Only signals that actually open a tracked trade receive the main-chart BULLISH or SELL entry label.
A divergence visual without an entry label can therefore indicate:
• trend-filter rejection
• existing active trade
• same-candle direction conflict
• same-candle previous trade closure
• unavailable ATR
━━━━━━━━━━━━━━━━━━━━━━
🛑 ATR STOP LOSS MODEL
━━━━━━━━━━━━━━━━━━━━━━
Risk distance is calculated as:
ATR × Stop Loss Distance.
Default settings:
• ATR Period: 14
• Stop Loss Distance: 2.0 ATR
Bullish trade:
Stop Loss = entry − risk distance
Bearish trade:
Stop Loss = entry + risk distance
ATR adapts the raw price distance to current market volatility.
The script does not examine:
• market structure below the bullish signal
• market structure above the bearish signal
• spread
• instrument tick value
• account size
• position size
• broker margin
• contract specifications
The ATR Stop Loss is a visual and statistical model.
It is not a broker order.
━━━━━━━━━━━━━━━━━━━━━━
🏆 TP1 / TP2 / TP3 MODEL
━━━━━━━━━━━━━━━━━━━━━━
The user selects the final TP3 target from 1R to 7R.
The default is 2R.
TP1 and TP2 are placed automatically inside the final target distance.
TP1:
one-third of the TP3 distance
TP2:
two-thirds of the TP3 distance
For a 3R TP3 setting:
• TP1 = 1R
• TP2 = 2R
• TP3 = 3R
For a 2R TP3 setting:
• TP1 ≈ 0.67R
• TP2 ≈ 1.33R
• TP3 = 2R
TP1 and TP2 are visual guide levels.
The current statistics engine does not close partial positions at TP1 or TP2.
It does not move Stop Loss to break even after TP1 or TP2.
It does not add partial R profit when TP1 or TP2 is touched.
Only TP3 is counted as a winning trade.
A Stop Loss is counted as -1R.
━━━━━━━━━━━━━━━━━━━━━━
🚦 ONE ACTIVE TRADE AT A TIME
━━━━━━━━━━━━━━━━━━━━━━
The trade engine maintains one active tracked position.
While a trade is active:
• new bullish divergence entries are not opened
• new bearish divergence entries are not opened
• divergence visuals can still appear
• historical divergence lines can still be drawn
This prevents overlapping tracked positions from affecting the statistics model.
A new trade is also prevented from opening on the same candle that the previous trade closes.
The next eligible divergence must occur on a later candle.
This design keeps each tracked result independent under the script’s internal accounting rules.
━━━━━━━━━━━━━━━━━━━━━━
⚠️ TP3 / SL SAME-CANDLE HANDLING
━━━━━━━━━━━━━━━━━━━━━━
Historical OHLC candles do not reveal the exact sequence of every intrabar price movement.
A candle can contain both:
• the TP3 price
• the Stop Loss price
When both are touched inside the same candle, the script cannot know from OHLC data which level occurred first.
The engine uses a conservative rule:
Stop Loss receives priority.
The trade is recorded as a loss.
TP3 and Stop Loss checks begin on the candle after entry.
The entry candle cannot immediately close the tracked trade.
This avoids assuming an unknown movement sequence inside the entry candle.
The conservative priority rule can produce different outcomes from lower-timeframe or tick-based execution reconstruction.
━━━━━━━━━━━━━━━━━━━━━━
📦 TRADE BOX VISUAL SYSTEM
━━━━━━━━━━━━━━━━━━━━━━
Each tracked trade creates two main-chart boxes:
Profit Box
Extends from entry to TP3.
Stop Box
Extends from entry to Stop Loss.
Bullish and bearish trades use the same green profit-area and red risk-area color logic.
While the trade remains active, the boxes extend to the current bar.
When the trade closes, the boxes stop at the exit candle and remain visible historically.
The boxes help visualize:
• entry timing
• risk distance
• final target distance
• trade duration
• exit candle
The boxes are chart drawings.
They are not broker orders.
Older boxes are deleted when the internal historical object limit is exceeded.
━━━━━━━━━━━━━━━━━━━━━━
🏷️ ACTIVE AND HISTORICAL PRICE LABELS
━━━━━━━━━━━━━━━━━━━━━━
During an active tracked trade, the right side of the chart displays dynamic labels for:
• ENTRY
• SL
• TP1
• TP2
• TP3
Each label includes the current stored price.
The labels move to the newest bar while the trade remains active.
On the exit candle, the final prices remain visible for that calculation.
When the trade closes, permanent historical labels are created for:
• TP1
• TP2
• TP3
These historical labels remain attached to the completed trade’s right edge.
The purpose is to preserve the target-price structure after the active dynamic labels disappear.
Historical TP labels do not indicate that TP1 or TP2 was actually touched.
They display the planned target prices for the completed tracked trade.
The final result is determined only by TP3 or Stop Loss.
━━━━━━━━━━━━━━━━━━━━━━
✅ RESULT LABELS
━━━━━━━━━━━━━━━━━━━━━━
When TP3 is reached, the script prints:
TARGET HIT
The trade is counted as a win equal to the selected TP3 R value.
When Stop Loss is reached, the script prints:
SL
The trade is counted as a -1R loss.
Result labels are displayed at the corresponding exit price.
All visible chart labels use bold-italic typography.
Dark Mode label text uses pure white.
Light Mode uses dark text where required for contrast.
━━━━━━━━━━━━━━━━━━━━━━
🎨 THEME SYSTEM
━━━━━━━━━━━━━━━━━━━━━━
The indicator includes three theme modes:
• Dark Mode
• Light Mode
• Mobile Theme
Dark Mode
Designed for dark PulseWire layouts.
It uses:
• black RSI-panel background
• dark dashboard surface
• white dashboard text
• pure-white chart-label text
• red brand accents
• green bullish visuals
• red bearish visuals
Light Mode
Designed for light PulseWire layouts.
It uses:
• white RSI-panel background
• white dashboard surface
• dark dashboard text
• dark chart-label text where appropriate
• red brand accents
• adjusted divergence transparency
Mobile Theme
Designed for smaller screens.
It uses:
• compact main-chart labels
• smaller RSI labels
• tiny price labels
• a two-row dashboard
• Win Rate
• NET R
Mobile Theme does not display the full desktop statistics table.
Theme selection changes presentation.
It does not change the underlying divergence, trend-filter, or trade calculations.
━━━━━━━━━━━━━━━━━━━━━━
📟 DASHBOARD
━━━━━━━━━━━━━━━━━━━━━━
Dark Mode and Light Mode display the full bottom-right dashboard.
The header displays:
• RSI DIVERGENCE
• selected TP3 R value
• active Trend Filter
The full dashboard includes:
Status
Possible values:
• NO ACTIVE TRADE
• ACTIVE BUY
• ACTIVE SELL
Closed Trades
Number of completed tracked trades.
TP3 Wins
Number of trades that reached TP3 before Stop Loss under the script’s bar-touch rules.
Losses
Number of trades recorded at Stop Loss.
Win Rate
TP3 Wins divided by Closed Trades.
NET R
Gross Profit R minus Gross Loss R.
Gross Profit
Sum of winning TP3 R values.
Gross Loss
Number of losing trades expressed as R because every Stop Loss equals -1R.
Average / Trade
NET R divided by Closed Trades.
Profit Factor
Gross Profit R divided by Gross Loss R.
Mobile Theme displays only:
• Win Rate
• NET R
The dashboard is placed on the main chart even though the indicator calculates in a separate RSI pane.
━━━━━━━━━━━━━━━━━━━━━━
📊 STATISTICS METHODOLOGY
━━━━━━━━━━━━━━━━━━━━━━
The statistics are produced by the script’s internal bar-based trade tracker.
They are not imported from a broker.
They are not verified account results.
They are not PulseWire Strategy Tester results.
Win Rate:
wins / closed trades
Gross Profit R:
wins × selected TP3 R
Gross Loss R:
losses × 1R
NET R:
Gross Profit R − Gross Loss R
Average R:
NET R / closed trades
Profit Factor:
Gross Profit R / Gross Loss R
When there are profitable trades but no recorded losses, the script displays 999 as a finite placeholder instead of mathematical infinity.
The statistics do not include:
• TP1 partial profits
• TP2 partial profits
• break-even exits
• trailing stops
• spread
• commission
• slippage
• swap
• latency
• order rejection
• partial fills
• position sizing
• account equity
• compounding
• taxes
Statistics depend on:
• loaded chart history
• selected symbol
• timeframe
• data provider
• Pivot Lookback
• Confirmation Bars
• Trend Filter
• HTF Trend Timeframe
• ATR Period
• Stop Loss multiplier
• TP3 target
• historical-data revisions
Changing any of these inputs can change historical results.
━━━━━━━━━━━━━━━━━━━━━━
🚨 ALERT SYSTEM
━━━━━━━━━━━━━━━━━━━━━━
The script includes static PulseWire alert conditions for:
• Regular Bullish Divergence
• Hidden Bullish Divergence
• Regular Bearish Divergence
• Hidden Bearish Divergence
• BUY Entry
• SELL Entry
• TP3 Hit
• Stop Loss Hit
Regular bullish and bearish divergence are enabled in the current public configuration.
Hidden bullish and hidden bearish divergence logic is internally disabled.
The hidden alert choices can therefore appear in PulseWire’s alert-condition list, but no hidden divergence event is produced while the internal hidden-divergence switches remain disabled.
The script also includes dynamic alert() calls for:
• BUY entry
• SELL entry
• TP3 hit
• Stop Loss hit
Dynamic BUY and SELL messages can include:
• tradewsamet identifier
• chart ticker
• chart timeframe
• entry price
• TP1 price
• TP2 price
• TP3 price
• Stop Loss price
• final R target
• active Trend Filter
This allows one PulseWire alert using:
Any alert() function call
to receive all dynamic entry and result events.
━━━━━━━━━━━━━━━━━━━━━━
🔔 HOW TO USE ALERTS
━━━━━━━━━━━━━━━━━━━━━━
For a specific static event:
1. Add RSI Divergence Entry Engine to the chart.
2. Open PulseWire’s Create Alert window.
3. Select the indicator as the condition.
4. Choose the required event.
5. Select the notification method.
6. Use an appropriate frequency.
7. Test the alert before relying on it.
For one combined dynamic workflow:
1. Add the indicator to the chart.
2. Open Create Alert.
3. Select RSI Divergence Entry Engine .
4. Select Any alert() function call.
5. Configure the delivery method.
6. Test BUY, SELL, TP3, and SL message handling.
When the script, settings, symbol, or timeframe changes materially, recreate existing alerts.
A PulseWire alert can continue using the script snapshot stored when the alert was created.
Alerts are monitoring tools.
They do not execute, modify, or close broker orders.
━━━━━━━━━━━━━━━━━━━━━━
🧪 HOW TO USE THE INDICATOR
━━━━━━━━━━━━━━━━━━━━━━
A practical workflow:
1. Add RSI Divergence Entry Engine to a standard candlestick chart.
2. Select Dark Mode, Light Mode, or Mobile Theme.
3. Begin with Pivot Lookback set to 5.
4. Begin with Confirmation Bars set to 1.
5. Observe the RSI-panel divergence structures.
6. Observe the matching neon price-pivot lines on the main chart.
7. Remember that the pivot visual becomes available only after right-side confirmation.
8. Distinguish the neon divergence line from the later tracked entry label.
9. Begin with Trend Filter set to Off when studying raw divergence frequency.
10. Test EMA Trend for chart-timeframe directional alignment.
11. Test Supertrend for volatility-based directional alignment.
12. Test HTF Trend for higher-timeframe EMA context.
13. Verify the selected HTF timeframe.
14. Review the main-chart trend reference.
15. Observe whether a BULLISH or SELL entry label is accepted.
16. Review ENTRY, SL, TP1, TP2, and TP3 prices.
17. Observe the profit and risk boxes.
18. Remember that TP1 and TP2 are visual only.
19. Review the final TARGET HIT or SL result.
20. Review dashboard Win Rate and NET R.
21. Compare Dark/Light full dashboard with Mobile Theme.
22. Use alerts for monitoring rather than blind execution.
23. Review broader market structure independently.
24. Review spread, liquidity, volatility, and news conditions.
25. Define personal account risk and position size.
26. Test the exact symbol, timeframe, and data feed personally used.
The indicator is designed for structured study and monitoring.
It should not be treated as an automatic decision-maker.
━━━━━━━━━━━━━━━━━━━━━━
⚙️ SETTINGS REFERENCE
━━━━━━━━━━━━━━━━━━━━━━
🎨 Theme
Theme Mode
Dark Mode
Uses the full dark visual profile.
Light Mode
Uses the full light visual profile.
Mobile Theme
Uses compact labels and a two-row dashboard.
━━━━━━━━━━━━━━━━━━━━━━
🎯 Signal Settings
Pivot Lookback
Controls the left-side pivot search width.
Default:
5
Higher values generally create larger and less frequent pivot structures.
Confirmation Bars
Controls the number of right-side completed candles required to confirm the RSI pivot.
Default:
1
Increasing the value increases confirmation delay.
Chart Signal Label Size
Controls the main-chart BULLISH and SELL entry-label size.
Available values:
• Tiny
• Small
• Normal
• Large
• Huge
Mobile Theme overrides the selected size with a compact layout.
━━━━━━━━━━━━━━━━━━━━━━
🧭 Trend Filter
Trend Filter
Available modes:
• Off
• EMA Trend
• Supertrend
• HTF Trend
Off
Allows tracked bullish and bearish entries without directional trend filtering.
EMA Trend
Uses chart close relative to EMA 200.
Supertrend
Uses ATR 10 and factor 3.0.
HTF Trend
Uses selected higher-timeframe close relative to higher-timeframe EMA 200.
HTF Trend Timeframe
Selects the higher timeframe used by HTF Trend.
Default:
240 minutes
This setting has no effect when HTF Trend is not selected.
━━━━━━━━━━━━━━━━━━━━━━
🛡️ Trade Management
ATR Period
Controls the ATR used for risk-distance calculations.
Default:
14
Stop Loss Distance (ATR)
Multiplies ATR to calculate the Stop Loss distance.
Default:
2.0
TP3 Target (R)
Selects the final target from 1R to 7R.
Default:
2R
TP1 and TP2 are calculated automatically from the TP3 distance.
All public input values are hidden from PulseWire’s status line to reduce chart-header clutter.
━━━━━━━━━━━━━━━━━━━━━━
🧠 WHAT MAKES THIS SCRIPT ORIGINAL
━━━━━━━━━━━━━━━━━━━━━━
RSI, divergence, EMA, Supertrend, ATR, risk/reward targets, and trade statistics are established technical-analysis concepts.
These concepts are not unique by themselves.
The originality of RSI Divergence Entry Engine lies in the coordinated workflow applied to them:
fixed RSI calculation
→ confirmed oscillator pivots
→ price / RSI regular divergence comparison
→ pivot-distance validation
→ RSI-path divergence filling
→ main-chart three-layer neon pivot lines
→ optional chart or higher-timeframe trend filtering
→ one-active-trade state
→ confirmation-candle entry
→ ATR-normalized Stop Loss
→ proportional TP1 / TP2 placement
→ adjustable TP3 R target
→ conservative OHLC exit handling
→ permanent risk/reward history
→ historical target-price labels
→ theme-aware chart output
→ mobile-specific dashboard
→ internal R-based statistics
→ static and dynamic alert workflows
Distinctive implementation features include:
• separating divergence context from accepted tracked entries
• displaying the same confirmed divergence in the RSI pane and on the main chart
• filling the RSI path-to-divergence region
• using a three-layer neon price-divergence line
• preserving trade boxes after closure
• preserving TP1, TP2, and TP3 planned prices historically
• allowing multiple direction-filter models inside one entry workflow
• maintaining one tracked trade at a time
• applying conservative Stop Loss priority when TP3 and SL share a candle
• offering theme-specific dashboard behavior
• reducing the Mobile Theme dashboard to Win Rate and NET R
• supporting static conditions and combined dynamic alert() messages
• keeping public settings compact while documenting fixed internal values
The script is not a collection of unrelated indicators placed on one chart.
Every component supports the same objective: converting a confirmed RSI divergence into a transparent, filterable, volatility-mapped, historically reviewable entry framework.
━━━━━━━━━━━━━━━━━━━━━━
⚠️ IMPORTANT PRACTICAL NOTES
━━━━━━━━━━━━━━━━━━━━━━
Signal frequency depends on:
• symbol
• timeframe
• data provider
• Pivot Lookback
• Confirmation Bars
• fixed 5–60 bar pivot-distance window
• Trend Filter
• HTF Trend Timeframe
• existing active-trade state
• ATR availability
• available historical data
Higher Pivot Lookback values can reduce frequency.
Higher Confirmation Bars values increase delay.
EMA Trend can reject counter-position signals relative to EMA 200.
Supertrend can change direction after price movement.
HTF Trend can remain sensitive to the currently developing higher-timeframe candle.
Only one tracked trade can be active.
A divergence can therefore be visible without becoming a tracked trade.
TP1 and TP2 are not partial exits.
Historical TP1, TP2, and TP3 labels display planned prices, not proof that every level was touched.
Dashboard statistics use loaded chart history only.
Different brokers or exchanges can produce different:
• highs
• lows
• closes
• RSI pivots
• ATR values
• divergence signals
• trend-filter states
• TP3 / SL outcomes
• dashboard statistics
Changing the chart’s available history can change the first eligible pivot pair and all later trade-state sequencing.
━━━━━━━━━━━━━━━━━━━━━━
⚠️ LIMITATIONS AND SHORTCOMINGS
━━━━━━━━━━━━━━━━━━━━━━
This script has important limitations:
It does not guarantee profitable trades.
It does not predict future price movement.
It does not execute orders.
It does not place broker Stop Loss orders.
It does not place broker Take Profit orders.
It does not calculate position size.
It does not calculate account risk.
It does not include spread.
It does not include commission.
It does not include slippage.
It does not include latency.
It does not include swap or financing.
It does not model partial fills.
It does not model order rejection.
It does not model contract specifications.
It does not model tick-by-tick execution.
It uses historical OHLC bars.
It cannot always determine whether TP3 or SL occurred first inside one candle.
It resolves same-candle TP3 / SL ambiguity in favor of Stop Loss.
It does not record TP1 or TP2 as partial profit.
It does not move Stop Loss to break even.
It does not trail Stop Loss.
It maintains one active tracked trade.
It can ignore otherwise valid new entries while a trade is active.
It uses pivot confirmation.
Pivot visuals are not available on the original pivot candle in realtime.
RSI pivot visuals are placed at the historical pivot location after confirmation.
Main-chart neon lines are created after divergence confirmation.
The HTF filter can change while the current higher-timeframe candle remains open.
A confirmed divergence can fail.
A trend-aligned divergence can fail.
A larger divergence area does not guarantee a stronger result.
A neon divergence line is not guaranteed support or resistance.
A TARGET HIT label is not broker-verified execution.
Dashboard statistics are not audited performance.
Profit Factor displays 999 when wins exist without recorded losses.
Changing settings recalculates historical conditions.
Changing symbol, timeframe, provider, or available history can change output.
Alert delivery depends on PulseWire and user configuration.
Alerts do not guarantee broker execution.
For these reasons, the indicator should be used as an educational decision-support and chart-review tool, not as a standalone automated strategy.
━━━━━━━━━━━━━━━━━━━━━━
👤 WHO THIS SCRIPT MAY BE USEFUL FOR
━━━━━━━━━━━━━━━━━━━━━━
This script may be useful for traders who:
• understand basic RSI divergence
• want regular bullish and bearish divergence visuals
• prefer pivot-confirmed structures
• want divergence displayed in both RSI and price
• want a clear neon main-chart divergence line
• want optional trend filtering
• use EMA 200
• use Supertrend
• use higher-timeframe direction
• want ATR-based risk mapping
• want adjustable R targets
• want historical risk/reward boxes
• want historical planned TP prices
• want one-active-trade statistics
• want Dark, Light, and Mobile themes
• want static alerts
• want one combined dynamic alert
• understand that chart statistics are not verified trading results
It may be less suitable for users who:
• want signals on the unconfirmed pivot candle
• want no pivot delay
• want hidden divergence enabled publicly
• want every divergence to open a trade
• want multiple overlapping tracked trades
• want partial TP accounting
• want automatic break-even management
• want trailing stops
• want tick-level backtesting
• want verified Strategy Tester results
• want broker execution
• want guaranteed reversal signals
• expect a high Win Rate to continue unchanged
• expect the HTF filter to remain fixed before the higher-timeframe candle closes
━━━━━━━━━━━━━━━━━━━━━━
🧭 BEST PRACTICE SUGGESTIONS
━━━━━━━━━━━━━━━━━━━━━━
For studying raw divergence behavior:
• use Trend Filter Off
• begin with Pivot Lookback 5
• begin with Confirmation Bars 1
• observe divergence visuals before evaluating trades
• distinguish pivot location from confirmation timing
For trend-aligned divergence:
• test EMA Trend
• test Supertrend
• compare signal frequency
• review whether the filter removes useful countertrend setups
For broader directional context:
• test HTF Trend
• use a higher timeframe meaningfully above the chart timeframe
• remember that the active HTF candle can change before closing
For trade mapping:
• begin with ATR 14
• begin with Stop Loss Distance 2.0 ATR
• begin with TP3 2R
• remember that TP1 and TP2 are visual only
• review same-candle TP3 / SL cases conservatively
For chart clarity:
• use Dark Mode on dark chart layouts
• use Light Mode on light chart layouts
• use Mobile Theme on small screens
• adjust the main-chart entry-label size
• use neon divergence lines as context, not automatic entries
Always:
• wait for divergence confirmation
• review broader price structure
• review liquidity and volatility
• review session conditions
• review news risk
• define personal account risk
• define personal position size
• test the exact symbol and timeframe
• verify alerts before relying on them
• remember that every divergence can fail
━━━━━━━━━━━━━━━━━━━━━━
🔓 PUBLICATION NOTE
━━━━━━━━━━━━━━━━━━━━━━
RSI Divergence Entry Engine is published as an educational RSI-divergence, directional-filtering, ATR trade-mapping, historical-visualization, and alert tool.
The purpose of this description is to explain:
• how RSI is calculated
• how RSI pivot lows and highs are confirmed
• how Pivot Lookback affects structure selection
• how Confirmation Bars affect delay
• how the fixed pivot-distance window works
• how regular bullish divergence is identified
• how regular bearish divergence is identified
• how divergence is displayed inside the RSI pane
• how the RSI divergence area is filled
• how corresponding price pivots are displayed with neon lines
• when the pivot visuals become available
• why pivot visuals appear at historical pivot locations
• why tracked entries are placed on confirmation-candle close
• how the trend filter affects entries without hiding divergence context
• how EMA Trend works
• how Supertrend works
• how HTF Trend works
• how currently forming higher-timeframe candles affect realtime context
• how ATR risk distance is calculated
• how Stop Loss is placed
• how TP1, TP2, and TP3 are calculated
• why TP1 and TP2 are visual only
• why only TP3 counts as a win
• how one-active-trade handling works
• how same-candle TP3 / SL ambiguity is resolved
• how historical trade boxes are retained
• what historical TP labels represent
• how Dark Mode, Light Mode, and Mobile Theme differ
• what the dashboard displays
• how Win Rate, NET R, Average R, and Profit Factor are calculated
• why the statistics are not broker-verified
• what static alert conditions are available
• how “Any alert() function call” works
• what the script does not simulate
• why the combined modules form one coordinated workflow
The script is designed to support structured review.
It does not promise profitable results.
It does not remove market risk.
It does not replace independent analysis.
It does not replace personal risk management.
━━━━━━━━━━━━━━━━━━━━━━
🕒 REPAINTING, BACKPLOTTING, AND TIMING DISCLOSURE
━━━━━━━━━━━━━━━━━━━━━━
RSI Divergence Entry Engine uses pivot functions.
Pivot confirmation requires future candles relative to the original pivot location.
The number of required right-side candles is controlled by Confirmation Bars.
The script does not know that a pivot exists on the original pivot candle.
After the right-side candles close:
• the pivot becomes confirmed
• the divergence can be calculated
• the RSI divergence line is displayed at the historical pivot locations
• the RSI divergence label is displayed at the confirmed pivot location
• the main-chart neon line connects the corresponding historical price pivots
This historical placement is a visual back-reference to the confirmed pivot structure.
It must not be interpreted as a realtime signal that was available on the original pivot candle.
The tracked trade entry is not backdated.
The tracked trade opens at the close of the later confirmation candle when all entry rules are valid.
The main-chart BULLISH or SELL entry label appears on that confirmation candle.
Trade outcome checks begin on the following candle.
The HTF Trend request uses lookahead_off.
It does not intentionally access future higher-timeframe values.
However, the current higher-timeframe candle can continue developing in realtime until it closes.
Historical results can change when:
• Pivot Lookback changes
• Confirmation Bars changes
• Trend Filter changes
• HTF Trend Timeframe changes
• ATR settings change
• TP3 target changes
• chart symbol changes
• timeframe changes
• exchange or broker feed changes
• historical data is revised
• available chart history changes
Confirmed chart-bar calculations reduce unfinished current-chart-candle changes.
They do not remove pivot confirmation delay, historical pivot placement, HTF live-candle variation, data-feed differences, or market risk.
━━━━━━━━━━━━━━━━━━━━━━
🛡️ DISCLAIMER
━━━━━━━━━━━━━━━━━━━━━━
RSI Divergence Entry Engine is provided for educational and informational purposes only.
It does not constitute financial, investment, trading, legal, accounting, or tax advice.
No indicator can guarantee future results.
Markets are uncertain.
Momentum changes.
Volatility changes.
Trend changes.
Liquidity changes.
Historical chart behavior does not ensure future performance.
Every user is responsible for their own:
• analysis
• validation
• symbol selection
• timeframe selection
• trend-filter selection
• execution planning
• Stop Loss placement
• target planning
• position sizing
• risk management
• alert configuration
• trading decisions
• broker execution
• legal obligations
• tax obligations
The RSI pivots, divergence lines, divergence fills, neon price-pivot lines, trend references, BULLISH labels, SELL labels, ENTRY labels, Stop Loss levels, TP1 levels, TP2 levels, TP3 levels, trade boxes, historical target labels, TARGET HIT labels, SL labels, dashboard statistics, Win Rate, NET R, Average R, Profit Factor, and alerts are visual analysis tools only.
A bullish divergence is not a guaranteed reversal.
A bearish divergence is not a guaranteed reversal.
An EMA-aligned signal is not guaranteed to succeed.
A Supertrend-aligned signal is not guaranteed to succeed.
A higher-timeframe aligned signal is not guaranteed to succeed.
A TARGET HIT label is not proof of an actual broker fill.
An SL label is not proof of an actual broker fill.
The dashboard is not verified account performance.
The statistics are not audited.
The script does not include spread, commission, slippage, latency, financing, partial fills, order rejection, position sizing, account equity, or broker-specific execution behavior.
Use the script as a structured RSI-divergence review, directional-filtering, trade-mapping, and monitoring framework—not as a promise of profitability or a substitute for independent judgment.
Indicator

Currency Strength Meter [ForexCracked]🔵 OVERVIEW
A currency strength meter that ranks the eight major currencies against each other in real time, and then tells you the one thing you actually opened it for: which pair to trade right now.
It reads all 28 major crosses, so every currency is measured across all seven of its pairs, not just against the dollar.
🔵 WHAT MAKES THIS ONE DIFFERENT
Almost every strength meter measures each pair's percent change and averages it. That has a flaw nobody talks about: a 40 pip move in a quiet pair and a 40 pip move in a violent one are treated as the same event, when they are not remotely the same event.
This meter measures every move in ATR units instead. A currency only scores highly if it has moved far relative to how far that pair normally moves. Quiet pairs stop being drowned out by naturally volatile ones, and the ranking stops flattering whichever currency happens to be paired with the wildest counterpart that week.
🔵 WHAT IT SHOWS
• A live ranking of USD, EUR, GBP, JPY, CHF, AUD, NZD and CAD, strongest to weakest
• Each currency's strength in ATR units, so the numbers mean something rather than being an index
• Whether each currency is strengthening or weakening against its own recent reading, not just where it sits
• The Best Pair line: long the strongest currency, short the weakest
• The Spread: the distance between strongest and weakest
🔵 THE SPREAD (read this one first)
The spread is the gap between the strongest and the weakest currency. It answers a question most traders skip: is anything actually happening?
A wide spread means currencies are genuinely diverging and a strength-based trade has something to work with. A narrow spread means everything is drifting together, the ranking is mostly noise, and the best trade is usually no trade. Check the spread before you trust the ranking.
🔵 HOW TO USE
• Read the spread. If it is small, the ranking is not telling you much, so wait.
• Take the Best Pair as a starting point, not an entry. It tells you where the divergence is, not when to get in.
• Prefer a currency that is both highly ranked and still strengthening over one that is highly ranked and already fading, since the second one has usually made its move.
• Confirm the pair on the chart with your own entry method. A strength meter frames the trade. It does not time it.
• Lengthen the Lookback for swing trading and shorten it for intraday.
🔵 SETTINGS
• Strength Lookback: how many bars back the move is measured over (default 24)
• ATR Length: the volatility yardstick every move is divided by (default 14)
• Symbol Prefix: leave blank on most charts. If the pairs do not load, set it to your data provider, for example OANDA: or FX:
• Show Ranking Table: toggles the strongest-to-weakest table in the top right (default on)
• Plot Strength Lines: toggles the eight strength curves in the pane (default on)
⚠️ DISCLAIMER
Relative strength tells you which currencies are moving and which are not. It does not tell you when to enter, and strong currencies reverse. Results depend on market conditions, settings, and your own execution and risk management. Shared for educational and research purposes. Not financial advice. Indicator

Sector SweeperRanks the 11 sectors and 12 key industries by performance — strongest at the top — so you know where to hunt before you pick a stock.
Strong stocks tend to come from strong groups. Sector Sweeper shows which sectors and industries are leading the market right now, ranked top to bottom on one clean board — so you start your search in the right place instead of guessing.
It works on its own — nothing else required.
How it measures — no black box
Each row pulls that ETF's closing prices and computes its percent change over your lookback window; the lists are then sorted strongest to weakest. No smoothing, no proprietary formula — the value is having all 23 groups measured by the same yardstick, on one board, updated every bar, instead of flipping through 23 charts to build the same picture by hand.
What it shows — two tables
•SECTORS — the 11 S&P sector ETFs (Technology, Financials, Energy, Health Care, …), ranked by performance over your lookback.
•SUB-INDUSTRIES — 12 sharper themes (Semiconductors, Software, Biotech, Oil Services, Gold Miners, Airlines, …), ranked the same way.
Each row shows the ETF and its % move over the lookback. Green = up, red = down, and the #1 in each list is highlighted in gold
How to read it
• Top of the list = where money is flowing. Bottom = what's lagging.
• Use it **top-down**: spot the strongest sector or industry here, then go find the leading stocks inside that group.
• Watch it over time — a group climbing the board is rotating into favor; one sliding down is falling out of it.
Settings — defaults work out of the box
• Lookback (bars ) — the performance window (20 by default ≈ about a month on a daily chart).
• Each table has its own position (default: Sectors = Middle Left, Sub-Industries = Middle Right) plus table size , dark/light theme, and colors.
⚠ Educational tool for market context and planning. It ranks performance — it does not give buy/sell signals or predict price. Not financial advice.
Indicator

RS Rating (Relative Strength) - Clean Table UIThis indicator calculates the Relative Strength (RS) Rating of a stock compared to the S&P 500 (SPY) and displays it as a clean, simple numerical value in a customizable table on your chart.
Unlike many complex swing data indicators that clutter your screen with moving averages, background colors, and multiple data points, this script is specifically designed for minimalist traders, day traders, and scalpers who only need to see the core RS Rating score at a single glance.
How It Works:
Core Calculation: It uses the standard weighted formula for 1-year performance (40% for the most recent quarter, and 20% for each of the previous three quarters) compared against the S&P 500 benchmark.
Percentile Ranking (1-99): Using market environment seed data, the raw score is converted into a true 1 to 99 percentile ranking. For example, an RS Rating of 85 means the stock is currently outperforming 85% of the overall market.
Color-Coded Signals: The numerical value automatically changes color based on the stock's momentum:
Green (>= 80): Strong market leader.
Red (<= 40): Weak laggard.
Custom/White: Neutral performance.
Features:
Zero Chart Clutter: No lines or shapes plotted over your candles. Just a single, elegant table.
Fully Customizable: You can easily change the table's position (Top/Bottom, Left/Right) and text size (Normal, Large, Huge) directly from the indicator settings to fit your exact workspace layout.
(Credits to the original open-source community and Fred6724 for the percentile mapping seed function utilized to power this clean UI version). Indicator

YES RSI + BB SniperYES RSI + BB Sniper — Mean-Reversion Setup Tool with Auto Entry/SL/Targets
What it does:
This indicator combines RSI and Bollinger Bands to identify mean-reversion setups, then automatically plots a complete trade plan — Entry, Stop Loss, and three Targets — with a live dashboard tracking every level.
Signal Logic:
LONG: Price tags the lower Bollinger Band AND RSI crosses back above the oversold level (default 30) — exhaustion + momentum shift confirmation
SHORT: Price tags the upper band AND RSI crosses back below overbought (default 70)
Optional EMA-200 trend filter to trade only with the larger trend
Auto Trade Levels:
Entry: Signal candle close
Stop Loss: Beyond the band/swing extreme with an ATR-based buffer (adjustable)
Target 1: BB Basis (the mean — natural magnet in mean-reversion), minimum 1R
Target 2: Opposite band, minimum 2R
Target 3: Configurable Risk:Reward runner (default 1:3)
Dashboard shows: Signal status with bar count, RSI value, %B, Bandwidth (squeeze detection below 4%), trend direction, all trade levels with real-time hit-tracking (✔/✖), and Risk:Reward ratios.
Alerts: Built-in alert conditions for both LONG and SHORT setups.
How to use: Works best on Daily and 1H timeframes for swing trades. Wait for the signal candle to close, verify the R:R on the dashboard suits your plan, and always size positions according to your risk management.
This is an educational tool, not financial advice. Always do your own analysis before trading.
Indicator

Ultimate RSIHere is a breakdown of its core features and how they work together:
1. Volatility-Adaptive RSI Length
How it works: Instead of using a static length (like the traditional 14-period RSI), the script calculates the market's standard deviation (volatility).
The Benefit: When the market is highly volatile, the RSI length dynamically shortens, making the indicator more responsive so you can catch quick reversals. When volatility drops (consolidation), the length expands, smoothing the RSI line to filter out "chop" and false signals.
2. Dynamic Overbought / Oversold Zones (Bollinger Bands)
How it works: Standard RSIs use static horizontal lines at 70 and 30. This script applies Bollinger Bands directly to the RSI values themselves.
The Benefit: A reading of 70 isn't always overbought in a strong trend. By wrapping the RSI in a standard deviation channel, you get a dynamic zone. If the RSI breaks above its upper dynamic band, you know momentum is genuinely extreme relative to recent conditions, rather than a fixed arbitrary number.
3. Automated Divergence Detection
How it works: The script constantly scans for discrepancies between price action and RSI momentum.
The Benefit: It automatically plots visual markers on the RSI pane when it detects:
Regular Divergences (Reversals): E.g., Price makes a Lower Low, but RSI makes a Higher Low (Bullish Divergence).
Hidden Divergences (Trend Continuations): E.g., Price makes a Higher Low, but RSI drops to a Lower Low (Hidden Bullish).
4. RSI Moving Average (Signal Line)
How it works: An additional moving average (you can choose between SMA, EMA, RMA, WMA, or HMA) is plotted alongside the RSI.
The Benefit: This acts as a trigger line. An RSI crossing above its EMA can be used as an early entry signal, or as confirmation that momentum has definitively shifted.
5. Multi-Timeframe (MTF) Support
How it works: You can configure the indicator to calculate RSI based on a higher timeframe (e.g., pulling 4-Hour RSI data while you are looking at a 15-minute chart).
The Benefit: This ensures your lower timeframe entries are always aligned with the macro momentum, preventing you from trading against the larger trend.
6. Visual Confluence & Alerts
The RSI line itself is color-coded. For example, it turns bright green when momentum is both above 50 and rising, and dark red when below 50 and falling.
It includes a full suite of alert conditions (divergences and MA crossovers) so you can automate your trading or get pinged when a setup occurs.
In summary, it's designed to replace 3 or 4 different indicators on your chart by giving you adaptive momentum, dynamic exhaustion zones, trend direction, and divergence signals all natively in one branded, professional package. Indicator

DAX Universe Relative Strength [JS]DAX Universe Relative Strength
This indicator compares the current stock with an equal-weighted German stock market benchmark consisting of DAX, MDAX, SDAX and TecDAX.
Instead of comparing a stock only with one single index, the script creates a broader DAX Universe benchmark by calculating the average performance of the four major German equity indices over a selected lookback period.
The goal is to identify whether a stock is showing relative strength or relative weakness versus the broader German stock universe.
How it works:
1. The script measures the performance of the current stock over the selected comparison period.
2. It measures the performance of DAX, MDAX, SDAX and TecDAX over the same period.
3. It calculates the equal-weighted average performance of these four indices.
4. It compares the stock’s performance with this benchmark.
5. The result is plotted as a relative strength line.
Interpretation:
- RS above 0:
The stock is outperforming the DAX Universe benchmark.
- RS below 0:
The stock is underperforming the DAX Universe benchmark.
- RS above its moving average:
Relative strength is improving.
- RS below its moving average:
Relative strength is weakening.
- Strong RS signal:
The stock is above the benchmark, above its RS moving average, and the RS moving average is rising.
This indicator is designed as a filter, not as a standalone buy or sell signal.
For pullback and swing trading, I use it to identify stocks that are stronger than the broader German market. A strong RS reading does not mean that a stock should be bought immediately. It only means that the stock deserves attention and may be worth adding to a watchlist.
A complete trade setup should also include:
- constructive trend structure
- price above important moving averages
- controlled pullback
- declining selling pressure
- clear pivot or trigger
- defined stop-loss
- attractive risk/reward ratio
The indicator includes:
- relative strength line
- moving average of the RS line
- zero line
- histogram
- background highlighting
- interpretation label
- alert conditions for RS changes
Suggested use cases:
- screening German stocks
- comparing DAX, MDAX, SDAX and TecDAX stocks
- identifying potential market leaders
- filtering pullback candidates
- avoiding stocks with persistent relative weakness
Important:
This script is for educational and analytical purposes only. It does not provide investment advice, buy signals or sell signals. Always combine relative strength analysis with your own chart analysis, risk management and trading plan. Indicator

[Viprasol] Real Relative StrengthOverview
This indicator is based on the open-source "Real Relative Strength" (RRS) concept, which measures how an asset is performing against a benchmark after normalising for volatility. The original plots ATR-normalised relative momentum versus a benchmark (e.g. SPY) with zero-cross arrows and strong/weak zones. This version keeps that calculation and adds RRS/price divergence detection, a second-benchmark agreement filter, a signal cooldown, an RRS acceleration read, and a compact dashboard.
How It Works
Real Relative Strength (from original concept):
Relative momentum = (asset momentum − benchmark momentum) / average ATR × multiplier, where momentum is close − close for both the asset and the benchmark, and the divisor is the average of the asset and benchmark ATR. The result is smoothed with an EMA. Positive = the asset is outperforming the benchmark on a volatility-adjusted basis; negative = underperforming. Strong/weak zones mark RRS beyond a configurable level.
Divergence (new):
Using pivots on the smoothed RRS, a bearish divergence is flagged when RRS makes a lower pivot high while price makes a higher high; bullish when RRS makes a higher pivot low while price makes a lower low.
Second-Benchmark Agreement (new):
Optionally compute RRS against a second benchmark and only confirm a zero-cross when both agree in sign — a confluence filter against single-benchmark noise.
Signal Cooldown (new):
A minimum bar gap between confirmed zero-cross signals to prevent clustering.
RRS Acceleration (new):
The bar-to-bar change in smoothed RRS, shown as a rising/falling momentum read in the dashboard.
What Is Original (Viprasol Additions)
1. RRS/price divergence detection (regular bullish and bearish).
2. Optional second-benchmark agreement filter on zero-cross signals.
3. Signal cooldown.
4. RRS acceleration (momentum-of-RRS) state.
5. Compact relative-strength dashboard.
Key Features
From the Original:
- ATR-normalised relative strength vs a benchmark
- EMA smoothing, zero-cross arrows, strong/weak zones, extreme background tint
Added in This Version (Viprasol):
- Divergence detection, dual-benchmark agreement, cooldown, acceleration read, dashboard
- Six alerts with dynamic {{ticker}}/{{close}}/{{interval}} messages
How to Use
1. Set the benchmark to match your asset class (SPY/QQQ stocks, IWM small-caps, BTCUSD crypto).
2. Above zero (aqua/green area) = outperforming; below zero (red area) = underperforming.
3. Zero-cross arrows mark fresh shifts; circles mark divergences; the strong/weak zones flag standout strength.
Recommended Starting Points:
- Intraday (15m-1H): Length 10-14
- Swing (Daily/4H): Length 14-20
- Use dual-benchmark agreement for higher-conviction crosses
These are starting points only — backtest and adjust before trading live.
Settings
Core: benchmark symbol, momentum length, ATR multiplier, RRS smoothing.
Confluence & Filters: 2nd-benchmark agreement (+ symbol), signal cooldown, strong/weak zone level.
Divergence: detect divergence toggle, pivot length.
Visuals: zero-cross arrows, RRS line, RRS area.
Dashboard: toggle and position.
Alerts
1. Bullish Cross — now outperforming the benchmark
2. Bearish Cross — now underperforming the benchmark
3. Strong Outperformance — RRS beyond the strong level
4. Strong Underperformance — RRS below the weak level
5. Bullish Divergence — RRS/price bullish divergence
6. Bearish Divergence — RRS/price bearish divergence
All alerts include {{ticker}}, {{close}}, and {{interval}}.
Limitations & Disclaimer
- RRS uses request.security for the benchmark; benchmark data quality and session alignment affect readings, especially across asset classes/exchanges.
- Divergence uses confirmed pivots, which lag by the pivot length.
- Relative strength shows leadership, not absolute direction — a rising RRS in a falling market only means the asset is falling less.
- Past performance does not guarantee future results. This indicator is for educational purposes only and is not financial advice. Always use proper risk management and test on historical data before trading live.
Credits & Attribution
Based on the open-source "Real Relative Strength" concept (community / SMB-style), which provided the ATR-normalised relative-momentum calculation, EMA smoothing, zero-cross signals, and strong/weak zones. Added by Viprasol: RRS/price divergence detection, optional second-benchmark agreement, signal cooldown, RRS acceleration, and the dashboard.
Published open-source per PulseWire House Rules.
Indicator

Path Signature Regime Engine# Path Signature Regime Engine (PSRE)
**What it does**
Path Signature Regime Engine reads the *geometry* of recent price action and
labels the current market state as **Trending up**, **Trending down**,
**Range / chop**, or **Turning (reversion)**. Instead of smoothing price with a
moving average, it measures the shape of the path itself using the low-order
**path signature** — a description of a curve by its iterated integrals from
rough-path theory.
Two terms do the work:
- **Level 1 — drift:** the net displacement of the path over a lookback window.
- **Level 2 — Lévy area:** the signed area the path sweeps relative to its own
chord. A path that keeps curling the same way (a trend) accumulates area; a
path that oscillates back and forth (a range) cancels it out. The sign and
size of this area is the core regime signal.
Both terms are turned into 0–100 percentiles over a rolling window, so the read
adapts to each symbol and timeframe automatically.
**How it works (one method, three views — not a mashup)**
This is deliberately **not** a bundle of independent indicators stitched
together. Every component calls the same internal routine that computes the
drift + Lévy-area read. The "extra" layers are that single computation pointed
at different data:
- **Chart timeframe** — the primary regime read.
- **Multi-timeframe confluence** — the *identical* read evaluated on two higher
timeframes (default 1H and 4H). It is reported as **agreement** ("aligned
2/3"), explicitly *not* as independent confirmation, because nested
timeframes share information. "Aligned" requires at least two of the three
views to agree with the chart.
- **Cross-asset comparison** — the same iterated-integral area computed between
*two return streams* (your symbol and a benchmark) instead of price-vs-time.
This yields a geometric lead/lag read plus a relative-strength sign.
Because the higher-timeframe and cross-asset views are projections of one
geometric primitive rather than separate tools, they reinforce a single
conclusion: what is the path doing, and does that hold up when seen from a
slower clock or against a related instrument.
**The honesty layer (why this differs from a typical regime indicator)**
Markets are noisy, so the engine carries its own reality checks rather than
asking you to take the colours on faith:
- **In-sample base rates** — for each regime it tracks, on the history loaded
on your chart, how often price actually continued over a chosen horizon, with
sample counts shown.
- **"Aligned vs not"** — a side-by-side that can reveal the multi-timeframe
layer adding *nothing* on a given instrument (if the two numbers are equal,
alignment isn't helping — and the panel will tell you so).
- **Transition log** — a table of recent regime flips with their realised
forward return (in ATR units) and a ✓/✗ result. With one toggle it also
emits `log:*` series so you can right-click → *Export chart data* and study
the full transition history offline.
These are descriptive statistics on past data, not predictions.
**How to use it**
1. Add it to any chart. It reads the chart's own symbol, so it works on any
market — equities, futures, FX, crypto, indices.
2. Defaults are tuned for **NIFTY** (benchmark `NSE:BANKNIFTY`, same trading
session). For any other asset, open settings group **4 · Cross-asset
comparison** and set a benchmark that trades in the *same hours* as your
instrument, and adjust the two higher timeframes in group **3** relative to
your working timeframe.
3. Read the panel top-down: regime → strength → bias → path quality →
timeframe agreement → relative strength → flow tilt → base rates.
4. Treat the output as **context**, not a trade trigger. The base-rate rows are
there so you can judge, per instrument and timeframe, whether the read has
any historical edge before relying on it.
5. Optional alerts fire on a new reversion setup and on any regime change.
**Inputs are organised in workflow order:** Data & source, Signature engine,
Multi-timeframe confluence, Cross-asset comparison, Regime base-rate study,
Transition log, Appearance. The panel theme adapts to your chart background
luminance for readability on light or dark themes.
**Concept credits**
The mathematics is not mine; the implementation and the regime/honesty
framework are. Path signatures and the Lévy-area interpretation come from the
rough-path and signature-method literature:
- K.-T. Chen — iterated integrals (1957).
- T. Lyons — rough-path theory and the path signature (1998).
- I. Chevyrev & A. Kormilitzin — *A Primer on the Signature Method in Machine
Learning*.
- J. Morrill, A. Fermanian, P. Kidger & T. Lyons — *A Generalised Signature
Method for Time Series* (the basepoint + time augmentation used here).
Only the interpretable Levels 1–2 are computed directly from cumulative sums.
This is a descriptive geometric read, not a full signature and not a machine-
learning model.
---
## Disclaimer (include at the end of the description)
This script is an educational and analytical tool. It is **not financial
advice**, not a recommendation to buy or sell, and not a signal service. All
statistics it shows (base rates, transition forward returns) are **in-sample**,
computed close-to-close on the history loaded on your chart, with no execution
costs or slippage, and are **not** a backtest and **not** a forecast. Past
behaviour does not guarantee future results. Test thoroughly and trade your own
plan and risk.
Indicator

Stock: Comparison Dashboard [invincible3]Stock: Comparison Dashboard
**Stock: Comparison Dashboard ** is a fundamental and market-strength comparison tool designed to compare two stocks side by side directly on the PulseWire chart.
The dashboard helps traders and investors quickly evaluate which stock is stronger across multiple financial dimensions, including growth, income statement strength, profitability, valuation, cash flow quality, financial strength, liquidity, dividend quality, and relative price strength.
Key Features
1. Two-Stock Comparison
Select any two symbols and compare their financial metrics side by side. The dashboard displays both raw values and category-based scores.
2. Fundamental Metrics
The indicator includes a wide set of financial metrics, such as:
* Revenue growth
* EPS growth
* Total revenue
* Operating income
* Net income
* Margins
* Return on equity
* Price-to-earnings ratio
* Price-to-sales ratio
* Free cash flow
* Debt ratios
* Current ratio
* Dividend yield
* Dividend payout ratio
3. Category Scores
The dashboard calculates separate comparison scores for:
* Growth Score
* Income Score
* Profitability Score
* Valuation Score
* Cash Flow Score
* Financial Strength Score
* Liquidity Score
* Dividend Score
* Relative Strength Score
4. Proportional Scoring System
The scoring system uses proportional comparison instead of simple winner-take-all logic.
For example, if one stock has 16% growth and another has 18% growth, the weaker stock does not receive 0. Instead, both stocks receive proportional scores based on how close their values are.
This makes the dashboard more realistic and useful for financial analysis.
5. Relative Strength Score
The Relative Strength Score compares the market performance of both stocks using:
* 3-month price performance
* 6-month price performance
* 12-month price performance
* Position within the 52-week range
* Distance from the 200-day moving average
This helps identify which stock has stronger market momentum.
6. Better / Weaker Value Highlighting
Better and weaker values are highlighted using text color instead of heavy background coloring. This keeps the table cleaner and easier to read.
7. Light and Dark Table Themes
The dashboard includes both light and dark table themes, making it suitable for different PulseWire chart layouts.
8. Customizable Rows
Each category allows the user to choose which metrics to display. Unwanted rows can be set to “None” to keep the dashboard clean.
How to Use
1. Select Stock 1 and Stock 2 from the indicator settings.
2. Choose the financial period: Quarter or Year.
3. Select the metrics you want to compare in each category.
4. Choose Light or Dark table theme.
5. Read the raw values and comparison scores to identify the stronger stock.
Interpretation
A higher score means the stock is stronger in that specific category.
Example:
* Higher Growth Score = stronger growth profile
* Higher Profitability Score = better profitability
* Higher Valuation Score = more attractive valuation
* Higher Financial Strength Score = stronger balance sheet
* Higher Relative Strength Score = stronger market momentum
Important Notes
This indicator uses PulseWire financial data. Some financial fields may be unavailable for certain stocks, exchanges, or periods. If a metric is unavailable, the table may show a dash.
PulseWire also has request limits, so the dashboard is designed to keep the number of active financial rows under control.
This indicator is intended for research, comparison, and educational analysis only. It is not financial advice. Always combine fundamental analysis with your own research, risk management, and market context.
Indicator

Momentum Leader ATR Risk MapMomentum Leader ATR Risk Map is a position-management indicator designed to help traders visualize where a leading stock is trading relative to its 50-period SMA and ATR-based extension levels.
The goal is not to generate automatic buy or sell signals. Instead, this tool provides a structured risk map for momentum leaders by combining:
• ATR extension from a configurable SMA baseline
• Positive extension bands for profit-taking and risk management
• Negative extension bands for pullback, add-zone, and damage-control reference levels
• Relative strength scoring versus a benchmark such as SPY
• SMA trend status
• Optional liquidity, sector RS, and industry RS filters
• Nearest upside and downside map levels shown directly in the table
By default, the indicator uses a Daily anchor and 50-period SMA baseline, making it suitable for swing trading and longer-term position management in momentum leaders. A 24-hour / 1440-minute anchor is also available for users who prefer to evaluate instruments with extended-hours or near-24-hour trading behavior.
Core Risk Map Levels:
Positive Extension Zones:
• +2.95x ATR: High-RS leader zone
• +4.56x ATR: Super momentum zone
• +5.27x ATR: Approximate 2σ risk zone
• +7.83x ATR: Approximate 3σ profit zone
• +10.00x ATR: Extreme / trail-only zone
Negative Extension Zones:
• -1.00x ATR: Pullback
• -2.00x ATR: Add zone
• -3.00x ATR: Deep pullback
• -4.56x ATR: Damage control
• -5.27x ATR: Washout / reclaim-needed zone
The table is designed to answer a few practical questions quickly:
• Is the stock still acting like a leader?
• Is price extended, normal, or damaged relative to the SMA/ATR map?
• Is the SMA trend still constructive?
• Is relative strength still intact across multiple lookback windows?
• Where is the nearest upside ATR map level?
• Where is the nearest downside ATR map level?
Relative Strength Logic:
The RS Score compares the current symbol against a user-selected benchmark over 21, 63, 126, and 252 anchor bars. A score of 4 of 4 means the symbol is outperforming the benchmark across all four lookback windows.
Optional Advanced Inputs:
The indicator includes optional sector and industry RS inputs for users who want to manually compare the stock against relevant ETFs such as XLK, SMH, IGV, XBI, XLE, XLF, or other sector/industry proxies. These are turned off by default to keep the tool frictionless.
A liquidity filter is also available, but it is turned off by default so the indicator can remain focused on the risk map itself.
Credit and Inspiration:
This indicator was inspired by concepts shared by several market educators and traders:
• Jeff Sun / @jfsrev
x.com
• @i_manage_risk
x.com
• StratLab / @StratLaboratory
x.com
Their publicly shared work on relative strength, momentum leadership, ATR extension frameworks, risk management, and scaling into or out of leaders helped shape the conceptual foundation for this tool.
This script is an independent implementation. It is not affiliated with, sponsored by, or endorsed by Jeff Sun, @i_manage_risk, StratLab, or @StratLaboratory, and it is not intended to replicate their complete methodologies.
Suggested Use:
This indicator is best used as a position-management overlay for stocks that have already been identified as potential leaders through a separate screening process. It can help define areas where the stock may be:
• Acting normally within a leadership trend
• Becoming extended into profit-taking zones
• Pulling back toward constructive support
• Losing momentum or entering damage-control territory
Important Notes:
ATR extension levels are reference zones, not guaranteed targets or support/resistance levels. A stock can remain extended for longer than expected, especially during strong momentum regimes. Conversely, deep pullbacks can signal deterioration rather than opportunity if leadership and trend structure are no longer intact.
Use this tool alongside broader market context, earnings risk, volume behavior, trend structure, and personal risk-management rules.
This indicator is for educational and informational purposes only and does not constitute financial advice. Indicator

STWP Market MatrixOverview
STWP Market Matrix is a multi-factor market dashboard designed to consolidate several commonly used technical concepts into a single visual framework.
Most technical indicators focus on one aspect of market analysis, such as trend, volume, volatility, or support and resistance. STWP Market Matrix combines these factors into a structured dashboard so traders can evaluate market conditions from multiple perspectives without switching between several indicators.
The objective is not to generate buy or sell signals, but to provide a quick and organized view of trend direction, participation, relative strength, volatility conditions, and key market reference levels.
________________________________________
Why This Indicator?
Market decisions are often influenced by multiple factors rather than a single indicator. A stock may show a bullish trend but weak participation, strong volume but poor relative strength, or favorable structure while trading below key reference levels.
STWP Market Matrix brings together:
• Trend Analysis (EMA Structure)
• VWAP Positioning
• Buyer vs Seller Participation
• Volume Assessment
• Market Structure Analysis
• Multi-Timeframe Confirmation
• Relative Strength vs NIFTY
• Daily Volume Context
• Pivot Reference Levels
• Volatility Assessment
into one dashboard to help users evaluate these conditions simultaneously.
________________________________________
Dashboard Components
Trend
Trend is determined using Fast and Slow Exponential Moving Averages (EMA).
Bullish: Fast EMA above Slow EMA
Bearish: Fast EMA below Slow EMA
This provides a simple directional bias.
________________________________________
VWAP
Displays whether price is trading above or below the Volume Weighted Average Price (VWAP).
VWAP is commonly used by traders to assess intraday strength and market positioning.
________________________________________
Buyers & Sellers
These metrics evaluate the balance between bullish and bearish candle pressure.
The goal is to provide a simple visual indication of whether buyers or sellers currently have greater influence on price movement.
________________________________________
Volume
Current volume is compared against average volume to identify participation levels.
Higher-than-average volume may indicate stronger market participation, while lower volume may suggest reduced activity.
________________________________________
Market State
The indicator classifies market conditions into:
Breakout
Breakdown
Range
based on recent price structure and historical highs/lows.
________________________________________
Price Structure
Price structure evaluates whether the market is producing:
Higher Highs and Higher Lows
Lower Highs and Lower Lows
Sideways Conditions
This provides additional context beyond simple trend analysis.
________________________________________
Multi-Timeframe Alignment
The dashboard evaluates whether higher timeframe EMA conditions support the current chart timeframe.
This helps identify whether trends are aligned across multiple timeframes.
________________________________________
Relative Strength (RS)
Relative Strength compares the selected symbol against the NIFTY Index.
Possible interpretations:
Outperforming
Underperforming
This helps identify whether a symbol is displaying relative leadership or weakness compared to the broader market.
________________________________________
Daily Volume
Daily volume is compared against its historical average to provide additional participation context.
________________________________________
Pivot Reference Framework
The dashboard includes classic pivot calculations based on the previous trading session's:
High
Low
Close
Displayed levels include:
Pivot
R1 to R5
S1 to S5
These levels are intended as objective reference zones that may help identify potential areas of support, resistance, reaction, or expansion.
The levels are not intended as price targets or predictions.
________________________________________
STWP Matrix Panel
Grade
A composite score derived from:
Trend Alignment
VWAP Position
Volume Participation
Relative Strength
Multi-Timeframe Confirmation
Grades range from D to A+.
Higher grades indicate stronger alignment among the evaluated factors.
________________________________________
Flow
Flow evaluates participation bias using candle position and volume behavior.
Possible states:
Accumulation
Distribution
Balanced
________________________________________
Energy
Energy evaluates volatility conditions using:
Bollinger Band Width
Average True Range (ATR)
Possible states:
Building
Normal
Exploding
This can help identify periods of contraction and expansion.
________________________________________
Risk
Risk provides a simplified assessment of current market conditions using momentum and volatility characteristics.
Possible states:
Low
Medium
High
________________________________________
Opportunity
Opportunity summarizes overall market conditions based on the dashboard's underlying factors.
Possible states:
Excellent
Good
Average
Avoid
This metric is intended to provide context and should not be interpreted as a trading recommendation.
________________________________________
Suggested Workflow
A possible workflow for using the dashboard:
Review Trend and VWAP alignment.
Evaluate Market State and Price Structure.
Check Relative Strength versus NIFTY.
Assess volume participation.
Review Pivot and Support/Resistance levels.
Evaluate Grade, Flow, Energy, Risk, and Opportunity readings.
Combine observations with personal analysis, trade planning, and risk management.
________________________________________
Limitations
The indicator relies entirely on historical price and volume data.
Pivot levels are reference zones and not guarantees of future market reactions.
Relative Strength readings may vary across instruments and timeframes.
Market conditions can change rapidly during periods of elevated volatility.
No technical indicator can predict future price movement with certainty.
The dashboard should be used as an analytical aid rather than a standalone decision-making system.
________________________________________
Disclaimer
This script is provided strictly for educational and informational purposes.
The indicator does not provide investment advice, research reports, trading recommendations, portfolio management services, or buy/sell calls.
All calculations are derived from historical price and volume data and are intended solely to assist technical analysis.
Users should conduct their own independent research, analysis, and risk assessment before making any trading or investment decisions.
Past performance does not guarantee future results. Financial markets involve risk, and losses may occur.
For users subject to SEBI regulations, this indicator should not be interpreted as a recommendation, solicitation, stock tip, investment advisory service, or research report.
Any trading or investment decision remains solely the responsibility of the user.
© Simple Trade With Patience (STWP)
Indicator

Explainable Quant Scorecard [TradeDots]Explainable Quant Scorecard
Summary
This indicator computes a composite 0 to 100 evidence score by combining seven independent normalized sub-scores: Trend, Momentum, Volatility Regime, Participation, Relative Strength, Exhaustion Risk, and Multi-Timeframe Alignment. The composite is regime-dependent: when ADX indicates a trending regime, the trend and momentum weights are boosted; when ADX indicates a range regime, the exhaustion-risk weight is boosted instead. All factor weights are exposed as inputs so the model is fully auditable and tunable. A flagship dashboard panel displays every sub-score, the composite, the active regime, and a one-line interpretation.
The intent is to give traders a transparent multi-factor reading on every bar rather than another single-indicator signal. The composite is an evidence score, not a probability or prediction.
What is original here
Composite indicators that mash several oscillators together exist in the public library. This script's contributions are:
Honest factor separation. Each sub-score measures a different dimension (trend, momentum, volatility, participation, relative strength, exhaustion, multi-timeframe). Many composites silently combine correlated readings (such as two momentum oscillators) and present the result as if it were multi-factor confirmation. This script's seven factors are deliberately chosen to be diverse.
Regime-dependent weighting. The composite is not a fixed weighted average. When the market is trending, trend and momentum factors carry more weight; when ranging, exhaustion-risk carries more. This addresses the well-known problem that trend-following inputs and mean-reversion inputs should not be weighted equally in all conditions.
Sub-score divergence detection. The script tracks the maximum deviation of any sub-score from the composite. A large deviation triggers a "sub-score divergence" alert, warning the trader that the factors disagree even when the composite looks clean.
Full transparency. All weights, all thresholds, and the regime trigger levels are user inputs. No black-box.
How it works
Each bar, seven sub-scores are computed.
1. Trend score. EMA slope over a configurable lookback, normalized to 0 to 100 via min-max over a percentile window.
2. Momentum score. Rate-of-change of close over a configurable length, min-max normalized.
3. Volatility regime score. Bollinger Bandwidth percentile mapped to a discrete numeric: compressed BBW (below the lower threshold) maps to 30, expanding BBW (above the upper threshold) maps to 70, normal BBW maps to 50. A label ("Compressed", "Normal", "Expanding") is generated alongside the numeric.
4. Participation score. Volume percentile multiplied by a close-location alignment factor. For a bullish-direction reading, a close near the bar's high earns full alignment; for a bearish-direction reading, a close near the bar's low. The result is a 0 to 100 score that rewards volume and direction-consistent closes.
5. Relative strength score. The asset's return over a configurable horizon, minus the benchmark's return over the same horizon, divided by the asset's own volatility. The result is percentile-ranked over a longer lookback (default 252 bars) to produce a 0 to 100 reading. The benchmark symbol is a user input.
6. Exhaustion risk score. Distance from the trend EMA in ATR units, mapped inversely to 0 to 100 (high exhaustion gives a low exhaustion-score, which is consistent with the convention that high scores are "good" for the composite). The dashboard inverts the label so users see "Exhaustion: High" rather than "Exhaustion: 20".
7. Multi-timeframe alignment score. The trend direction (EMA-fast vs EMA-slow) is fetched at three user-configurable higher timeframes. Each HTF's agreement with the chart-timeframe direction contributes 100, 50, or 0 to the alignment score. The final factor is the average across three timeframes.
The composite is the weighted average. When regime_weighting is enabled and ADX indicates a trending regime (above the user threshold), the trend and momentum weights are multiplied by 1.5 and the exhaustion-risk weight by 0.5. When ADX indicates a range regime (below the lower threshold), the trend and momentum weights are multiplied by 0.5 and the exhaustion-risk weight by 1.5. In a "Mixed" regime, weights are unchanged.
A four-line interpretation is assigned by composite range:
75 or higher : "Constructive, multi-factor agreement"
60 to 74 : "Mixed but constructive"
40 to 59 : "Mixed — wait for alignment"
below 40 : "Bearish or unclear"
Repainting and data integrity
All sub-scores are computed on confirmed bar values. Alerts are gated by barstate.isconfirmed. The benchmark and the three multi-timeframe trend references are fetched with request.security() using prior-bar sources together with barmerge.lookahead_on — the standard non-repainting idiom that returns the last confirmed value from the requested context. These calls do not access future data.
How to read the chart
The composite is plotted as a line in the indicator pane, color-shifted on a red-to-green gradient based on the score.
Horizontal reference lines at 25, 50, and 75 demarcate bearish, midpoint, and bullish zones.
Sub-score plots are available but off by default to keep the pane clean. They can be enabled via input toggle.
The dashboard panel shows the direction in the header, then a row for each of the seven sub-scores (numeric or labelled), then a divider, then the composite score, then the interpretation line and the active regime.
Inputs
Inputs are grouped into seven sections.
Core Settings : trend EMA lengths and norm lookback, momentum ROC length, generic norm lookback, BB length and multiplier, ATR length, ADX length.
Relative Strength : benchmark symbol, RS return horizon, RS volatility length, RS percentile lookback.
Multi-Timeframe : three HTF inputs (default 60-minute, 240-minute, daily).
Factor Weights : a 0 to N weight for each of the seven sub-scores.
Regime Modulation : regime-weighting enable toggle, trend ADX threshold, range ADX threshold.
Visual Settings : dashboard toggle, panel position, panel size, panel background color, composite-plot toggle, sub-score-plot toggle.
Any Alert() function call conditions : per-alert toggles.
Alerts
Four alert conditions are provided:
Score ≥ 75 Bullish (composite at or above 75 with trend direction up)
Score ≥ 75 Bearish (composite at or above 75 with trend direction down)
Score Regime Flipped (composite crossed the 50 midpoint in either direction)
Sub-Score Divergence (any sub-score moves more than 30 points from the composite — a warning that factors disagree)
Each is declared via alertcondition() and fired programmatically through alert() when the corresponding input toggle is enabled, with alert.freq_once_per_bar_close. Alert messages include {{ticker}}, {{interval}}, and {{close}} placeholders.
How to use this script
Read this indicator as your master "is the evidence stack constructive" check, not as an entry trigger.
A composite of 75 or higher with trend direction up is the suite's highest-conviction long setup; the inverse for shorts.
Read the regime cell. In a trending regime, weight your decision toward the trend and momentum sub-scores. In a range regime, weight toward exhaustion risk and relative strength.
If the dashboard shows a high composite but the "Sub-Score Divergence" alert is firing, the agreement is shallow — investigate which factor disagrees before sizing up.
Pair with a setup-specific indicator (sweep, breakout, zone) for entry timing. This script does not give entries.
Limitations and honest caveats
The composite is a weighted heuristic combination of normalized factors, not a calibrated probability. A composite of 80 does not imply an 80% probability of any outcome.
Regime detection uses ADX, which is lagging. The regime label will not reflect a fresh regime change on the first bar.
The Relative Strength benchmark is a single symbol chosen by the user. Choosing an inappropriate benchmark (for example, comparing a small-cap stock to a crypto-currency benchmark) will produce noisy RS readings.
The three MTF references add request.security() calls. On instruments without history at those timeframes, the MTF score may be incomplete on early bars.
Composite values pin to one tail when factor weights are mis-configured. The default weights are reasonable starting values; users are expected to tune for their instrument and timeframe.
The script makes no claim about which direction price will move; it scores the evidence stack currently visible.
Disclaimer
This script is published for informational and educational purposes. It is not investment advice and is not a recommendation to buy or sell any instrument. Composite evidence scores are descriptive, not predictive. Users are solely responsible for their own trading decisions and risk management.
Indicator

Artemis Adaptive RSI🟦 Artemis Adaptive RSI is a Pine v6 self-tuning RSI workbench. Instead of shipping with a fixed period and fixed thresholds — and forcing the trader to babysit the inputs across regimes (14 / 70 / 30 on stocks, 7 / 80 / 20 on crypto, 21 / 60 / 40 in trends) — a 60-candidate optimisation grid scores Supersmoother-filtered RSI variants against their own forward-return performance on a rolling window, then picks the variant whose threshold trips deliver the cleanest mean-reversion edge on the current market. The active period, smoothing, and OB / OS thresholds update online, and a five-state regime label tells you why the optimiser chose what it chose.
The indicator integrates seven analytical layers — Supersmoother-filtered RSI core, online candidate optimiser, hysteresis-locked regime classifier, Stochastic-Extreme-style multi-band zone visual, pivot-based Regular + Hidden divergence detection with a Smart AI Filter, adaptive trigger markers, theme-adaptive bar painter, and a PRO 8-row dashboard — each operating independently and rendered on a single, clean oscillator panel.
🟦 CREDITS & ATTRIBUTION
The adaptive optimisation CORE — Supersmoother-filtered RSI fleet, rolling-window incremental scorer, champion selection with hysteresis, and the five-state regime classifier — is derived from the open-source work of **GoodBadBitcoin** and published under the same MPL-2.0 license. Full respect to the original author for the design and the open release; this project would not exist without that groundwork.
- Source script — [Adaptive Modern RSI ]()
- Original author — (www.pulsewire.com)
Everything else — the Stochastic-Extreme-style multi-band zone UI, the twelve-theme palette system, the pivot-based divergence engine, the Smart AI Filter, the PRO dashboard, the hover-tooltipped regime badge, the theme-aware bar painter, and the curated nine-channel alert pack — is original work added on top.
🟦 HOW THE CORE ENGINE WORKS
**Supersmoother**
Each bar, the per-bar close change is split into two streams — positive (gains) and negative (losses) — and each stream is fed through an Ehlers two-pole Butterworth low-pass filter. The Supersmoother removes high-frequency noise without piling on the phase lag that naive EMA / RMA pre-smoothing chains accumulate. The filtered gain / loss streams then feed the classical Wilder RSI ratio:
rsi = 100 − 100 / (1 + smoothedGains / smoothedLosses)
**Candidate Fleet**
15 RSI variants are precomputed in parallel — every combination of:
| Axis | Values |
|---|---|
| RSI length | 7 / 10 / 14 / 21 / 28 |
| Supersmoother smoothing | 6 / 10 / 16 |
Combined with 4 threshold tiers (15-85 / 20-80 / 25-75 / 30-70), this gives the 60-slot fleet the optimiser grades against.
**Online Optimiser (Rolling-Edge Scorer)**
Every bar, each of the 60 slots is evaluated:
1. **Trigger detection** — for the slot's threshold pair, did the bar produce an OS-entry (RSI crossed down through OS) or an OB-exit (RSI crossed back down through OB)?
2. **Forward-return scoring** — if a trigger fired, score it by `close / close − 1` (signed by trigger direction).
3. **Rolling bookkeeping** — each slot maintains its own running mean over a sliding `scoreWindow`-bar window. Returns enter on add, exit on subtract, mean recomputed in O(1) per slot per bar — no rescans, no naive sum-of-products drift.
After every bar's update, the slot with the highest mean return wins — subject to two gates:
- **Min Triggers per Candidate** — under-sampled slots are disqualified
- **Switch Margin (%)** — a new champion must beat the current incumbent by this hysteresis margin before it actually takes over
This protects against bar-by-bar leadership flapping when two candidates trade marginal scores.
**Regime Classifier**
The crowned champion's shape (length-index, smoothing-index, level-index, mean-return) is read each bar and the market is tagged as one of five phases:
| Glyph | Phase | Meaning |
|---|---|---|
| ◐ | Adapting | Cold start — optimiser not yet armed (default RSI in use) |
| ✸ | Noisy | Score collapsed, no exploitable edge — sit out |
| ➜ | Trending | Long period + relaxed thresholds — trend dominates, avoid OB/OS reversals |
| ▣ | Range | Short period + strict thresholds — RSI's sweet spot, triggers reliable |
| ⊠ | Calm | Middling parameters — mild swings, use as light confluence |
The raw tag stream is then locked through a two-stage hysteresis machine: the displayed phase only updates after the underlying classification holds for `Regime Confirmation Bars` in a row. This keeps the floating badge from twitching on every minor optimiser jitter.
🟦 MULTI-BAND ZONE UI
A Stochastic-Extreme-style six-band visual at 100 / 80 / 70 / 50 / 30 / 20 / 0. The active OB / OS thresholds overlay as steplines that move as the optimiser updates. Zone fills key off the *adaptive* thresholds so the visual escalation tracks the actual signal logic, not a fixed 70 / 30 line.
The fills are tiered — when the RSI line plus the live champion's mean-return both confirm a zone state, the fill intensifies; otherwise the band shows a lighter tint. The 40 / 60 reference dotted lines and the 50 zero line are decorative — they are NOT the triggers.
**RSI line colour**
| Zone | Colour |
|---|---|
| Above 60 | theme-bull (price-strength bias) |
| Between 40 and 60 | neutral |
| Below 40 | theme-bear (price-weakness bias) |
These 40 / 60 bands are FIXED — they are NOT the adaptive OS / OB. The adaptive thresholds drive the triggers; the 40 / 60 bands just colour the RSI line for at-a-glance bias reading.
🟦 TRIGGER MARKERS
Triangle markers fire at the bar of OS entry / OB exit on the *adaptive* thresholds — the events the optimiser is actually scoring:
- ▲ **OS Entry Trigger** — RSI just crossed down through the adaptive OS threshold (mean-reversion long opportunity)
- ▼ **OB Exit Trigger** — RSI just crossed back down through the adaptive OB threshold from above (rejection / short opportunity)
Markers use `location.absolute` with fixed Y coordinates (10 / 90) so they stay glued to the same visual spot every bar — no drift between candles, no shift when zone fills update. Each visible triangle is paired with an invisible `label.style_circle` carrying a hover tooltip with live RSI value, active threshold, active period, and active smoothing — `plotshape()` does not support tooltips natively, so the dual-track rendering is required for hover content.
🟦 DIVERGENCE DETECTION
Pivot-based detection for the four classical divergence flavours:
| Type | Price | RSI | Signal |
|---|---|---|---|
| Regular Bull (D▲) | Lower Low | Higher Low | Potential reversal up |
| Regular Bear (D▼) | Higher High | Lower High | Potential reversal down |
| Hidden Bull (H▲) | Higher Low | Lower Low | Uptrend continuation |
| Hidden Bear (H▼) | Lower High | Higher High | Downtrend continuation |
Pivots are sampled on raw price (high / low) using `Pivot Arm` bars on each side (symmetric). Each pivot bar's RSI value is read **dynamically from the current active RSI series** via bar-index lookup — so when the optimiser switches champions between pivots, the comparison stays internally consistent (both endpoints come from the SAME series). This is a subtle but critical fix vs. naive divergence ports.
Regular Divergence labels (D▲ / D▼) use bracketed glyphs with solid styling — these are the reversal signals.
Hidden Divergence labels (H▲ / H▼) use the same bracket scheme — these are the continuation signals.
Each label hovers a tooltip with the price change, RSI change, and the pivot bar distance.
**Smart AI Filter**
An optional pre-filter that rejects low-quality divergences before they render. Three independent gates:
1. **Min RSI Swing** — minimum RSI difference between the two pivots (default: 5 points). Drops noise-level differences where RSI barely moved between pivots.
2. **Min Price Swing (%)** — minimum price swing between pivots as a percentage of the recent (80 bars) price range (default: 0.3%). Drops divergences where price barely moved relative to recent volatility.
3. **Zone Confirmation** — RSI at the current pivot must sit in the matching adaptive reversion half:
- Bullish divergence → RSI ≤ midpoint(liveOs, 50) (moderate-to-deep oversold)
- Bearish divergence → RSI ≥ midpoint(50, liveOb) (moderate-to-deep overbought)
The zone gate is adaptive — it tightens or loosens as the optimiser updates the live OS / OB thresholds. This encodes the classical "best divergences form at extremes" rule using the live adaptive thresholds, not a fixed 30 / 70.
When the master toggle is OFF (default), all detected divergences render. When ON, only divergences that clear all three gates survive. The filter applies identically to both chart rendering and alert conditions — no mismatch between visual and alert signals.
🟦 REGIME BADGE
A floating label pinned to the LATEST bar, extending rightward into the chart's right-margin / future area. The `label.style_label_left` style places the arrow tip on the LEFT of the box so it visually "points back" to the active RSI data without overlapping the oscillator line.
The badge shows:
- **Glyph + phase name** (e.g. `▣ Range`)
- **Bars stable** (how long the current phase has held)
- **Action note** (e.g. "RSI's sweet spot — triggers work well")
The background colour pulls from the theme palette — Range = theme-bull tint, Trending = theme-bear tint, Adapting / Noisy = theme-neutral tint, Calm = theme-signal tint — so the badge meaning is reinforced by the palette consistency.
**Hover tooltip**
Hovering the badge surfaces a comprehensive phase legend explaining all five glyphs, what each means, what action to take in each, and how to read the "bars stable" counter.
**Position**
User-selectable: Top (y = 80, upper third), Middle (y = 50, centre, default), Bottom (y = 20, lower third). The Y resolver maps the dropdown onto fixed pane-fraction coordinates so the badge stays parked at the same visual spot regardless of RSI value.
🟦 BAR COLORING
Two mutually exclusive modes apply a state-driven colour to every price bar on the chart:
| Mode | Behavior |
|---|---|
| None | Leave bars untouched (default) |
| RSI Zone | Theme-bear when RSI in OB zone, theme-bull when in OS zone, theme-neutral otherwise |
Uses the *adaptive* OB / OS thresholds, not fixed 30 / 70. The bar painter pulls directly from the active threshold state — when the optimiser switches candidates, the bar colour rule updates accordingly with no lag.
🟦 DASHBOARD
A compact 2-column, 8-row PRO data panel renders on the last bar when enabled. Every value derives from variables already computed upstream, so the dashboard adds zero overhead until the final bar.
| Row | Left | Right |
|---|---|---|
| Header | Artemis A-RSI | ▲ OB / ▼ OS / ■ Neutral (current bias) |
| Phase | Phase | ◐ ✸ ➜ ▣ ⊠ glyph + name (current regime) |
| Period | Period | Active RSI length (e.g. 14) |
| Smooth | Smooth | Active Supersmoother smoothing (e.g. 10) |
| OS Level | OS | Active adaptive OS threshold (e.g. 20) |
| OB Level | OB | Active adaptive OB threshold (e.g. 80) |
| Score | Score | Champion's mean forward return (in %) |
| Last Div | Last Div | Most recent divergence within last 50 bars (D▲ / D▼ / H▲ / H▼ / —) |
**Theme-Adaptive Chrome**
The dashboard auto-inverts its layout based on the active theme:
- **Dark themes** (Tropic, Amber, Pastel, Cyber, Helios, Electric, Candy, Bloomberg, Solar, Royal): header and footer use a faint `thBull` tint, middle rows stay solid dark, text uses full-saturation `thBull`. Border uses `thBull` at 20% transparency for strong theme presence.
- **Light themes** (Midnight, Graphite): backgrounds flip to white, text stays `thBull` (which is itself dark on these themes), border uses `thBull` at 40% transparency.
This guarantees text legibility against every palette without per-theme manual tuning.
**Position & Size**
Six anchor slots (Top / Middle / Bottom × Left / Right) and four text sizes (Tiny / Small / Normal / Large).
🟦 COLOR THEMES
Twelve cohesive palettes, each resolving to four axis colors. The whole script reads through these four variables — nothing below the theme resolver references a raw hex literal, so a single dropdown selection drives every plot, fill, stepline, divergence line, dashboard cell and badge.
| Theme | Character | Bull | Bear |
|---|---|---|---|
| Tropic | Cyan steel + deep orange | #00bcd4 | #ff6d00 |
| Amber | Warm amber + indigo blue | #ff9800 | #e53935 |
| Pastel | Sky blue + soft lavender | #4fc3f7 | #9575cd |
| Cyber | Neon lime + hot crimson | #00e676 | #ff1744 |
| Helios | Bright gold + scarlet | #ffd600 | #ef5350 |
| Electric | Electric aqua + magenta | #00e5ff | #e040fb |
| Candy | Neon green + hot pink | #69F0AE | #FF4081 |
| Bloomberg | Terminal orange + cyan | #ff8c00 | #00b0ff |
| Solar | Solarized olive + crimson | #859900 | #dc322f |
| Royal | Imperial gold + deep purple | #ffd700 | #6a0dad |
| Midnight | Deep navy + dark crimson | #0d47a1 | #b71c1c |
| Graphite | Near-black + silver grey | #1a1a1a | #757575 |
🟦 ALERT SYSTEM
Seven user toggles drive nine alert messages, all using `alert.freq_once_per_bar_close`:
| Toggle | Alert(s) | Condition |
|---|---|---|
| OS Entry Trigger | OS Entry | RSI crossed down through adaptive OS |
| OB Exit Trigger | OB Exit | RSI crossed back down through adaptive OB |
| Regime Change | Phase Flip | Locked regime label updates (post-hysteresis) |
| Regular Divergence | D▲ + D▼ | Reversal divergences detected (respects Smart AI Filter) |
| Hidden Divergence | H▲ + H▼ | Continuation divergences detected (respects Smart AI Filter) |
| RSI Mid Cross Up | Mid ↑ | RSI crossed above 50 |
| RSI Mid Cross Down | Mid ↓ | RSI crossed below 50 |
Each alert fires through `alert()` so the message body carries live context — current RSI value, the active adaptive threshold that triggered, active period and smoothing, and (for Regime Change) the previous phase's hold duration. Divergence alerts respect the Smart AI Filter — if the filter is ON and a divergence is rejected visually, the alert will also not fire.
🟦 SETTINGS REFERENCE
**Visual**
- Theme — 12 palette options. Default: Tropic
**Adaptation Core**
- Optimization Lookback (bars) — 100–1000. Default: 300
- Forward-Return Eval Horizon — 2–20. Default: 5
- Min Triggers per Candidate — ≥ 2. Default: 5
- Switch Margin (%) — 0–50, step 2.5. Default: 10
**Regime Label**
- Show Regime Label — Toggle. Default: ON
- Regime Label Size — Tiny / Small / Normal / Large / Huge. Default: Normal
- Regime Confirmation Bars — 1–100. Default: 10
- Regime Label Position — Top / Middle / Bottom. Default: Middle
**Zones & Levels**
- Show Adaptive Levels — Toggle. Default: ON
- Show Zone Fills — Toggle. Default: ON
- Show Trigger Signals — Toggle. Default: ON
**Divergence**
- Regular Divergence — Toggle. Default: ON
- Regular Opacity — 0–100. Default: 80
- Hidden Divergence — Toggle. Default: ON
- Hidden Opacity — 0–100. Default: 80
- Pivot Arm — 2–50. Default: 5
- Label Size — Tiny / Small / Normal / Large. Default: Tiny
- Smart AI Filter — Master toggle. Default: OFF
- Min RSI Swing — 1.0–50.0. Default: 5.0
- Min Price Swing (%) — 0.1–5.0. Default: 0.3
- Require Zone Confirmation — Toggle. Default: ON
**Bar Coloring**
- Bar Color Mode — None / RSI Zone. Default: None
**Dashboard**
- Show Dashboard — Toggle. Default: ON
- Panel Position — 6 anchor slots. Default: Middle Right
- Panel Text Size — Tiny / Small / Normal / Large. Default: Small
**Alerts**
- OS Entry Trigger — Default: ON
- OB Exit Trigger — Default: ON
- Regime Change — Default: ON
- Regular Divergence — Default: ON
- Hidden Divergence — Default: OFF
- RSI Mid Cross Up — Default: OFF
- RSI Mid Cross Down — Default: OFF
🟦 COMPATIBILITY
Works on all asset classes and all timeframes in PulseWire Pine Script v6.
- Crypto: Spot, futures, perpetual contracts
- Forex: All pairs
- Equities: Stocks, ETFs, indices
- Commodities: Metals, energy, agriculture
- Timeframes: 1m through Monthly
Because the engine self-tunes its RSI period, smoothing, and OB / OS thresholds online, the same default settings work on a 5-second BTC chart and a weekly index chart without retuning. The optimiser sees the asset's actual reversion behaviour and adapts — no per-asset preset library needed.
🟦 TECHNICAL NOTES
- Pine Script v6
- `max_lines_count = 500`, `max_labels_count = 500`, `max_bars_back = 1000`
- No repainting — all values calculated on bar close. Pivot-based divergence results appear `Pivot Arm` bars late by design (standard Pine pivot confirmation behaviour)
- The adaptive RSI line is internally consistent across optimiser switches — divergence pivots read RSI dynamically via `activeRsi `, so both endpoints come from the SAME (current) RSI series even when the champion changes between pivots
- The Supersmoother filter relies on `var float lpY = 0.0` private state per call-site — Pine v6 issues one independent state slot per call-site, so the 15 fleet entries below produce 30 (15 × 2 streams) independent filter histories with zero cross-talk
- Champion switch is hysteresis-gated by `Switch Margin (%)` and an eligibility floor (`Min Triggers per Candidate`) — protects against bar-by-bar flapping when two candidates trade marginal scores
- Regime tag is doubly hysteresis-gated — first the candidate must hold, then the displayed phase only flips after `Regime Confirmation Bars` of stable tagging
- Trigger markers use `location.absolute` with fixed Y coordinates (10 / 90) for visual stability — no slide on zoom or candle-spacing changes
- Trigger marker tooltips piggy-back on invisible `label.style_circle` parallel renders — `plotshape()` does not natively support the `tooltip` argument
🟦 DISCLAIMER
This indicator is provided for educational and informational purposes only. It does not constitute financial advice. Past performance does not guarantee future results. Always conduct your own analysis and apply proper risk management. Indicator

Currency Strength RoC Panels (RoC Only) + TriggersCurrency Strength Slope (ROC)
Currency Strength Slope is a relative currency momentum indicator designed to measure and rank the rate of change across the major currency basket.
Instead of looking at one Forex pair in isolation, this indicator evaluates the underlying momentum of each major currency individually: EUR, USD, JPY, CHF, GBP, AUD, CAD, and NZD. By comparing currency strength movement across a full FX basket, it helps identify which currencies are accelerating, weakening, or showing meaningful shifts in relative momentum.
The goal is to provide a clearer view of currency flow, momentum rotation, and potential strength/weakness relationships across the market.
Features:
• Tracks RoC/momentum for 8 major currencies
• Includes EUR, USD, JPY, CHF, GBP, AUD, CAD, and NZD
• Uses a full FX basket comparison approach
• Customizable broker/feed selection
• Adjustable anchor timeframe and lookback
• Optional last-closed-bar mode for cleaner confirmed values
• Optional z-score normalization
• Ranking panel for strongest to weakest momentum
• Optional flag display
• Positive and negative trigger lines
• Fixed or auto StDev-based trigger thresholds
• Signal dots on trigger crosses
• Basket shift marker when leading currencies flip
• Zero line and top absolute RoC line options
Alerts Included:
• Any RoC Trigger Cross
• Basket Shift: Top 2 Absolute RoC Flip
Potential use cases:
• Identify the strongest and weakest currencies
• Find momentum rotation across the FX basket
• Spot currency acceleration and deceleration
• Confirm directional bias on Forex pairs
• Build strong-vs-weak pair ideas
• Detect major shifts in currency leadership
• Add confluence to existing Forex strategies
Interpretation:
Positive RoC
The currency is gaining momentum relative to the broader basket.
Negative RoC
The currency is losing momentum relative to the broader basket.
Ranking Panel
Shows which currencies are currently leading or lagging by momentum.
Trigger Crosses
Highlight when a currency’s momentum moves beyond a meaningful positive or negative threshold.
Basket Shift Marker
Appears when the top 2 currencies by absolute RoC flip direction, which may signal a broader shift in currency flow.
This indicator is intended to help traders move beyond single-pair analysis and understand the broader currency strength environment.
About TrendGenY Indicators
TrendGenY indicators are built from market experience, creative concepts, and a constant pursuit of unique perspectives. Rather than following conventional ideas, the focus is on uncovering alternative insights and viewing market behavior through different angles to reveal information that traditional tools may overlook and help traders build a more meaningful edge in the market. Indicator

Intermarket Confluence Engine | AnonycryptousIntermarket Confluence Engine (ICE) | Anonycryptous
Description & user manual
Why this indicator exists
Most indicators analyze one asset in isolation. They look at price, momentum, volume, or volatility — all on the same chart, all based on the same data feed. That is useful, but it leaves out the context that drives markets at a deeper level: the relationship between assets, the macro regime, the direction of capital flow across instruments.
ICE approaches the problem differently.
Instead of analyzing a single price series, it takes two assets and computes their ratio. That ratio becomes the subject of analysis — not the individual prices. The result is a view of relative strength, regime state, and intermarket context that no single-asset indicator can produce.
It runs eight independent analytical engines on that ratio. Each engine returns a directional score. Those scores are weighted based on the selected asset class and combined into a single confluence number from -10 to +10. The dashboard shows the engine breakdown, the macro state, and the current statistical position of the ratio in its historical distribution — all in one compact panel.
ICE is not a signal indicator. It does not tell you when to buy or sell. It tells you what the current relationship between two assets looks like across eight independent dimensions, and how much those dimensions agree with each other.
Important notice
ICE does not generate trading signals.
It does not tell you when to buy or sell.
It does not predict market direction.
It does not guarantee any outcome.
All trading decisions remain entirely with the user.
Always apply your own judgment and manage your own risk.
1. Overview
ICE is a ratio-based intermarket confluence scoring system. It takes two configurable assets, computes their price ratio (Asset A divided by Asset B), and runs that ratio through eight analytical engines simultaneously.
The nine engines are:
- Relative strength — how much Asset A is outperforming or underperforming Asset B on a rate-of-change basis
- Trend — EMA structure and slope direction of the ratio
- Momentum — volume-weighted RSI and MACD histogram alignment on the ratio
- Volatility — Bollinger Band width, ATR percentile, and squeeze state of the ratio
- Statistical extremes — Z-score and historical percentile position of the ratio
- Macro regime — direction of DXY, VIX, and 10-year Treasury yields
- Liquidity — yield curve proxy using 10-year yield rate of change
- Intermarket correlation — rolling correlation between the ratio and each macro feed
- Volume participation — OBV slope and relative volume confirmation on both assets
Each engine is weighted based on the selected asset class. A custom weighting mode is available for manual control. All weights are normalized so the final score always maps to the -10 to +10 range regardless of class selection.
The chart displays the ratio as a line with an EMA stack (21, 50, 200), Bollinger Bands, and statistical deviation bands based on Z-score distance from the historical mean. Signals fire when confluence crosses configurable thresholds. Divergence between the ratio and its volume-weighted RSI is detected mechanically and shown on the chart.
2. The ratio
2.1 What it represents
The ratio is simply the price of Asset A divided by the price of Asset B. If Asset A is gold (XAUUSD) and Asset B is silver (XAGUSD), the ratio is the gold/silver ratio — how many ounces of silver one ounce of gold can buy. If Asset A is NQ futures and Asset B is ES futures, the ratio represents the relative performance of tech versus the broad market.
The ratio rises when Asset A outperforms Asset B. It falls when Asset B outperforms Asset A. All eight engines work on this ratio, not on the underlying prices.
2.2 What is plotted
The ratio line is the primary visual element. It is colored gold when above its 50-period EMA and grey when below. The EMA stack (green for the 21, blue for the 50, white for the 200) shows the structural state of the ratio trend.
Two band systems are visible simultaneously:
Statistical deviation bands — based on Z-score. The upper band is the historical mean plus 2 standard deviations (configurable). The lower band is the mean minus 2 standard deviations. When the ratio is near or beyond these bands, the Statistical engine activates and the dashboard notes an extreme condition.
Bollinger Bands — a separate volatility-based band using a configurable period and multiplier. These bands are lighter and secondary to the statistical bands.
Squeeze markers appear as small squares along the statistical mean when the Bollinger Bands are contained inside the Keltner Channel — indicating compressed volatility and a potential breakout.
2.3 Signal markers
Signals are plotted directly on the ratio chart using triangles and circles. All markers use plotshape, not labels.
Large triangles up (green) — strong bull confluence (score above +6)
Large triangles down (red) — strong bear confluence (score below -6)
Small triangles up (faded green) — moderate bull confluence (score between +3.5 and +6)
Small triangles down (faded red) — moderate bear confluence (score between -3.5 and -6)
Cyan circles — bullish momentum divergence aligned with positive score
Orange circles — bearish momentum divergence aligned with negative score
Purple squares — active volatility squeeze
3. The eight engines
3.1 Relative strength engine
This engine measures how much Asset A is outperforming Asset B on a rate-of-change basis. It computes the ROC of each asset independently over a configurable period (default 14) and subtracts them to get a delta. That delta is then Z-score normalized over a longer lookback (default 50) to assess whether the current outperformance is historically significant.
The engine also tracks the velocity of the ratio itself — the first derivative of the ratio — and whether the ratio is above its own EMA.
Score: +1 when the RS Z-score is above 0.5 and the ratio is above its EMA. -1 when the RS Z-score is below -0.5 and the ratio is below its EMA. 0 otherwise.
The dashboard shows the raw RS Z-score in the state section so you can see how far from neutral the relative strength is reading.
3.2 Trend engine
The trend engine evaluates the EMA alignment of the ratio across three periods (21, 50, 200), the slope direction using linear regression, and optionally a higher timeframe EMA confirmation.
A full bull stack is when EMA 21 is above EMA 50 and EMA 50 is above EMA 200, combined with a positive slope. A full bear stack is the reverse. Transitional states occur when the stack is broken but slope still has a direction.
The HTF trend filter uses a configurable higher timeframe (default weekly) and checks whether the chosen asset is above its 50-period EMA on that timeframe. When enabled, the trend engine only scores positively if the HTF also confirms.
Score: +1 for confirmed bull trend. -1 for confirmed bear trend. 0 for compression or transition.
The trend state shown in the dashboard (Expansion, Contraction, Transitional, Compression) reflects the combination of stack state and slope direction.
3.3 Momentum engine
The momentum engine uses a volume-weighted RSI applied to the ratio. The weighting uses the combined average volume of both assets, normalized by its own moving average. This is the same architecture as VW RSI Pro — gains and losses are scaled by relative volume before the RSI calculation, so bars with above-average volume have more influence on the RSI than bars with below-average volume.
Alongside the VW RSI, the engine computes MACD histogram acceleration (the change in histogram value, not just its level). This distinguishes between momentum that is building and momentum that is present but decelerating.
Score: +1 when VW RSI is above 52 and MACD histogram is positive. -1 when VW RSI is below 48 and MACD histogram is negative. 0 otherwise.
The VW RSI value is shown in the state section of the dashboard. Values above 55 are colored green, below 45 red, between them grey.
3.4 Volatility engine
The volatility engine assesses whether the ratio is in a phase of compression or expansion, and which direction expansion is occurring.
It computes Bollinger Band width relative to its 100-bar average — widening bands indicate expansion, narrowing bands indicate compression. ATR percentile rank over a configurable lookback (default 100 bars) provides a second volatility measure. A squeeze is identified when the Bollinger Bands are fully contained within the Keltner Channel.
Score: +1 when volatility is expanding and the ratio is above the Bollinger midline, or when a squeeze releases upward. -1 for the same conditions in the downward direction. 0 during compression or neutral volatility states.
The vol state (Squeeze, Breakout, Expansion, Compression, Neutral) is shown in the dashboard state section. Squeeze appears in purple, breakout in gold, expansion in the configured bull color.
3.5 Statistical extremes engine
This engine measures where the current ratio stands within its own historical distribution. It computes a Z-score of the ratio over a configurable lookback (default 50) and a historical percentile rank over a longer window (default 252 bars, approximately one year of daily data).
When the ratio is more than 1.5 standard deviations above its mean and above the 80th percentile, it is classified as historically expensive — a potential mean reversion candidate to the downside. When it is more than 1.5 standard deviations below its mean and below the 20th percentile, it is historically cheap — a potential mean reversion candidate to the upside.
Score: +1 at extreme lows (below mean, below 20th percentile). -1 at extreme highs (above mean, above 80th percentile). 0 within normal range.
The Z-score and historical percentile are shown in the dashboard state section. A gold highlight on the Z-score indicates an active extreme condition.
The mean reversion probability displayed in the extended panel is a normalized version of the absolute Z-score distance — a rough proxy for how far the ratio has stretched from its historical center. It is not a probability in the statistical sense, but a relative measure of extension.
3.6 Macro regime engine
The macro regime engine uses three external data feeds — DXY (dollar index), VIX (volatility index), and TNX (10-year Treasury yield) — loaded via request.security(). It evaluates the trend direction of each feed relative to a smoothed EMA (configurable length, default 20) and classifies the current macro environment.
The global regime classification (Risk-On / Risk-Off / Mixed) appears in the dashboard header. It is always based on the same three-signal count regardless of asset class: VIX level, DXY trend, and yield direction.
The macro score, however, is class-aware. Each asset class has its own logic:
Gold / Silver — risk-off conditions (elevated VIX, falling yields, falling dollar) favor Asset A (gold). Risk-on conditions (low VIX, rising yields, rising dollar) favor Asset B (silver outperforms on industrial demand). Score is +1 for acute risk-off, -1 for sustained risk-on.
Crypto — DXY direction is the primary gatekeeper. Falling DXY and falling yields are bullish for crypto. Rising DXY and rising yields are bearish. VIX provides a third signal. Two of the three conditions must align for a score to fire.
Forex — trend-following regime logic. Risk-on environments favor the ratio direction, risk-off favors the reverse.
Indices — same structure as Forex. Risk-on = positive bias.
Commodities — DXY-led. Falling dollar supports commodity ratios.
Score: +1 for regime favorable to Asset A. -1 for regime favorable to Asset B. 0 for mixed.
3.7 Liquidity engine
The liquidity engine uses the 10-year Treasury yield (TNX) rate of change as a proxy for liquidity conditions. Falling long-term yields indicate looser financial conditions — lower cost of capital, more risk appetite. Rising yields indicate tightening.
The TNX rate of change is computed over 20 bars and smoothed with a 10-bar EMA. When the smoothed ROC is below -0.1, conditions are classified as expanding. Above +0.1, contracting.
Score logic is class-aware:
- Gold / Silver — expanding liquidity (falling yields) is positive for the ratio since gold benefits more from low rates. Contracting is negative.
- Crypto — same direction. Loose liquidity benefits risk assets.
- Forex — inverted. Rising yields support yield-differential-driven pairs.
- Other classes — expansion is positive.
Score: +1 for favorable liquidity, -1 for unfavorable, 0 for neutral.
3.8 Intermarket correlation engine
This engine computes the rolling Pearson correlation between the ratio and each macro feed (DXY, VIX, TNX) over a configurable window (default 30 bars). It then assesses whether the current correlations match the expected structural behavior for the selected asset class.
For the Gold/Silver ratio, for example, historically the ratio is positively correlated with VIX (risk-off pushes gold relative to silver) and negatively correlated with DXY (weaker dollar benefits silver less). When those correlations are in place and above a threshold (±0.15), the engine confirms the macro alignment.
A correlation shift is detected when the sign of a correlation flips compared to 10 bars ago — this is flagged in the dashboard as a regime change signal.
Score: +1 when correlations confirm expected behavior for Asset A outperformance. -1 when they confirm the reverse. 0 when correlations are below threshold or mixed.
3.9 Volume participation engine
This engine measures whether the volume behind the ratio's current move confirms its direction. It uses two inputs: the relative volume difference between Asset A and Asset B, and the slope of the on-balance volume (OBV) calculated on the ratio.
The relative volume comparison checks whether Asset A is attracting more volume than Asset B relative to their combined average. When Asset A draws disproportionately more volume, it indicates institutional interest in the primary asset. The OBV slope uses a 20-bar linear regression to determine whether cumulative directional volume is rising or falling.
A bullish confirmation requires the OBV slope to be positive, the ratio to be above its 21 EMA, and Asset A to have higher relative volume. A bearish confirmation requires the reverse. When volume diverges from price direction — OBV falling while price rises, or vice versa — this is flagged in the extended panel as a volume divergence warning.
Score: +1 when volume participation confirms the ratio move upward. -1 when it confirms downward. 0 when volume is inconclusive or mixed.
4. Adaptive weighting
Each engine returns -1, 0, or +1. Each score is multiplied by the engine's weight for the selected asset class. The sum of all nine weighted scores is normalized against the total possible weight to produce the final confluence score on a -10 to +10 scale.
Asset class presets:
Gold / Silver — statistical extremes and macro regime are weighted most heavily (14 each). This reflects the GSR's mean-reverting nature and strong sensitivity to macro conditions. Volume participation carries moderate weight — on the GSR, volume confirmation is useful but less decisive than macro state.
Crypto — liquidity and momentum are weighted most heavily (14 each). Volume participation also carries elevated weight, since capital rotation between an asset and stablecoins is directly visible in relative volume.
Forex — trend and correlation are weighted most heavily (14 each). Currency pairs respond to trend conditions and intermarket relationships more reliably than statistical extremes.
Indices — momentum and liquidity are weighted most heavily (14 each). Volume participation also carries elevated weight — index futures moves backed by strong volume are more reliable than low-volume drifts.
Commodities — relative strength and volatility are weighted most heavily (14 each). Volume participation carries moderate weight since commodity ratio moves are often driven by volume imbalances between the two assets.
Custom — all nine weights are individually configurable from 0 to 20.
The confidence percentage shown in the dashboard is the spread between the normalized bull and bear score components — a measure of how much the engines agree rather than merely how many fire.
5. Dashboard
The dashboard is a single compact panel with four columns and thirteen rows. It shows the complete scoring state, engine breakdown, and market context in one place.
Header row — indicator name, asset class, confluence label, and score out of 10. The header color reflects the net score direction.
Confidence and regime row — confidence percentage and the global macro regime (Risk-On / Risk-Off / Mixed).
Engine scores — eight engines displayed two per row across four columns. Each engine shows its label and its weighted score with direction indicator. A green upward triangle indicates a positive contribution. A red downward triangle indicates a negative contribution. A grey dot indicates a neutral score.
State section — trend state, volatility state, VW RSI value, and Z-score. The trend state label (Expansion, Contraction, Transitional, Compression) reflects the combination of EMA alignment and slope. The vol state (Squeeze, Breakout, Expansion, Compression, Neutral) reflects the Bollinger/Keltner relationship.
Macro feeds — DXY direction, VIX level, 10-year yield direction, and current divergence state.
Brand footer — version reference.
The extended macro panel (disabled by default) can be enabled in settings for a second panel showing full correlation values, ATR percentile, statistical state detail, OBV slope, volume participation score, volume divergence flag, and liquidity state.
6. Asset pair configuration
6.1 Gold/Silver ratio (GSR)
The gold/silver ratio is the primary design case for ICE. It measures how many ounces of silver are required to buy one ounce of gold. Historically the ratio has ranged between 15 and 120. It is mean-reverting over long cycles but can trend persistently for months or years.
Recommended setup:
- Asset A: OANDA:XAUUSD
- Asset B: OANDA:XAGUSD
- Asset class: Gold / Silver
The statistical extremes engine is particularly relevant here. When the ratio is near historical highs (above the 80th percentile, Z-score above 1.5), silver has historically outperformed gold significantly over the following months. When near historical lows, gold has tended to recover its premium.
The macro regime engine is also central. Acute risk-off events (2008, 2020) spike the GSR rapidly as gold outperforms. Sustained risk-on environments with rising yields and industrial demand tend to compress it.
6.2 Crypto setups
For crypto ratio analysis, stablecoin dominance (CRYPTOCAP:USDT.D) as Asset B provides a direct view of capital rotation between an asset and cash equivalents. When the ratio rises, the asset is gaining relative to stablecoins — capital is flowing in. When it falls, capital is rotating out.
Recommended setups:
- BINANCE:BTCUSDT / CRYPTOCAP:USDT.D — Bitcoin vs stablecoin dominance
- BINANCE:SOLUSDT / CRYPTOCAP:USDT.D — SOL vs stablecoin dominance
- BINANCE:ETHUSDT / CRYPTOCAP:USDT.D — ETH vs stablecoin dominance
- Asset class: Crypto for all of the above
BTC.D (Bitcoin dominance, CRYPTOCAP:BTC.D) as Asset B can be used to measure altcoin performance relative to Bitcoin specifically — useful for identifying altseason conditions.
6.3 NQ futures setups
For Nasdaq and MNQ trading, ratio analysis provides directional and regime context.
Recommended setups:
- CME_MINI:NQ1! / CME_MINI:ES1! — Nasdaq vs S&P 500. When this ratio rises, tech is outperforming the broad market. A falling ratio suggests defensive rotation or underperformance of growth. Asset class: Indices.
- CME_MINI:NQ1! / CME_MINI:RTY1! — Nasdaq vs Russell 2000. Large-cap growth vs small-cap. Risk appetite proxy. Asset class: Indices.
- CME_MINI:NQ1! / TVC:DXY — NQ relative to dollar strength. Strong inverse relationship historically. Asset class: Indices.
6.4 Precious metals and commodities
- OANDA:XAUUSD / TVC:DXY — gold relative to dollar. One of the cleanest inverse relationships in macro markets. Asset class: Commodities or Gold/Silver.
- OANDA:XAUUSD / CME_MINI:ES1! — gold vs equities. Risk-off proxy. When this ratio rises, gold is outperforming stocks. Asset class: Commodities.
- TVC:USOIL / TVC:NATGAS — oil vs natural gas relative value. Asset class: Commodities.
6.5 Forex setups
For currency pairs, use the pair itself as a ratio — Asset A as the base currency ETF or index, Asset B as the quote. Alternatively, use currency index feeds directly.
- FX:EURUSD as a direct entry (ratio of EUR to USD)
- TVC:DXY / FX:EURUSD — dollar index vs euro. Asset class: Forex.
7. Macro feeds
The three macro feeds are loaded via request.security() and must resolve on PulseWire.
Default symbols:
- DXY: TVC:DXY
- VIX: CBOE:VIX
- 10-year yield: TVC:TNX
These can be changed in the Macro Feeds settings group if alternative data sources are preferred. Each feed can be individually disabled — if all three are disabled, the macro regime, liquidity, and correlation engines return neutral (0) scores.
On lower timeframes (1m, 3m), macro feeds may have limited bar history, which can cause some engines to return neutral until sufficient data is loaded. From 15m and higher, all engines should be fully active. On very low timeframes, the statistical engines also require a minimum number of bars before the lookbacks are satisfied.
8. How to use
8.1 Reading the score
The confluence score on a -10 to +10 scale communicates direction and intensity simultaneously. It does not communicate timing.
A score of +7 with 70% confidence means six or seven engines are aligned in a bullish direction for Asset A relative to Asset B, with the weighted agreement being high. It does not mean a trade should be entered immediately — it means the current relative conditions strongly favor Asset A.
A score near 0 with low confidence means the engines are split. This is not a bearish signal — it is the absence of a clear signal. In practice, scores between -3 and +3 with confidence below 40% suggest the ratio is in a mixed or transitional regime.
8.2 Using the score with price action
ICE works on the ratio — not on the underlying price. To apply it to a trade on the underlying asset, you need to interpret the score in context.
On a BTC/USDT.D ratio chart with a score of -7, the ratio is falling — BTC is losing ground relative to stablecoin dominance. This is a macro tailwind for a bearish BTC view. It does not tell you where to enter or where to put your stop. It tells you the broader relative conditions are bearish.
Combine ICE with a price-action tool, a structure indicator, or an entry system applied to the actual trading instrument. ICE provides the regime and relative context. The entry decision remains with the user.
8.3 Divergence signals
When the ratio makes a lower low but the VW RSI makes a higher low, a bullish divergence is detected. When the ratio makes a higher high but the VW RSI makes a lower high, a bearish divergence is detected. These are mechanical detections using pivot analysis.
Divergence signals that align with the net confluence score carry more weight. A bullish divergence on a ratio that is already scoring positively on four or five engines is a stronger condition than a divergence in an otherwise neutral scoring environment. Cyan circles mark bull divergence, orange circles mark bear divergence.
8.4 Squeeze and volatility breakouts
When the volatility engine identifies a squeeze (Bollinger Bands inside the Keltner Channel), a purple square appears along the statistical mean line. This indicates compressed volatility and an elevated probability of a significant directional move.
When the squeeze releases, the volatility engine contributes its score in the direction of the breakout. Combined with trend and momentum alignment, a squeeze release can produce a rapid score shift. These moments are marked on the chart and flagged in the dashboard vol state row.
8.5 Statistical extremes
The statistical engine is most useful on the Gold/Silver ratio and other fundamentally mean-reverting pairs. When the Z-score exceeds 1.5 and the ratio is in the top 20% of its historical range, the statistical engine scores negatively — signaling that the ratio has historically tended to revert from this level.
This is not a timing signal. The ratio can remain at extremes for weeks or months. The statistical engine scores the degree of extension, not the moment of reversal. Use it alongside momentum and trend engines to assess whether the extreme is beginning to resolve.
9. Settings reference
Asset configuration
- Asset A — the primary asset. Default: XAUUSD.
- Asset B — the secondary asset. Default: XAGUSD. The ratio is Asset A divided by Asset B.
- Plot ratio line — toggles the main ratio line on the chart.
- Plot ratio EMAs — toggles the 21/50/200 EMA stack on the ratio.
- Plot std dev bands — toggles the statistical deviation bands and Bollinger Bands.
Asset class and weighting
- Asset class — selects the weighting preset. Options: Gold/Silver, Crypto, Forex, Indices, Commodities, Custom.
- Individual weight inputs — only active in Custom mode. Each engine can be weighted from 0 to 20.
Macro feeds
- Use DXY / VIX / TNX — individual toggles for each macro feed.
- DXY / VIX / TNX symbol — configurable symbols. Defaults: TVC:DXY, CBOE:VIX, TVC:TNX.
- Macro smoothing — EMA length for the macro feed trend detection. Default 20.
Relative strength engine
- ROC length — rate of change period for both assets. Default 14.
- RS EMA length — EMA applied to the ratio for trend confirmation. Default 21.
- RS Z-score lookback — lookback for normalization of the RS delta. Default 50.
Trend engine
- Fast / Slow / Macro EMA — the three EMA periods for the ratio. Defaults: 21, 50, 200.
- MTF trend filter — enables the higher timeframe confirmation gate.
- HTF timeframe — the timeframe used for the HTF EMA check. Default weekly.
Momentum engine
- RSI length — period for the VW RSI calculation. Default 14.
- Volume smoothing — SMA length for volume normalization. Default 14.
- Volume weighted RSI — enables volume weighting on the RSI. Default on.
- MACD fast / slow / signal — MACD parameters applied to the ratio. Defaults: 12, 26, 9.
Volatility engine
- BB length / BB multiplier — Bollinger Band parameters. Defaults: 20, 2.0.
- ATR length — period for ATR calculation. Default 14.
- ATR percentile lookback — historical window for ATR percentile ranking. Default 100.
- Squeeze KC length / multiplier — Keltner Channel parameters for squeeze detection. Defaults: 20, 1.5.
Statistical extremes engine
- Z-score lookback — window for Z-score calculation. Default 50.
- Percentile lookback — historical window for percentile ranking. Default 252 (approximately one year of daily data).
- Z-score extreme threshold — standard deviations from mean required to classify as extreme. Default 1.5.
Correlation engine
- Correlation window — rolling window for Pearson correlation. Default 30.
Visuals
- Bull / bear / neutral color — configurable colors for all directional elements.
- Ratio line color — color of the main ratio line.
- Show score background — colors the pane background faintly by net score direction.
- Background transparency — transparency level for the score background. Default 93.
Dashboard
- Show dashboard — master toggle. Default on.
- Position — Top Left, Top Right, Bottom Left, Bottom Right. Default Bottom Right.
- Size — Tiny, Small, Normal. Default Tiny.
- Show extended macro panel — enables a second panel with full correlation, volume, and statistical detail. Default off. Recommended for desktop only.
10. Notes
- ICE operates on a ratio of two assets. If either asset has no data on the current chart timeframe, the ratio will be unavailable and the engines will not fire. Ensure both symbols resolve correctly in PulseWire before interpreting the dashboard.
- The macro feeds (DXY, VIX, TNX) are loaded separately via request.security(). On lower timeframes, the feed data may require a few bars to warm up before producing stable readings. All engines should be fully active from the 15m timeframe and above.
- The volume used by the momentum engine is the combined average of both asset volumes. On ratio pairs where one or both assets have zero or unavailable volume (such as some index feeds), the volume-weighted RSI falls back to an unweighted RSI automatically.
- All statistical calculations (Z-score, percentile rank) require a minimum number of bars equal to the lookback period. On charts with limited history or very short timeframes, these engines may return neutral until sufficient bars are loaded.
- The correlation engine requires both assets to have non-constant price series over the correlation window. On very stable or pegged assets, correlation may be undefined and the engine returns neutral.
- ICE does not repaint. All scores and signals are based on confirmed bar data.
- The indicator is designed for ratio analysis. It can technically be used with a single asset by setting Asset B to a constant reference (such as a stablecoin or index), but it was built around the two-asset ratio concept and performs best in that context.
11. Disclaimer
This indicator is provided for educational and informational purposes only.
All outputs are based on historical price data and mathematical calculations.
Past behavior does not guarantee future results.
Trading involves substantial risk of loss.
Use at your own discretion.
Indicator

RSI Optimized with Smoothings & Divergence (RSI Optimized)This indicator enhances the classic RSI by adding multiple smoothing layers, a dynamic background based on the average of six smoothings, an info table, and regular divergence detection.
🔹 **Core RSI**
Standard RSI calculation (Wilder) with fully adjustable length and source. Overbought/oversold levels (70/30) are highlighted with a gradient fill.
🔹 **Smoothing MA**
Optionally apply a moving average to the RSI line (SMA, EMA, SMMA, WMA, VWMA). The "SMA + Bollinger Bands" mode adds Bollinger Bands around the smoothed RSI.
🔹 **Six Smoothings (instead of a ribbon)**
Six independent moving averages of the RSI (customizable type and lengths) are plotted. Useful to visualise multiple timeframes or sensitivities at once.
🔹 **Background color (RSI vs Avg of 6 Smoothings)**
Compares the RSI value to the simple average of the six smoothings. Green background when RSI > average (bullish bias), red when RSI < average (bearish bias).
🔹 **Info Table**
Displays in real time:
- Current RSI value (color‑coded by overbought/oversold)
- Average of the six smoothings
- Ratio = (RSI + Avg)/2
- Trend direction (based on RSI vs average)
- Zone (Oversold / Overbought / Bull / Bear / Neutral)
- Smooth trend (fast smoothing 1 vs upper smoothing 6)
🔹 **Regular Divergences**
Detects regular bullish and bearish divergences between price and RSI. Pivot lookback is fixed to 5 bars left/right. An alert is available for each divergence type.
🔹 **All options are configurable via the Settings tab** – from lengths, colors, smoothing types to enabling/disabling the table or divergences.
📌 **How to use**
- Use the six smoothings to identify trend alignment (e.g., all above 50 = strong uptrend).
- The background turns green when RSI stays above the average of all smoothings.
- Watch for divergence signals (labelled "Bull" / "Bear") for potential reversals.
- The info table gives a quick snapshot of momentum and trend state.
This tool is ideal for traders who want a richer RSI experience without cluttering the chart.
NOTE PERSO :THANK TRADING VIEW FOR YOU WORKS , YOU ARE BEST !!! & ENJOY TEAM TRADING VIEW MAKE PEACE NOT WARS !!! STAY TUNED !! Indicator
