Indicator

NeuPortal - Confluence MeterThe standard oscillator set on one shared 0-100 scale: RSI, Stochastic, Williams %R, CCI, MFI, MACD histogram and Momentum. Toggle any of them, read them against each other, and get a consensus line.
That part is ordinary. Here is the part that is not.
WHY CONFLUENCE IS USUALLY WORTH LESS THAN IT LOOKS
"Five indicators confirm the signal" is the oldest line in technical analysis, and it is mostly a restatement of one thing said five times. These oscillators are near-transformations of each other.
Measured over 19,580 four-hour bars of full Binance history on BTCUSDT, the rank correlations are: Stochastic to Williams %R 0.92, RSI to CCI 0.90, Stochastic to CCI 0.89, Williams %R to CCI 0.87. The median pairwise correlation across all 21 combinations is 0.80. ETHUSDT over the same span reproduces the table to two decimal places.
For n readings with average correlation r, the effective number of INDEPENDENT readings is about n / (1 + (n - 1) * r). Seven oscillators at 0.80 come to roughly 1.2.
Seven agreeing indicators is one indicator, counted seven times.
The weakest pair in the set is RSI against the MACD histogram at 0.51. If you want two oscillators rather than seven, those two carry the most different information.
WHAT THE SCRIPT DOES ABOUT IT
It does not take the numbers above on trust. It measures the correlation live, on your symbol, your timeframe and your chosen lengths, then prints two things side by side in the table:
- agreement, the count of enabled oscillators on the same side of 50
- effective independent readings, derived from the measured correlation
The first is what people want to see. The second tells them what it is worth. When the second reads 1.3, a unanimous seven-to-nothing agreement is not seven pieces of evidence.
HOW THE SHARED SCALE WORKS
RSI, Stochastic and MFI are natively 0-100. Williams %R is shifted from its -100..0 range. CCI, the MACD histogram and Momentum have no fixed bounds, so they are converted with a percentile rank against their own recent history: the reading becomes where this value sits relative to how this instrument has behaved lately.
That is a real transformation and it is disclosed rather than buried. A percentile-ranked MACD histogram is not the MACD histogram, so the raw value is printed in the table alongside the scaled one. Nothing is hidden behind the normalisation.
SETTINGS WORTH KNOWING
Percentile lookback controls how much history the unbounded oscillators are ranked against. Shorter reacts faster and is noisier. Longer is steadier and slower to acknowledge a change in regime.
Correlation window controls how much history is used to measure independence. Longer is more stable but averages across regimes, and correlation between oscillators is not constant.
WHAT THIS IS NOT
Not a strategy, not a signal, not a recommendation. An oscillator crossing 50 is not an entry. The two alerts are deliberately descriptive rather than directional, because an alert that said "buy" would contradict everything the script exists to point out.
Free and open source. Read the code, change the lengths, run it on your own instruments and see whether the correlation on your market matches ours.
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

Multi-Oscillator Divergence Scanner [Quantum Algo]Multi-Oscillator Divergence Scanner
====================================================
🔶 OVERVIEW
Multi-Oscillator Divergence Scanner is a confluence-based divergence indicator that scans up to seven classic oscillators simultaneously — Relative Strength Index, Moving Average Convergence Divergence, Stochastic Oscillator, Commodity Channel Index, On Balance Volume, Money Flow Index, and Momentum — and displays the result on two synchronized canvases at once. Divergence lines, graded labels, and reaction zones are drawn directly on the price chart, while a dedicated pane below plots a Composite Oscillator built from every enabled engine, with the same divergence lines mirrored onto the composite itself. You see both slopes of every divergence — price disagreeing with momentum — in one glance.
The problem this script solves is selective divergence trading. Any single oscillator produces frequent divergences, and most of them fail. Requiring multiple mathematically independent engines — momentum-based, volume-based, and volatility-normalized — to diverge at the same confirmed swing filters the noise down to setups where disagreement between price and participation is broad, not incidental.
🔶 WHAT IS A DIVERGENCE?
A divergence occurs when price prints a new extreme but an oscillator refuses to confirm it. A regular bullish divergence forms when price makes a lower low while the oscillator makes a higher low — a classic reversal condition. A regular bearish divergence forms when price makes a higher high while the oscillator makes a lower high. Hidden divergences are the continuation counterparts: price makes a higher low while the oscillator makes a lower low (hidden bullish), or price makes a lower high while the oscillator makes a higher high (hidden bearish). This scanner detects all four types on confirmed swing pivots.
🔶 WHAT IS THE COMPOSITE OSCILLATOR?
The Composite Oscillator is the consensus reading of every engine you enable. Bounded oscillators (Relative Strength Index, Stochastic, Money Flow Index) contribute their native zero-to-one-hundred values; unbounded engines (Moving Average Convergence Divergence histogram, On Balance Volume, Momentum) are range-normalized over a configurable lookback; the Commodity Channel Index is rescaled onto the same axis. The average of all enabled engines plots as a single gradient line with overbought and oversold guides, a midline fill, and divergence lines drawn directly on it — so the pane shows aggregate momentum from the same engines that vote on every signal, not a separate calculation.
🔶 WHY THIS SCRIPT IS ORIGINAL
1. True multi-engine confluence. Divergences are not detected on one oscillator and decorated with others. All seven engines are evaluated independently at every confirmed pivot, and a signal only exists when the minimum confluence count you set is reached.
2. Dual-canvas mirroring. Every qualified divergence is drawn twice: on price, and on the Composite Oscillator in the pane, connected at the same two pivots. Both slopes of the disagreement are visible simultaneously — the visual proof that defines a divergence.
3. Consensus composite pane. The pane line is not one more oscillator; it is the averaged, normalized voice of the exact engines doing the scanning, colored by a gradient between the oversold and overbought guides.
4. Full transparency on every label. Each signal prints its strength as a diamond meter and lists the exact oscillators that diverged (for example: RSI · OBV · MFI). You always know why a signal exists — nothing is a black box.
5. Strength-scaled visuals. Divergence lines thicken with confluence on both canvases, and signals reaching the Strong threshold upgrade to the accent color, so chart hierarchy communicates quality instantly.
6. Reaction zones with a life cycle. Every regular divergence projects a volatility-sized zone around its pivot (measured in Average True Range). Zones gray out automatically the moment price invalidates them, so the chart always distinguishes live zones from dead ones.
7. Divergence pressure gauge. A decaying pressure model accumulates bullish and bearish divergence weight over time, giving a one-glance read on which side has been stacking disagreement with price.
🔶 HOW IT WORKS
Pivot scanning: Swing highs and swing lows are confirmed with a symmetric pivot lookback. All divergence checks are evaluated on closed bars at pivot confirmation, so historical signals do not repaint. Confirmation lag equals the right-side pivot length by design.
Confluence evaluation: At each confirmed pivot, every enabled oscillator's value at that pivot is compared against its value at the previous same-side pivot. The four divergence types are tested independently per oscillator, and contributions are counted.
Signal grading: Signals meeting the Minimum Oscillator Confluence print with strength diamonds (one per contributing oscillator). Signals reaching the Strong Signal Threshold upgrade to the accent color and thicker geometry on both the price chart and the composite pane.
Composite rendering: The pane plots the consensus line with a gradient fill to the midline, dashed overbought and oversold guides, tinted extreme bands, triangle marks at divergence bars, and the mirrored divergence lines.
Reaction zones: Each regular divergence projects a box around its pivot sized by Average True Range, extended a configurable number of bars. A bullish zone grays out when price closes below it; a bearish zone grays out when price closes above it.
Dashboard: A fully themeable panel on the price chart shows the last signal, a live divergence pressure meter, and one row per engine with its live value — color-coded for overbought, oversold, or directional state — plus each engine's most recent divergence side. Text size (four steps), position, and every color (title band, background, frame, grid, header, body, muted) are adjustable.
Chart hygiene: The number of divergences kept is capped by input, on both canvases. Older lines, labels, and zones are deleted automatically, keeping the chart readable and the auto-scale anchored to current price.
🔶 HOW TO USE IT
1. Works on any market — cryptocurrency, forex, gold, indices, stocks, futures — and any timeframe. Higher timeframes produce fewer, larger-structure signals.
2. Start with Minimum Oscillator Confluence at 2 and the Strong threshold at 4. Raise the minimum to 3 for a strict, low-frequency reversal tool; lower it to 1 to study single-oscillator behavior.
3. Read the pane and the chart together: a valid signal shows price sloping one way and the composite sloping the other, connected at the same pivots.
4. Regular divergences are reversal-oriented: treat them as exhaustion evidence at swing extremes, strongest when the composite is also inside an overbought or oversold band.
5. Hidden divergences are continuation-oriented: treat them as trend re-entry evidence during pullbacks, and do not read them like reversal signals.
6. Use the reaction zone as the decision area: a live zone holding on retest supports the signal; a grayed zone means the divergence failed.
7. The pressure meter is context, not a trigger — persistent one-sided pressure alongside fresh strong signals is the highest-quality condition.
🔶 SETTINGS
- Pivot Left / Right Length — swing size; larger values scan bigger structures.
- Independent toggles and lengths for all seven oscillator engines.
- Composite pane: normalization lookback, overbought and oversold levels, pane marks, and mirrored divergence lines toggle.
- Regular and hidden divergence toggles, minimum confluence, strong threshold.
- Reaction zone height (Average True Range ratio) and extension.
- Divergences To Keep — caps historical drawings on both canvases for chart cleanliness and stable auto-scale.
- Dashboard with adjustable text size, position, live oscillator values, and full color theming.
- Full color customization for all chart drawings and pivot markers.
🔶 ALERTS
- Bullish Divergence / Bearish Divergence — a regular divergence met the confluence minimum.
- Hidden Bullish Divergence / Hidden Bearish Divergence — a continuation divergence met the minimum.
- Strong Divergence — a regular divergence reached the strong threshold.
🔶 FREQUENTLY ASKED QUESTIONS
Does the indicator repaint? No. Divergences are evaluated only on confirmed pivots at bar close. The trade-off is intentional confirmation lag equal to the right-side pivot length.
Why does a pane divergence line sometimes start slightly off the composite's visual peak? Divergence is measured at price structure points. The line connects the composite's values at the two confirmed price pivots, which is the correct comparison even when the composite made its own extreme a bar or two away.
Why do some obvious divergences not print? Either the confluence minimum was not reached, the oscillator involved is disabled, or the swing did not confirm as a pivot under the current lengths.
Which oscillators should I enable? The default set mixes momentum and volume perspectives, which is the point of confluence: independent evidence, not seven copies of the same math.
Is a Strong signal a guaranteed reversal? No. Strength counts agreement between engines; it is a transparency measure, not a probability of profit.
🔶 CREDITS
This script builds its scanning and composite engine on classic, public-domain oscillators, and gratefully credits their creators: the Relative Strength Index by J. Welles Wilder Jr. (1978), Moving Average Convergence Divergence by Gerald Appel, the Stochastic Oscillator popularized by George C. Lane, the Commodity Channel Index by Donald Lambert (1980), On Balance Volume by Joseph Granville (1963), and the Money Flow Index by Gene Quong and Avrum Soudack. All oscillator calculations use standard built-in formulas. Drawing divergence lines on an oscillator is a long-established charting convention popularized by many community authors, acknowledged here as shared prior art. The multi-engine confluence scanner, the consensus Composite Oscillator, the dual-canvas mirroring, transparency labeling, strength grading, reaction zone life cycle, pressure model, and all code in this script are original work — no third-party or open-source script code was reused.
🔶 LIMITATIONS
Divergence can persist or fail entirely during strong trends; regular divergences against a powerful trend are the weakest application. Volume-based engines (On Balance Volume, Money Flow Index) are less meaningful on symbols with unreliable volume reporting. The composite's normalized components depend on the normalization lookback. Pivot confirmation introduces intentional delay. No indicator replaces independent analysis.
🔶 DISCLAIMER
This script is provided strictly for educational and informational purposes. It is not financial advice, an investment recommendation, or a solicitation to buy or sell any financial instrument. Past behavior of any signal does not guarantee future results. Trading involves substantial risk. Always do your own research and manage risk independently.
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

Divergence Strength Analyzer-John HaydenHayden Momentum Regimes & Time-Decay Divergence Analyzer
Overview:
Most retail traders treat the Relative Strength Index (RSI) as a basic overbought/oversold oscillator—shorting above 70 and buying below 30. In *"RSI: The Complete Guide," John Hayden* completely flips this flawed conventional wisdom on its head. Hayden demonstrates that extreme RSI levels actually represent high-velocity structural momentum expansions rather than impending reversals.
This open-source Pine Script tool here maps Hayden's proprietary market regimes, isolates institutional *Hidden and Normal Divergences, and introduces a strict **Time-Decay Strength Matrix* to filter out low-velocity market noise.
Core Mechanics
1. The High-Velocity Regime Speedometer
Instead of looking for immediate trend reversals when the RSI enters extreme territories, this indicator uses these levels to categorize the macro trend structure:
*The Bull Market Regime (40/80 Range):* Initiated when the RSI breaks out above 70. Once confirmed, the RSI establishes a firm support floor around the *40* line during pullbacks, indicating heavy institutional backing.
*The Bear Market Regime (20/60 Range):* Initiated when the RSI drops below 30. Relief rallies consistently stall out and find a ceiling around the *60* line, proving persistent distribution.
2. The Power of Hayden's Hidden Divergence
While normal divergence frequently acts as a near-term counter-trend trap, Hayden highlights *Hidden Divergence* as the ultimate trend-continuation footprint.
* In a confirmed bullish regime, the price prints a structurally higher low while the RSI registers a deeply oversold lower low. This discrepancy indicates that while emotional momentum has fully cooled off, structural buying pressure remains completely intact, creating a coiled spring ready to unleash the next "superfast" leg up.
3. The Time-Decay Strength Matrix (%)
A primary reason traders fail with standard divergence indicators is that they fail to account for the element of time. Hayden explicitly teaches that the validity of a momentum discrepancy decays the longer it takes to form.
This script mathematically calculates the precise distance between structural peaks or troughs and scores the setup using Hayden’s time-based parameters:
* 🚀 *100% Strength (Ultra Condensed):* \le 4 bars between pivots. Highly explosive immediate velocity.
* 📈 *75% Strength (Standard Strong):* 5 to 8 bars between pivots. Highly reliable trend-joiner.
* ⚖️ *50% Strength (Moderate):* 9 to 12 bars between pivots. Average momentum reliability.
* ❌ *0% Strength (Decayed/Filtered):* > 16 bars between pivots. The setup is completely ignored and filtered off your chart to prevent slow, sideways chops.
How to Trade This Script
1. *Scan the Regime Background:* Look for a faint green chart overlay to confirm you are inside a valid Hayden Bull Regime.
2. *Locate the Footprint:* Wait for the indicator to map an *MDRP Hidden Bull* or *Normal Bull* label.
3. *Verify the Strength %:* Prioritize signals showcasing *75% to 100% Strength*. This ensures you are striking right at the inflection point of structural trend acceleration.
4. *Invalidation:* If the macro RSI breaks out of its trend bounds (e.g., dropping below the 40-floor buffer in a bull market), the regime shifts to neutral, and current long-bias expectations are discarded.
Features
*Pure Price & Momentum Geometry:* Zero volume filters are utilized, making this script ideal for clean execution across both highly liquid indexes and choppy small-cap resource scripts.
*Dynamic Chart Labels:* Eliminates chart confusion by printing the exact divergence type alongside its dynamic strength rating directly on the key pivot bar.
Indicator

Zero Lag CVD, RSI & Stochastic Divergence (All-in-One) [D4A]Zero Lag CVD, RSI, Stochastic Divergence
Overview
Zero-Lag Divergence indicator is designed to identify bullish and bearish divergences as they happen, without relying on traditional pivot confirmation delays. By comparing price action with output of CVD, RSI and Stochastic across two independent detection periods, the indicator helps traders spot potential trend exhaustion and reversal opportunities earlier than conventional divergence tools.
How is this indicator different from other similar tools?
- Provides real-time non-repainting divergence signals for CVD, RSI and Stochastic in one convenient script
- Provides instant and separate divergence signals for one of the three oscillators (CVD, RSI, Stochastic), combination of two oscillators or combination of all three (Agreement Mode), thus marking double or triple confirmation of discrepancy between the price, momentum and volume, signalling potentially important reversal zone.
- To maximize probability of validity of the signal, the user can configure overbought and oversold conditions for both momentum oscillators (RSI & Stochastic) to filter only the strongest signals.
- To keep chart clutter under control the tool combines divergence labels into one common label in Agreement Mode
- The indicator tracks divergence simultaneously using two different and configurable periods (short- and long-term divergence) thus allowing to track shorter and longer periods for possible divergences while using only one timeframe
- Displays all signals directly on the chart - no need for additional panel below or above the chart
- All three oscillators can be independently configured, eg. signal length, smoothing, overbought and oversold levels.
Bullish Divergence Logic
Occurs when price forms a lower low while oscillator forms a higher low, suggesting weakening bearish momentum (volume) and the possibility of an upward reversal.
Bearish Divergence Logic
Occurs when price forms a higher high while oscillator forms a lower high, indicating weakening bullish momentum (volume) and the potential for a downward move.
Why Zero-Lag?
Most divergence indicators require future candle confirmation before displaying a signal. This indicator prioritizes immediacy by highlighting potential divergences as they form, allowing traders to react sooner to developing momentum shifts.
While this approach can generate earlier opportunities, it may also create false signals and market noise. For best results, consider combining divergence signals with trend analysis, support and resistance levels, volume studies, or additional confirmation tools.
Notes
* Signals are non-repainting once generated.
* Earlier detection may result in more frequent signals compared to traditional pivot-confirmed divergence indicators.
* Suitable for stocks, forex, cryptocurrencies, indices, and other liquid markets.
* Can be used on any timeframe, from intraday trading to higher-timeframe swing analysis.
SETTINGS
- Zero-Lag Divergence - enable the display of signals
- Mode - select for which oscillator should divergence signals be plotted:
CVD - Cumulative Volume Delta
RSI - Relative Strength Index
Stochastic - Momentum oscillator
Agreement - two or three indicators agree at the same time (same candle)
- Minimum Agreement - how many indicators should agree at the same time: Any Two or Any Three
- Cumulative Volume Delta Length
- RSI Length, OB (overbought) level , OS (oversold) level. OB and OS levels can be used to select more extreme zones to find divergence (stronger signals).
- Stochastic: %K and Smoothing settings, as well as OB and OS settings (work similar to RSI logic)
- Show Labels - show labels on the chart
- Bullish Label - can be set and color coded for different indicators
- Bearish Label - can be set and color coded for different indicators
- All Oscillators Agree - displays label when all three oscillators generate divergence signals at the same time
- RSI + Stochastic - displays label when both RSI and Stochastic agree at the same time
- CVD + Stochastic - displays label when both CVD and Stochastic agree at the same time
- CVD + RSI - displays label when both CVD and RSI agree at the same time
- RSI Divergence Label only if RSI >=OB or RSI <= OS - display the label only when RSI divergence signals are detected at user-defined overbought or oversold levels
- Stochastic Divergence Label only if Stochastic >=OB or Stochastic <= OS - display the label only when Stochastic divergence signals are detected at user-defined overbought or oversold levels
- Show Lines - draw lines between divergence points.
- Short Period - define the 1st period for which divergence is detected
- Long Period - define the 2nd period for which divergence is detected
- Distance Multiplier & ATR - used to position the labels at specific distance from divergence point
What is CVD?
CVD measures the cumulative difference between buying and selling volume. A rising CVD indicates more buying pressure, while a falling CVD indicates more selling pressure. Divergence occurs when the price action contradicts the CVD's direction, suggesting a potential shift in momentum or trend reversal.
What is RSI?
The relative strength index (RSI) is a momentum indicator used to measures the speed and magnitude of a asset's recent price changes to detect overbought or oversold conditions.
What is Stochastic?
Trading View definition: Stochastic Oscillator (STOCH) is a range bound momentum oscillator. The Stochastic indicator is designed to display the location of the close compared to the high/low range over a user defined number of periods. Typically, the Stochastic Oscillator is used for three things; Identifying overbought and oversold levels, spotting divergences and also identifying bull and bear set ups or signals.
-----------------
Disclaimer
The content provided in this script is for educational and informational purposes only. It does not constitute financial advice, investment recommendations, or a solicitation to buy or sell any financial instruments. I will not accept liability for any loss or damage, including without limitation any loss of profit, which may arise directly or indirectly from the use of or reliance on such information.
All investments involve risk, and the past performance of a security, industry, sector, market, financial product, trading strategy, backtest, or individual's trading does not guarantee future results or returns. Investors are fully responsible for any investment decisions they make. Such decisions should be based solely on an evaluation of their financial circumstances, investment objectives, risk tolerance, and liquidity needs.
Indicator

RSI Overpowered [Cartel Console]# RSI Overpowered
RSI Overpowered is a momentum and volume-pressure analysis tool designed to provide a broader view of market strength by combining multiple volume-based market internals into a single composite oscillator framework.
Instead of relying solely on traditional price-based RSI calculations, this indicator incorporates Relative Strength Index calculations derived from Positive Volume Index (PVI), Negative Volume Index (NVI), and On-Balance Volume (OBV). These components are blended into a Composite RSI that aims to highlight shifts in participation, accumulation, distribution, and momentum conditions.
The indicator includes multiple layers of analysis:
• Composite RSI built from PVI, NVI, and OBV RSI values
• Smoothed signal line for trend and momentum comparison
• Secondary RSI oscillator derived from the composite calculation
• Configurable overbought and oversold zones
• Trend filtering using Supertrend methodology
• Bullish and bearish momentum signals with trend confirmation
• Divergence detection between price and the Composite RSI
• Dynamic area fills and visual momentum shading
• Built-in alert conditions for key events
### How It Works
The script first calculates three independent volume-based indexes:
• Positive Volume Index (PVI)
• Negative Volume Index (NVI)
• On-Balance Volume (OBV)
An RSI is then calculated for each component. The average of these values forms the Composite RSI, which is subsequently smoothed to reduce noise and improve readability.
A secondary RSI oscillator is generated from the Composite RSI itself, creating an additional layer of momentum analysis that can help identify shifts in directional strength.
### Trend Confirmation
To reduce counter-trend signals, the indicator incorporates a Supertrend-based trend filter.
Bullish momentum signals are generated only when the trend filter indicates a bullish environment.
Bearish momentum signals are generated only when the trend filter indicates a bearish environment.
This approach helps align momentum events with broader directional market conditions.
### Divergence Detection
The indicator automatically searches for potential divergences between price action and the Composite RSI.
Bullish divergence may occur when price forms a lower low while the Composite RSI forms a higher low.
Bearish divergence may occur when price forms a higher high while the Composite RSI forms a lower high.
Divergence signals are visualized directly on the oscillator using pivot-based detection logic.
### Visualization Features
• Composite RSI line
• Smoothed signal line
• Dynamic momentum fills
• Overbought and oversold markers
• Trend-filtered signal circles
• Divergence labels and connecting lines
• Momentum gradient visualization
### Alerts Included
• Bullish Momentum Signal
• Bearish Momentum Signal
• Overbought Event
• Oversold Event
### Notes
This indicator is intended for market analysis and educational purposes only. Signals, divergences, trend filters, and oscillator conditions should be used alongside a complete trading plan and appropriate risk management techniques.
No indicator can guarantee future market outcomes, and all market decisions remain the responsibility of the user.
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

Aura RSP Matrix [Pineify] Pineify - Aura RSP Matrix - Relative Strength Phase Momentum
Aura RSP Matrix compares the chart symbol with a benchmark and classifies it into four relative-strength phases: Leading, Weakening, Lagging, and Improving. It shows whether relative performance is gaining or fading.
Key Features
Benchmark-relative RS Ratio and RS Momentum centered around 100.
Phase coloring for the oscillator, bars, markers, and dashboard.
Leading and Lagging labels fire only on the first bar of a new phase.
How It Works
The script requests the benchmark close on the timeframe, divides chart close by benchmark close, then normalizes the result with a WMA . This creates RS Ratio, where values above 100 show relative strength above its recent baseline.
RS Momentum compares RS Ratio with its own WMA baseline. Both series are smoothed with an EMA before phase detection. Smoothing reduces one-bar noise but adds lag.
How the Components Work Together
RS Ratio shows whether the symbol is strong or weak versus the benchmark. RS Momentum shows whether that position is improving or fading. Leading means both are above 100; Weakening means strength remains above 100 while momentum slips; Lagging means both are below 100; Improving means momentum turns up before RS Ratio confirms.
Trading Ideas and Insights
Use Leading as confluence for bullish setups, not as an automatic entry.
Watch Weakening after strong runs; it may show fading follow-through.
Use Improving to find names recovering against a benchmark.
Treat Lagging as a caution filter when stronger alternatives exist.
Signals are phase-change markers, not performance guarantees. In choppy markets the matrix can rotate around 100, and live bars may change until close.
Unique Aspects
Two-stage WMA normalization separates relative strength from relative momentum.
One four-state matrix keeps labels, bars, oscillator color, and dashboard status aligned.
The benchmark input supports market, sector, crypto pair, or cross-asset comparison.
How to Use
Add the indicator and choose a benchmark for your trading universe.
Read the phase from bar color, oscillator color, and dashboard.
Combine phases with price structure, volume, and higher-timeframe context.
Customization
Calculation Window (default: 20) - WMA normalization period. Higher is smoother; lower is faster.
Benchmark Ticker (default: SPX) - Relative strength comparison symbol.
Smoothing Factor (default: 3) - EMA smoothing after RS calculations.
Phase Colors and Toggles - Adjust colors, labels, and bar coloring.
Conclusion
Aura RSP Matrix is a relative strength context tool for rotation, watchlist filtering, and benchmark-relative trade selection. Use it with price action and risk controls, not as a standalone forecasting system. Indicator

QAI Vegas Intelligent Channel ProIntroduction & User Manual QAI Vegas Intelligent Channel Pro
Autumn AI · Vegas Intelligent Channel Pro
Type: Pure Technical Analysis Reference Indicator (NOT a Strategy)
1. Introduction
QAI Vegas Intelligent Channel Pro is a professional-grade, multi-timeframe, multi-layered technical analysis reference indicator developed by the Autumn AI team. Built around the classic Vegas Tunnel (144/169 EMA) as its core framework, it integrates short-term (21/55), medium-term (288/338), and long-term (576/676) EMA channels, an advanced VWAP system with deviation bands, Bollinger Bands breakout logic, and comprehensive divergence detection across four major oscillators: RSI, MACD, KDJ, and Stochastic (both regular and hidden divergence).
Important Disclaimer (Please Read Carefully):
This indicator is designed exclusively as a visual reference tool and decision-support indicator. It is NOT a trading strategy and does NOT generate any automated buy/sell signals. All bubble labels, info panel readings, divergence alerts, and overall recommendations are provided for informational and analytical purposes only. Traders must combine this tool with their own independent market analysis, strict risk management, and personal trading plan. Past performance is not indicative of future results. Trading carries substantial risk of loss.
2. Key Features
Multi-layered EMA channel system (Short / Mid / Long + Vegas Tunnel) with optional MTF for Vegas
Advanced VWAP system (Daily/Session reset + multi-SD bands + minimum distance filter)
Quad-oscillator divergence confluence (RSI + MACD + KDJ + Stochastic)
Bollinger Bands Squeeze & Expansion breakout assistance
Real-time Info Panel (original detailed 2-column 24-row layout)
5-minute auto-expiring bubble labels for breakouts, divergences, and strong signals
Full visibility controls (one-click show/hide for all channels)
Native PulseWire dynamic alert system (trend change, strong signals, various divergences, etc.)
3、Recommended Default Settings
Source: close (recommended)
Visibility Controls: All on by default; when screen space is limited, keep only Vegas Tunnel + Filter Line + Info Panel
VWAP: Enable and keep useVWAPFilter = true
Bollinger Breakout: Enabled by default as auxiliary confirmation
Buy/Sell Arrows: Disabled by default (showArrows = false)
Core Reference Workflow (Practical Guide)
Start with Vegas Tunnel: Price above upper band + bullish tunnel alignment → bullish bias reference; below lower band + bearish alignment → bearish bias reference
Filter Line Confirmation: Price must be above/below EMA12 Filter for valid trend consideration
Channel Confluence: Short channel breakout + Vegas alignment + mid/long-term direction agreement = significantly stronger reference
Divergence Confluence: Multiple oscillators showing bullish/bearish divergence simultaneously = key reversal/continuation reference point
VWAP & Bollinger Assistance: Price far from VWAP + Bollinger expansion breakout = enhanced reference strength
Info Panel Quick Overview: Instant view of channel prices, distance %, indicator status, and overall recommendation
Bubble Labels: Real-time visual alerts that auto-delete after 5 minutes for clean charting
Info Panel Explanation
The panel uses the original detailed layout (2 columns, 24 rows) and displays:
Real-time prices and directional suggestions for all channels
Vegas distance percentage, VWAP/ATR, current price
Individual status for RSI, MACD, KDJ, Stochastic, Bollinger Bands, and Volume
Overall Recommendation and Trend at the bottom
4. Risk Disclaimer
Once again, this is strictly a reference indicator and NOT a trading strategy.
Autumn AI and the indicator developer assume no responsibility for any trading losses incurred from using this tool. Always practice proper position sizing, strict stop-loss discipline, and trade only within your personal risk tolerance. Indicator

Indicator

RSI ReverseRSI Reverse is an analytical tool that reverse-engineers the Relative Strength Index (RSI) to project the estimated price levels required to reach your specific Overbought (OB) and Oversold (OS) targets.
Instead of acting solely as a lagging oscillator, this script calculates the mathematical distance price needs to travel over a user-defined number of future bars to push the RSI to your desired levels. (Note: These are mathematical projections based on current calculations, intended to be used as reference levels rather than guaranteed absolute predictions.)
Here is a breakdown of the indicator's configuration:
⚙️ Core Configuration
RSI Length: The lookback period for the base RSI calculation (Default: 14).
Overbought Target (OB): The upper RSI target level you want to project a price for (e.g., 70, 80).
Oversold Target (OS): The lower RSI target level you want to project a price for (e.g., 30, 20).
⏱️ The 5-Scenario Projections (Time Horizons)
Reaching an RSI of 70 on the very next bar requires a significantly different price movement compared to reaching it gradually over 30 bars. To account for this, the script provides 5 independent and fully customizable time scenarios:
Scenario 1 to 5 (Bars): You can define the exact number of bars for each of the 5 scenarios (Default: 1, 5, 14, 30, 60 bars).
The indicator simultaneously calculates and displays the required price to hit your OB/OS targets across all 5 time horizons. This allows you to observe how the target price dynamically shifts depending on how fast or slow the market moves.
🎨 Clean UI Dashboard
To keep your charts clean from visual clutter, all 10 projected target prices are displayed in a compact, non-intrusive table.
Table Position: Choose between Top-Right, Middle-Right, or Bottom-Right to ensure it never blocks your price action.
Text Size: Adjustable from Small to Large to fit your screen setup.
🔬 Under the Hood: Accuracy & Logic
Mathematical Precision: For Scenario 1 (Next Bar), the target is a 100% mathematically exact reverse-calculation. For multi-bar scenarios, the engine does not merely divide the required movement linearly. Instead, it utilizes an advanced ATR (Average True Range) step-distribution to simulate realistic market volatility, yielding a highly logical price estimate rather than a rigid straight line.
The Analytical Limitation: It is crucial to remember that a projected target is a mathematical destination assuming current momentum is maintained. Relying purely on technical analysis from a single timeframe has inherent limitations and can expose you to market noise.
💡 Practical Application & MTFA
Multi-Timeframe Analysis (MTFA): To overcome the limitations of single-timeframe chart analysis, it is highly recommended to combine this tool with MTFA. For example, if your higher-timeframe macro structure is in a bullish trend, look to execute limit buy orders exactly at the projected Oversold (OS) levels on your lower timeframe.
Dynamic Reference Levels: Use the projected prices as dynamic areas of interest to gauge where the market might become mathematically overextended.
Confluence: Combine these projected price matrixes with your existing chart analysis (e.g., support/resistance, order flow, or liquidity blocks) to identify high-probability zones for potential take-profits or limit entries. Indicator

RSI Entry EngineRSI Entry Engine
RSI Entry Engine is an open-source RSI-based entry framework built around one specific analytical idea:
when a smoothed RSI leaves an extreme condition and reclaims back through a defined threshold, that reclaim can be treated as a structured entry event rather than as a generic oscillator fluctuation.
This script is not designed to mark every RSI movement, and it is not intended to behave like a generic “overbought / oversold indicator” that treats all oscillator readings the same way. Its purpose is to smooth RSI behavior, define a hierarchy of RSI states, detect reclaim-style transitions out of extreme zones, and optionally map those reclaim events into a projected risk framework directly on the price chart.
The script also includes a compact status panel and an alert structure so users can monitor RSI condition, internal signal state, and projected trade behavior in a more organized way. These features are included to support analysis and review, not to imply future performance.
OPEN-SOURCE NOTE
This script is published open-source so users can inspect the logic directly, verify what the script is doing, and adapt parts of the workflow for their own research if they wish.
Even though the code is open, this description is intentionally detailed because many PulseWire users do not read Pine Script. The goal is for a user to understand what the script does, how it works, why its parts belong together, and how it may be used in practice without having to study the code line by line.
OVERVIEW
At a high level, the script does seven things:
1. It calculates a base RSI from a selected source and length.
2. It optionally smooths that RSI and also derives a separate signal line from the smoothed RSI.
3. It organizes RSI values into multiple zones such as overbought, oversold, extreme high, extreme low, bullish, bearish, and neutral.
4. It detects reclaim-style entry signals when the smoothed RSI exits an extreme condition by crossing back through the selected extreme boundary.
5. It can project entry, stop loss, and take profit structure onto the main chart.
6. It can maintain a compact status panel summarizing RSI state, momentum, and structure.
7. It provides alert conditions for RSI / signal crosses, reclaim events, centerline transitions, and optional trade outcomes.
The script is therefore meant to function as a complete RSI reclaim-entry and review framework rather than as a single-purpose oscillator plot.
CORE IDEA
Many RSI tools are used in one of two broad ways:
- as a visual overbought / oversold reference,
- or as a simple cross-based signal tool.
This script takes a narrower and more structured approach.
Its main idea is that a reclaim out of an extreme zone may be more useful than the extreme reading by itself.
In other words, the script does not assume that simply being overbought or oversold is enough. Instead, it focuses on the transition that occurs when smoothed RSI moves out of a more extreme condition and crosses back through a defined reclaim threshold.
That is the reason the main signal model is based on:
- reclaim above the extreme-low boundary for a bullish entry event,
- reclaim below the extreme-high boundary for a bearish entry event.
This means the script is not centered on “RSI is high” or “RSI is low” alone. It is centered on the moment when a smoothed oscillator moves from extreme positioning into a reclaim state that can be interpreted as a structured shift in short-term momentum.
WHY THIS SCRIPT IS NOT A SIMPLE MASHUP
This script combines several components, but they are not included simply to add more features to one publication.
Each part has a specific role inside the same analytical workflow:
- The RSI engine defines the core oscillator state.
- The smoothing layer reduces noise and makes reclaim logic less reactive to small fluctuations.
- The signal line provides a secondary internal reference for oscillator structure.
- The zone system divides RSI behavior into interpretable states such as neutral, bullish, bearish, oversold, overbought, and extreme conditions.
- The reclaim logic defines the actual entry event.
- The trade projection layer maps that event onto the price chart using entry, stop, and target logic.
- The panel and alerts organize the resulting information for monitoring and review.
These parts are interdependent.
Without RSI calculation, there is no oscillator framework.
Without smoothing, reclaim logic becomes more sensitive to noise.
Without the level structure, reclaim events lose contextual meaning.
Without the reclaim rule, the script becomes a more generic RSI plot.
Without trade projection, the user still has to manually draw entry, stop, and target after each signal.
Without the panel and alerts, the script offers less structure for monitoring and review.
For that reason, the script is intended as a single RSI reclaim-entry framework, not as a random collection of unrelated features.
WHAT THE SCRIPT DOES
The script calculates RSI from a selected source and length, then optionally smooths it using one of several averaging methods.
It also creates a signal line from the smoothed RSI.
Once those two internal series exist, the script can:
- classify RSI state using multiple threshold levels,
- highlight extreme conditions visually,
- detect reclaim signals out of extreme zones,
- plot labels on the RSI pane,
- project BUY / SELL trade structures on the main price chart,
- update TP / SL boxes over time,
- show a compact state panel,
- create alerts for multiple RSI-related events.
This means the script is not just an oscillator display. It is an oscillator-driven entry framework with optional on-chart trade projection.
HOW THE SCRIPT WORKS
1) RSI ENGINE
The script begins with a standard RSI calculation based on a user-selected source and length.
That raw RSI can then be smoothed using one of several methods:
- None,
- EMA,
- SMA,
- RMA.
The smoothed RSI is the main series used for interpretation and signaling.
A second line called the signal line is then derived from the smoothed RSI using its own smoothing method and length.
This creates two internal oscillator references:
- the smoothed RSI itself,
- and a signal line built from that smoothed RSI.
The spread between those two series is also used in the panel to describe whether RSI is currently above or below its signal structure.
2) RSI STATE MODEL
The script does not treat RSI as a single binary oscillator. It organizes RSI values into multiple states:
- Extreme High,
- Overbought,
- Bullish,
- Neutral,
- Bearish,
- Oversold,
- Extreme Low.
These states are determined by the user-defined threshold levels:
- Overbought,
- Oversold,
- Extreme High,
- Extreme Low,
- and the centerline area around 50.
This state model is important because it gives the reclaim signals context. A reclaim signal is not interpreted in isolation; it is interpreted relative to where the smoothed RSI has been and which region it is leaving.
3) LEVEL STRUCTURE
The script plots:
- 0,
- 100,
- 50 centerline,
- Overbought,
- Oversold,
- Extreme High,
- Extreme Low.
It also fills the overbought and oversold regions for easier visual reading, and can optionally highlight the background when RSI is in an extreme condition.
This visual structure is not only cosmetic. It helps the user see why the script treats certain transitions differently from ordinary oscillator movement.
4) PRIMARY ENTRY SIGNAL MODEL
The main entry logic is reclaim-based.
Bullish entry event:
- the smoothed RSI crosses upward through the Extreme Low level,
- and the bar must be confirmed on close.
Bearish entry event:
- the smoothed RSI crosses downward through the Extreme High level,
- and the bar must be confirmed on close.
This means the script does not trigger merely because RSI becomes extreme. Instead, it waits for RSI to transition back through the selected extreme boundary.
That distinction is important.
A low RSI reading alone can persist for multiple bars.
A reclaim above the extreme-low threshold is a different event.
Likewise, a high RSI reading alone can persist,
but a reclaim downward through the extreme-high threshold is a different event.
The script is built around that reclaim event rather than around static RSI position alone.
5) BAR-CLOSE CONFIRMATION
Signals are confirmed only on bar close.
This is an important implementation detail because RSI can move intrabar and then reverse before the bar closes. By requiring confirmation on the close, the script avoids treating temporary intrabar movement as a completed reclaim signal.
This makes the signal model more conservative and more stable.
6) OPTIONAL TRADE PROJECTION
When a valid bullish or bearish reclaim signal appears, the script can optionally project a trade framework onto the main price chart.
This is done even though the script itself is plotted in a separate RSI pane.
Depending on settings, the projection includes:
- entry reference,
- stop-loss calculation,
- take-profit projection,
- TP box,
- SL box,
- entry line,
- BUY or SELL label.
The user can choose the entry reference method:
- Close,
- Open,
- HLC3.
The user can also choose the stop-loss mode:
- Signal Candle,
- ATR,
- Percent.
This means the script separates signal generation from risk projection. The reclaim event comes from RSI behavior, but the projected stop logic can be adapted to different preferences.
7) STOP-LOSS MODES
The script supports three stop-loss methods:
Signal Candle:
The stop is based on the high or low of the signal candle, depending on trade direction.
ATR:
The stop is based on ATR distance from the projected entry.
Percent:
The stop is based on a percentage distance from entry.
This allows the same reclaim signal model to be projected using different risk frameworks without changing the core RSI logic.
8) TAKE-PROFIT PROJECTION
Take profit is projected using a risk/reward multiple applied to the chosen stop distance.
This means the target is not arbitrary. It is derived from the actual stop distance created by the selected stop-loss mode and then multiplied by the chosen RR value.
This makes the trade projection internally consistent:
signal
→ entry method
→ stop-loss method
→ risk distance
→ take-profit distance.
9) SAME-BAR TP / SL PRIORITY
The script includes an explicit rule for bars where both TP and SL appear to be touched after entry.
The user can choose whether the same-bar priority should be:
- SL,
- or TP.
This is an important implementation detail because it affects projected review behavior. Without an explicit priority rule, same-bar ambiguity can produce inconsistent outcome interpretation.
10) TRADE BOX MAINTENANCE
The script stores projected trades internally and extends TP / SL boxes and entry lines forward as long as the trade remains active.
It also limits how many historical projected trades remain visible by using a maximum stored trade setting. This keeps the chart more manageable and prevents the projection layer from expanding indefinitely.
11) STATUS PANEL
The script includes a compact panel that can display:
- the current RSI value,
- the signal-line value,
- the current RSI state,
- short-term momentum direction based on RSI change,
- whether RSI is above or below its signal line.
This panel is designed to summarize the oscillator’s state without requiring the user to read every value directly from the plot.
12) ALERT STRUCTURE
The script can generate alerts for several types of events:
- RSI crossing above its signal line,
- RSI crossing below its signal line,
- RSI reclaiming above oversold,
- RSI rejecting below overbought,
- RSI crossing above the centerline,
- RSI crossing below the centerline,
- bullish reclaim entry signal,
- bearish reclaim entry signal,
- projected TP hit,
- projected SL hit.
This allows the script to be used either visually or as an alert-based monitoring tool.
WHAT MAKES THIS SCRIPT ORIGINAL
This script uses familiar technical-analysis building blocks such as:
- RSI,
- smoothing methods,
- threshold zones,
- ATR-based risk projection,
- percentage-based stops,
- RR-based targets,
- on-chart annotation.
Those building blocks are not original by themselves.
The originality of this script is not in inventing a completely new oscillator primitive. The originality lies in how those familiar elements are arranged into one structured RSI reclaim workflow:
RSI calculation
→ smoothing
→ signal-line derivation
→ multi-zone RSI state model
→ reclaim detection out of extreme conditions
→ optional on-chart trade projection
→ panel-based monitoring
→ alert and review behavior
That full sequence is the main reason this script exists as its own publication.
It is not intended to be simply another RSI plot, another overbought / oversold overlay, another signal-line cross tool, or another TP / SL box script. It is specifically an RSI reclaim-entry framework that combines oscillator conditioning, reclaim detection, projection, and monitoring in one workflow.
WHAT APPEARS ON THE CHART
Depending on settings, the script may display in the RSI pane:
- smoothed RSI,
- the signal line,
- 0 / 100 bounds,
- centerline,
- overbought and oversold levels,
- extreme-high and extreme-low levels,
- overbought / oversold zone fill,
- optional extreme background highlights,
- UP / DOWN labels,
- a status panel.
On the main price chart, it may also display:
- BUY / SELL labels,
- entry line,
- TP box,
- SL box,
- TP hit labels,
- SL hit labels.
This split design is intentional. RSI analysis remains in the oscillator pane, while projected execution structure appears on the price chart.
HOW TO USE THE SCRIPT
A practical workflow is:
1. Add the script to a chart and choose the RSI source and RSI length.
2. Select whether the RSI should remain raw or be smoothed.
3. Configure the signal line used for internal oscillator structure.
4. Set the overbought, oversold, extreme-high, and extreme-low thresholds.
5. Decide whether you want trade projection on the main chart.
6. Choose entry mode, stop-loss mode, and risk/reward multiple.
7. Wait for a bullish or bearish reclaim signal to be confirmed on bar close.
8. Use the projected trade structure as an analysis framework rather than as a blind instruction.
9. Use the panel and alerts to monitor RSI state and signal transitions.
10. Adjust settings only after reviewing how the same logic behaves across the symbols and timeframes you actually use.
This script is best understood as a structured decision-support and review tool, not as a self-sufficient automated trading system.
SETTINGS REFERENCE
RSI Engine
- RSI Source: input source used for RSI calculation.
- RSI Length: length of the base RSI.
- RSI Smoothing: smoothing method applied to raw RSI.
- Smoothing Length: length of the first smoothing stage.
- Signal Length: length of the signal line.
- Signal Smoothing: smoothing method used for the signal line.
Zones
- Overbought: upper reference threshold.
- Oversold: lower reference threshold.
- Extreme High: upper extreme reclaim boundary.
- Extreme Low: lower extreme reclaim boundary.
Visuals
- Highlight Extreme Background: highlights the panel background during extreme conditions.
- Show Status Panel: enables or disables the panel.
- Panel Position: controls panel location.
- Panel Text Size: controls panel text size.
Trade Engine
- Show TP / SL Boxes On Main Chart: enables or disables price-chart projection.
- Entry Price: selects the projected entry reference.
- Stop Loss Mode: selects how stop loss is calculated.
- Risk Reward: sets the take-profit multiple.
- ATR Length: ATR length used when ATR stop mode is selected.
- ATR Multiplier: ATR multiplier used for ATR stop mode.
- Percent Stop Loss: percentage stop value used in Percent mode.
- Same Bar TP/SL Priority: defines which outcome wins when both are touched on one bar.
- Max Stored Trade Boxes: limits how many projected historical trades remain visible.
Alerts
- Enable RSI / Signal Cross Alerts: alerts for oscillator / signal crosses.
- Enable OB / OS Reclaim Alerts: alerts for reclaim behavior around overbought / oversold.
- Enable Centerline Alerts: alerts for 50-line crosses.
- Enable Entry Signal Alerts: alerts for bullish and bearish reclaim entries.
- Enable TP / SL Hit Alerts: alerts for projected trade outcomes.
IMPORTANT PRACTICAL NOTES
This script depends heavily on the chosen RSI thresholds.
If thresholds are too wide, signals may become very rare.
If thresholds are too narrow, signals may become too frequent.
Signal quality and frequency will also change depending on:
- RSI length,
- smoothing method,
- signal-line length,
- timeframe,
- symbol volatility,
- stop-loss mode.
Because trade projection is built from RSI events rather than from direct price-structure analysis, the projected boxes should be understood as a standardized review layer, not as proof that the market itself respects those projected levels.
LIMITATIONS AND SHORTCOMINGS
This script has important limitations:
- It is an oscillator-based reclaim model, not a full market-structure system.
- It does not identify support and resistance or discretionary chart structure.
- It does not claim that all extreme RSI conditions will reverse.
- It does not use volume profile, order flow, or trend structure beyond the oscillator model itself.
- Its signals depend on smoothing choices and threshold definitions.
- Projected TP / SL outcomes depend on the chosen entry and stop-loss method.
- Same-bar ambiguity is handled by a rule, not by true intrabar reconstruction.
- Historical projected trade behavior should not be interpreted as guaranteed live performance.
- No RSI-based reclaim model can remove all false signals or all regime-dependent behavior.
For those reasons, the script should be used as a structured analysis and review framework, not as a promise of future profitability.
WHO THIS SCRIPT MAY BE USEFUL FOR
This script may be useful for traders who:
- use RSI as a state and transition tool rather than as a static threshold indicator,
- care about reclaim behavior out of extreme zones,
- want optional projected risk structure on the price chart,
- want a compact RSI-state panel,
- want alert-based monitoring of oscillator events.
It may be less suitable for traders who:
- want a pure trend-following tool,
- want structural support / resistance logic,
- want a complete strategy with no need for outside confirmation,
- want projected trade statistics to be treated as live-execution evidence.
DISCLAIMER
This script is provided for educational and informational purposes only.
It does not constitute financial, investment, or trading advice.
Market conditions change, historical behavior does not guarantee future results, and users should perform their own analysis, validation, and risk management before using the script in live decision-making. Indicator

[ A L P H A X ] Reversal - RSI Divergence + WPR Timing EngineAlphaX Reversal — RSI Divergence Engine, Triple WPR Timing System, Multi-Confluence Confidence Scoring & Smart Entry/Exit Signals
AlphaX Reversal is a professional-grade reversal detection and signal system built on a dual-engine architecture combining RSI Divergence analysis with a triple-timeframe Williams %R timing system. It detects both regular and hidden divergences, scores every signal through a real-time multi-factor confidence engine, and produces clean tier-graded entry labels and exit markers — all governed by intelligent filters that eliminate low-quality setups automatically. Designed for reversal traders and swing scalpers on instruments like XAUUSD, indices, and forex majors.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔬 The Two-Engine Architecture — How It Works
AlphaX Reversal is powered by two independent engines that must both agree before any signal fires.
Engine 1 — RSI Divergence Detector
The first engine continuously monitors RSI pivot highs and lows against price pivot highs and lows, detecting four divergence types in real time:
Regular Bullish Divergence — price makes a lower low while RSI makes a higher low (classic exhaustion reversal)
Regular Bearish Divergence — price makes a higher high while RSI makes a lower high (classic distribution signal)
Hidden Bullish Divergence — price makes a higher low while RSI makes a lower low (trend continuation after pullback)
Hidden Bearish Divergence — price makes a lower high while RSI makes a higher high (distribution within a downtrend)
When a valid divergence pair is found, a line is drawn on the price chart between the two pivot points — immediate visual confirmation of the structure that triggered the signal.
Engine 2 — Triple WPR Timing System
The second engine runs three Williams %R oscillators simultaneously at different periods:
WPR Fast — the primary signal generator, reacting quickly to momentum shifts
WPR Medium — intermediate confirmation, filtering out fast WPR noise
WPR Slow — macro trend direction, used to gate counter-trend entries
A divergence signal from Engine 1 must be confirmed by a qualifying WPR condition from Engine 2 — a cross from an extreme zone, rising velocity, or a multi-bar recovery. This two-layer gate is what prevents AlphaX Reversal from firing on every minor oscillator wiggle.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 Four Divergence Types
AlphaX Reversal detects and distinguishes between four divergence structures, each labeled directly on the signal:
REG Bull — Regular Bullish. Price exhaustion at a new low while momentum is already recovering. Strongest reversal signal.
REG Bear — Regular Bearish. Price making new highs on declining momentum. Classic distribution.
HID Bull — Hidden Bullish. A pullback within an uptrend — trend continuation setup.
HID Bear — Hidden Bearish. A bounce within a downtrend — continuation of the bear move.
Regular divergences receive a higher base confidence score than hidden divergences, reflecting their stronger reversal probability.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🏷 Signal Tiers — S / A / B
Every entry signal is graded into one of three tiers based on its real-time confidence score:
S-Tier (70%+) — the highest quality setups. All major confluence factors aligned. Brightest label, strongest visual weight.
A-Tier (55–69%) — strong setups with most factors confirmed. Standard brightness.
B-Tier (35–54%) — valid setups that meet the minimum threshold. Dimmer label color.
Tier, divergence type, and confidence score are all displayed directly on every label — you always know the quality of the setup at a glance, without checking the dashboard.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🧠 Multi-Confluence Confidence Scoring
Every signal is scored by a real-time engine evaluating eight independent factors. Only signals meeting your configured Min Confidence % threshold are displayed.
Divergence Type Quality (up to 30 points)
Regular divergence — 30 points
Hidden divergence — 22 points
WPR Extreme Depth (up to 20 points)
How deeply the Fast WPR penetrated into oversold or overbought territory before recovering — deeper penetration scores higher
WPR Cross Timing (up to 15 points)
Cross from extreme zone — 15 points
Strong WPR velocity — 10 points
Multi-bar recovery in progress — 6 points
WPR Multi-Timeframe Alignment (up to 10 points)
All three WPR timeframes simultaneously in extreme territory (Triple OS/OB) — 10 points
Medium WPR in extreme zone — 7 points
WPR Slow Structural Context (up to 8 points)
Slow WPR aligned with the signal direction adds structural confirmation
Candle Confirmation (up to 7 points)
Strong-bodied candle closing in the signal direction — 7 points
Weaker confirming close — 4 points
Volume (up to 5 points)
Volume spike (1.5× average) — 5 points
Above-average volume — 3 points
RSI Depth Bonus (up to 5 points)
RSI below 25 (bull) or above 75 (bear) adds a bonus for extreme readings that reinforce the divergence
Penalty Deductions
RSI at opposite extreme — up to 10 points deducted
WPR Slow against the signal direction — up to 8 points deducted
Extreme WPR velocity (likely spike or wick) — up to 5 points deducted
The default minimum confidence is 35% — optimized for XAUUSD 1-minute to filter noise while keeping valid reversal setups. Increase to 45–55% for cleaner signals on higher timeframes.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🚪 Exit Markers
Red dot markers indicating where the WPR system detects counter-trend momentum building — time to consider taking profit or tightening stops
Exit markers appear as small red dots and fire only after a position is open:
During a long position — a bearish WPR signal triggers an exit dot above the bar
During a short position — a bullish WPR signal triggers an exit dot below the bar
Two independent exit modes are available and can be toggled separately:
Exit on Opposite Signal — exits the current position when a full opposing entry signal fires
Exit on WPR Exhaustion — exits when WPR crosses into the opposing extreme zone beyond your configured threshold
Use exit markers to take partial or full profit, tighten your stop loss, or pause new entries until the next signal confirms continuation.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📋 Live Dashboard
The built-in dashboard displays full system state in real time:
RSI — current value with color-coded extremes
WPR Fast / Medium / Slow — all three values with directional coloring
WPR Velocity — FLAT / RISING / FALLING / FAST with color grading
Divergence Status — the active divergence type on the current bar
Bull Confidence % — live score for the current bullish setup
Bear Confidence % — live score for the current bearish setup
Position — LONG / SHORT / FLAT tracking the active signal direction
Open P&L — real-time unrealized profit and loss in price and percentage
Volume — NORMAL / HIGH / SPIKE with current ratio vs 20-bar average
The dashboard can be positioned in any corner and text size is independently configurable.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🚀 How to Trade with AlphaX Reversal — Step by Step
Step 1 — Watch for a Divergence Line
When a divergence line appears connecting two pivots on the chart, Engine 1 has detected a valid structure
Check the dashboard Divergence Status row to confirm the type
Step 2 — Enter on the Signal Label
When the label fires, both engines have confirmed the setup
The label shows tier (S/A/B), divergence type (REG/HID), and confidence score directly on the bar
Place your stop loss beyond the price pivot that formed the divergence
Step 3 — Manage with the Dashboard
Monitor WPR Velocity and WPR Fast — rising values confirm the reversal is following through
Flat or reversing velocity warns that momentum is stalling early
Step 4 — Exit on the Red Dot
When a red exit dot appears, counter-trend momentum has built sufficiently to trigger the exit engine
Take partial or full profit, or tighten your stop
Step 5 — Reset and Wait
After an exit, wait for the next divergence structure before re-entering
Do not force entries between signals
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚡ Key Features
🔬 Dual-engine architecture — RSI Divergence and triple WPR timing must both confirm before any signal fires
📐 Four divergence types — Regular Bullish, Regular Bearish, Hidden Bullish, Hidden Bearish — detected and labeled distinctly
🏷 Three signal tiers (S / A / B) — confidence-graded labels with visual weight matching signal quality
🧠 Multi-factor confidence scoring — divergence type, WPR depth, velocity, timing, candle body, volume, RSI depth, and penalties
📉 Divergence lines drawn automatically — visual confirmation of the exact pivot pair that triggered the signal
🔴 Smart exit markers — red dots that fire only after a position is open, triggered by WPR exhaustion or opposing signal
📋 Full live dashboard — RSI, three WPR values, velocity, divergence status, confidence scores, position, P&L, and volume in one panel
⏱ Signal cooldown filter — prevents repeated signals during volatile whipsaw conditions
🎨 Cohesive dual-tone color theme — yellow-green for bullish, red for bearish, gray for exits and neutral states
🔔 17 alert conditions — tiered entry alerts, exit alerts, divergence detection alerts, and WPR extreme alerts
⚙ Fully configurable — all periods, thresholds, divergence widths, colors, and exit modes adjustable
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚙ Settings Reference
RSI Divergence
RSI Period — base RSI calculation period (default: 9)
RSI Pivot Lookback — pivot detection sensitivity (default: 3)
Max Divergence Width — maximum bars between the two pivot points (default: 40)
Min Divergence Width — minimum bars between the two pivot points (default: 5)
Show Divergence Lines — toggle the connecting lines on the price chart
WPR Timing
WPR Fast / Medium / Slow Period — three independent WPR periods (defaults: 8 / 21 / 55)
WPR Oversold / Overbought Levels — extreme zone thresholds (defaults: -82 / -18)
Signal Filters
Min Confidence % — minimum score to display a signal (default: 35%)
Signal Cooldown — minimum bars between consecutive signals (default: 6)
Require Volume Confirm — optional volume gate using a minimum ratio vs 20-bar average
Exits
Exit on Opposite Signal — exit the current position when an opposing signal fires
Exit on WPR Exhaustion — exit when WPR crosses into the opposing extreme zone
WPR Exit Bull / Bear Levels — configurable WPR thresholds for the exhaustion exit
Appearance & Dashboard
Label Size — Tiny / Small / Normal
Dashboard Text Size — Tiny / Small / Normal
Show Dashboard — toggle the live overlay panel
Dashboard Position — Top Left / Top Right / Bottom Left / Bottom Right
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔔 Alert Conditions
S-Tier Bull Reversal — bullish signals scoring 70%+
A-Tier Bull Reversal — bullish signals scoring 55–69%
B-Tier Bull Reversal — bullish signals scoring 35–54%
S-Tier Bear Reversal — bearish signals scoring 70%+
A-Tier Bear Reversal — bearish signals scoring 55–69%
B-Tier Bear Reversal — bearish signals scoring 35–54%
Any Bull Reversal — all bullish entry signals combined
Any Bear Reversal — all bearish entry signals combined
Any Reversal Signal — all entries combined
Bull Exit — long position exit signal
Bear Exit — short position exit signal
Any Exit — all exits combined
Regular Bull Divergence Detected
Regular Bear Divergence Detected
Hidden Bull Divergence Detected
Hidden Bear Divergence Detected
Triple WPR Oversold — all three WPR periods simultaneously in oversold territory
Triple WPR Overbought — all three WPR periods simultaneously in overbought territory
All alert messages include {{ticker}} and {{interval}} placeholders for clean webhook integration.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 Default Settings — Optimized For
The default configuration is specifically tuned for XAUUSD (Gold) on the 1-minute and 5-minute timeframes :
Confidence threshold at 35% filters low-quality setups while keeping valid reversal signals
Cooldown at 6 bars prevents label spam during volatile back-and-forth conditions
WPR periods (8 / 21 / 55) calibrated for gold's fast-moving intraday reversal structure
Divergence width of 5–40 bars captures the relevant reversal structures without reaching too far back
For other instruments or timeframes, adjust:
Higher timeframes (15m, 1H) — increase RSI Pivot Lookback to 4–5, increase Min Confidence to 40–50%, widen Max Divergence Width to 50–60
Forex majors — defaults work well; reduce RSI Period to 7 for faster detection
Indices (NAS100, US30) — increase WPR Slow to 89 for broader trend context
Less noise — increase Min Confidence %, increase Cooldown, reduce Max Divergence Width
More signals — decrease Min Confidence %, decrease Cooldown, widen divergence window
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
👥 Who This Is For
🥇 Gold (XAUUSD) reversal traders — built and tested on gold's sharp intraday reversal character
📉 Forex and index swing traders — applicable to any instrument that exhibits momentum divergence at turning points
🧠 Systematic traders — the tiered confidence scoring gives a quantitative quality framework, not just visual arrows
📈 Traders who want to know why — every signal shows its tier, divergence type, and score directly on the label
⚠ Traders who struggle with overtrading — the dual-engine confirmation gate and confidence threshold physically prevent weak signals from appearing
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📝 Notes
All signals are confirmed on bar close — no repainting
Divergence lines connect the actual price pivot points used to generate the signal
The position tracker and P&L display are internal to the indicator and do not connect to your broker account
Maximum 500 labels and 500 lines — on very low timeframes with extended history, oldest drawings may be removed automatically by PulseWire's rendering limits
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠ Disclaimer
This indicator is a technical analysis and visualization tool intended for educational and informational purposes only. It does not constitute financial advice or a recommendation to buy or sell any financial instrument. All signals are generated from historical and real-time price data using mathematical calculations — their accuracy or profitability is not guaranteed. Past performance of any signal type does not guarantee future results. Always conduct your own analysis, use proper risk management, and consult a licensed financial advisor before making any trading decisions. The author accepts no responsibility for any losses incurred from the use of this indicator.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Built for traders who want to see the divergence, understand the confirmation, and act with confidence. Indicator

RSI Divergence (Regular + Hidden + Live) - StableLogicTake your momentum trading to the next level with the RSI Divergence (Regular + Hidden + Live) indicator . This tool doesn't just look at the past; it actively tracks developing price action to spot potential reversals and trend continuations before they fully form.
Packed with a clean, gradient-based UI, this indicator automatically scans for four specific types of divergences and visually plots them directly on your oscillator panel.
🌟 Key Features
Complete Divergence Detection: Automatically identifies and plots all four major types of divergence:
Regular Bullish: Price makes a Lower Low, but RSI makes a Higher Low (Trend Reversal).
Regular Bearish: Price makes a Higher High, but RSI makes a Lower High (Trend Reversal).
Hidden Bullish: Price makes a Higher Low, but RSI makes a Lower Low (Trend Continuation).
Hidden Bearish: Price makes a Lower High, but RSI makes a Higher High (Trend Continuation).
Live "Pending" Divergences: Unlike traditional indicators that only plot after a pivot is fully confirmed (which inherently causes lag), this script features a Live Tracking engine. It compares the current real-time candle to the last confirmed pivot, drawing a dashed line to warn you of a developing divergence.
Smart Invalidation Logic: The live tracking feature includes a mathematical crossover check. If the RSI line breaks the divergence trendline prematurely, the pending signal is automatically invalidated, keeping your chart free of false signals.
Modern Visuals: Features sleek gradient fills for the Overbought (>70) and Oversold (<30) zones, making momentum extremes easy to spot at a glance.
⚙️ Settings & Customization
RSI Length: Standard RSI lookback period (Default: 14).
Pivot Lookback (Delay): Determines how many bars are required to confirm a swing high or low. A lower number (e.g., 3) makes the indicator faster but slightly riskier/noisier. The default of 5 is a balanced standard.
History Depth: Controls how far back the indicator searches for past pivots to compare against (Default: 20).
Show Live (Pending)?: Toggle the real-time dashed tracking lines on or off.
Custom Colors: Fully customize the line and label colors for every single type of divergence to match your personal chart theme.
Pro Tips for Trading Divergence
Pending = Prepare: When you see a dashed orange "Live Pending" line, do not enter immediately. Use it as a warning to get your trigger ready. Wait for the candle to close or look for a confirmation signal (like a bullish engulfing or pin bar) on the price chart.
Context is King: Regular divergences work best at major support/resistance levels. Hidden divergences work best when trading with the higher timeframe trend.
Combine Tools: RSI divergence is a powerful tool, but it shouldn't be used in isolation. Combine it with Volume, Moving Averages, or Market Structure breaks for high-probability setups.
*** Disclaimer: This script is for educational and analytical purposes only and does not constitute financial advice. Indicator

RSI Panel Pro [UgurTash]RSI Panel Pro
A clean, feature-rich RSI panel designed by UgurTash. It displays RSI momentum, a signal line, a histogram and pivot markers all in one dedicated pane below your chart.
━━━━━━━━━━━━━━━━━━━━━━━━━━━
WHAT IS INCLUDED
━━━━━━━━━━━━━━━━━━━━━━━━━━━
RSI Line
The main RSI line changes color dynamically based on direction. Green when RSI is rising, red when RSI is falling. This gives you an instant read on momentum without needing to analyze the curve.
Signal Line (EMA of RSI)
A smoothed EMA applied directly to the RSI value. When RSI crosses above the signal line it indicates building bullish momentum. When RSI crosses below, bearish momentum is building. You can adjust the signal line length to suit your trading style.
RSI Histogram
Shows the distance between RSI and the 50 midline as a bar chart. Green bars above zero indicate bullish momentum. Red bars below zero indicate bearish momentum. The histogram makes it easy to spot momentum shifts at a glance.
Overbought and Oversold Zones
Clearly shaded zones above and below your defined overbought and oversold levels. The background of the panel also changes color when RSI enters these extreme zones, giving you an immediate visual alert.
Pivot Markers
Green and red circles appear directly on the RSI line at confirmed pivot highs and lows. These correspond to the same pivot points used by the divergence indicator. Set the Pivot Left and Pivot Right values here to match your settings in the main indicator for perfect alignment.
━━━━━━━━━━━━━━━━━━━━━━━━━━━
SETTINGS GUIDE
━━━━━━━━━━━━━━━━━━━━━━━━━━━
RSI Length
Match this to the RSI Length in the Divergence Scalper. Default is 14.
Overbought / Oversold Levels
Default values are 70 and 30. You can tighten these to 75 and 25 for fewer but more extreme signals, or loosen to 65 and 35 for earlier warnings.
Signal Line Length
Default is 9. Lower values make the signal line more reactive. Higher values make it smoother and reduce false crossovers.
Show RSI Histogram
Toggle the histogram bars on or off depending on your preference.
Show Pivot Markers
Toggle the green and red circles on the RSI line. Set Pivot Left and Pivot Right to match your divergence indicator settings exactly.
━━━━━━━━━━━━━━━━━━━━━━━━━━━
HOW TO READ THE PANEL
━━━━━━━━━━━━━━━━━━━━━━━━━━━
Strong Bullish Setup:
RSI below 30, RSI line turning green, histogram bars crossing from red to green, RSI crossing above signal line, green circle pivot marker visible.
Strong Bearish Setup:
RSI above 70, RSI line turning red, histogram bars crossing from green to red, RSI crossing below signal line, red circle pivot marker visible.
Momentum Shift Warning:
Watch for RSI and signal line crossovers near the 50 midline. These often precede trending moves and can confirm divergence signals from the main indicator.
━━━━━━━━━━━━━━━━━━━━━━━━━━━
STATS PANEL
━━━━━━━━━━━━━━━━━━━━━━━━━━━
A small information table in the top right corner of the RSI pane displays:
- Current RSI value (color coded by zone)
- Signal EMA value
- Current zone status: Overbought, Oversold or Neutral
━━━━━━━━━━━━━━━━━━━━━━━━━━━
RECOMMENDED USE
━━━━━━━━━━━━━━━━━━━━━━━━━━━
This panel is designed to complement the RSI Divergence Scalper . Use both together:
Step 1: A divergence label appears on the price chart from the main indicator.
Step 2: Check this RSI panel to confirm RSI is in the correct zone and momentum is turning.
Step 3: Look for RSI crossing above or below the signal line as additional confirmation.
Step 4: Enter the trade with greater confidence.
━━━━━━━━━━━━━━━━━━━━━━━━━━━
NOTES
━━━━━━━━━━━━━━━━━━━━━━━━━━━
- Works on all markets and timeframes.
- Always match RSI Length and Pivot settings to your Divergence Scalper settings.
- No indicator guarantees profitable trades. Always use proper risk management.
Created by UgurTash Indicator

Relative Strength Regime Meter (SPY/QQQ/Peer Auto)RS Dash v2 is a relative strength (RS) dashboard designed to quickly answer one question:
Is this asset leading or lagging vs (1) the market, (2) Nasdaq/growth, and (3) its peer group?
What it measures
For the current chart symbol, it calculates RS ratios:
RS vs SPY (market baseline)
RS vs QQQ (Nasdaq / growth baseline)
RS vs PEER ETF (sector/industry baseline)
RS ratio is simply:
RS = Symbol Close / Benchmark Close
Then it compares each RS ratio to its moving average (MA):
✅ if RS > RS_MA
Optional stricter rule: ✅ only if RS > RS_MA and RS_MA is rising
Peer ETF: Manual or Auto
You can pick the peer ETF in two ways:
MANUAL mode
Choose from labeled options like:
XLK – TECH, XLE – ENERGY, SMH – SEMIS, etc.
AUTO mode (default)
The script selects the peer ETF whose returns have the highest correlation to the symbol over a lookback window, with guardrails:
Min correlation threshold: if correlation is too low, it falls back to your chosen fallback peer.
Sticky switching: it only changes peer when the new best peer is better by a set margin (reduces “flicker”).
The table shows what AUTO picked, and it also prints the correlation as a trust meter.
Dashboard + Score
A table (bottom-left) shows:
SPY ✅/❌
QQQ ✅/❌
PEER ✅/❌ (with chosen peer name)
Total score 0–3
Interpretation:
3/3 = strong leadership (outperforming market + Nasdaq + peers)
2/3 = mixed leadership
0–1/3 = weak / lagging regime
Plot modes (solves scaling issues)
Because raw RS ratios can be on very different numeric scales, there are three plot modes:
Signal (% vs RS MA) (recommended)
Plots each RS as % above/below its RS MA where 0 = neutral.
Indexed (Base 100)
Normalizes each RS to start at 100 so you can compare “performance curves.”
Raw (single)
Shows only one RS ratio at a time (SPY / QQQ / PEER) for inspection.
Leadership line (Regime meter)
The Leadership line is a step line that visualizes the 0–3 score as a regime meter (it only has 4 states, by design). It helps you spot regime shifts without reading the table.
Divergences (optional)
Optional bullish/bearish divergence markers compare price pivots vs RS pivots on your chosen benchmark (SPY/QQQ/PEER). These are confirmation tools, not signals by themselves.
What this indicator is NOT
It does not predict tops/bottoms.
It does not replace fundamentals or risk management.
“AUTO peer” is correlation-based; in unusual regimes it can pick a peer that’s statistically close but not conceptually perfect — override with MANUAL when needed.
Suggested workflow
Keep plot mode on Signal (% vs RS MA)
Use AUTO peer for speed; flip to MANUAL if the chosen peer doesn’t make sense.
Use score changes + divergences as context, then use your main price/volume system for entries/exits.
Open-source, modify as you like.
Shorter description
RS Dash v2 compares the current symbol’s relative strength vs SPY, QQQ, and a Peer ETF (manual or auto-selected).
Each benchmark gets a ✅/❌ based on whether RS > RS_MA (optional: MA rising). The dashboard shows a 0–3 score and a Leadership step line that visualizes regime shifts.
Includes 3 plot modes to fix scaling: Signal (% vs MA), Indexed Base 100, and Raw single. Optional RS divergences.
Settings explanation
RS MA length: smoothing for RS trend. Higher = slower, fewer flips.
Auto return length / correlation lookback: controls how AUTO chooses the peer. Higher = more stable but slower to adapt.
Min corr / switch delta: guardrails to prevent nonsense picks and rapid switching.
Plot mode: choose Signal for decision clarity, Indexed for comparison curves, Raw for inspection.
Blunt “professional honesty” note
Correlation-based peer selection is a statistical best guess, not a fundamental sector classifier. That’s why the indicator is transparent: it shows the selected peer and correlation so users can override. Indicator

Indicator

Indicator

Indicator

Indicator

Indicator
