CVD + SMT DIVERGENCE VWAP ULTIMATE## **CVD + SMT DIVERGENCE VWAP ULTIMATE v2**
### **Overview**
CVD + SMT DIVERGENCE VWAP ULTIMATE v2 is an advanced, institutional-grade scalp engine engineered specifically for index futures traders (optimized for NQ/ES). It merges custom session-reset Cumulative Volume Delta (CVD) divergence detection, multi-asset SMT (Smart Money Technique) confirmation, dynamic standard deviation VWAP channels, and high-contrast neon visual themes into a single, cohesive ecosystem.
---
### **Key Features**
* **Session-Reset CVD Divergence Engine:** Tracks aggressive buying and selling pressure by anchoring delta calculations directly to the regular session open, filtering out noise and pinpointing genuine reversal setups via pivot confirmation.
* **Cross-Asset SMT Confirmation:** Automatically cross-references price action and extremes against correlated instruments (ES, YM, GC) to flag institutional divergences and trap setups.
* **Multi-StdDev VWAP & Dynamic Channels:** Features anchored VWAPs with customizable standard deviation multiplier bands (+/-1, +/-2, +/-3) and gradient cloud fills, alongside higher timeframe Weekly and Monthly VWAP references.
* **Integrated Session & Opening Range Tracker:** Built upon a modified framework of BigBeluga’s session engine, featuring custom boxes, mid-range lines, volume/delta statistics, and an on-chart session dashboard for Tokyo, London, New York, and the Opening Range / Initial Balance.
Indicator

SMT Divergence Matrix [JOAT]════════════════════════════════
SMT DIVERGENCE MATRIX
════════════════════════════════
Smart Money Technique divergence, automated. This tool watches your chart symbol against up to two correlated reference assets and flags the moment they disagree at a swing — the classic footprint of one market failing to confirm another. When your chart carves a new low that a correlated market refuses to match, that non-confirmation is highlighted as a potential turn.
▎ WHAT IT DOES
It compares swing highs and lows on your chart to the same swings on two reference instruments and looks for SMT divergence — where the assets normally move together but split at a pivot. Each qualifying event is drawn as a connector line between the two chart pivots, tagged with a BUY or SELL pill, and paired with an optional ATR-based stop and target zone. A dashboard reports live correlation, structure, and which reference triggered.
▎ HOW IT WORKS
• Swing detection — confirmed pivot highs and lows are located on the chart using a configurable left/right pivot length . Larger values isolate more significant swings.
• Reference sync — the same high/low/close series are pulled for up to two reference assets on your chart's timeframe, guarded against invalid symbols.
• Bullish SMT — the chart prints a lower low while a correlated reference prints a higher low . That failure to confirm the downside is read as bullish non-confirmation.
• Bearish SMT — the chart prints a higher high while a correlated reference prints a lower high , reading as bearish non-confirmation.
• Either reference can trigger — a signal fires from whichever asset fails to confirm; the dashboard shows REF1, REF2, or both.
• Correlation filter — rolling correlation between chart and reference is measured over a lookback. SMT only makes sense when assets normally track together, so signals can be restricted to references whose correlation is currently at or above a minimum.
• Confirmation filter — the triggering bar can be gated by RSI momentum turning in the signal direction, by a directional candle close, by both , or by nothing.
• Cooldown — a minimum bar gap between same-direction signals prevents clustering, and the engine never fires a buy and sell on the same bar.
• Trade zones — on each signal, entry is taken at the close, stop is placed a chosen ATR multiple away, and the target is projected at your risk/reward ratio. The zones live-extend to the right each bar and freeze the moment price touches the stop or target.
▎ HOW TO USE IT
• Set Reference Asset 1 and 2 to instruments that genuinely correlate with your chart (index futures, sector peers, a lead/lag pair). The technique is only meaningful when the assets normally move together.
• A BUY pill below price marks bullish non-confirmation; a SELL pill above price marks bearish non-confirmation. The pill text names the reference that triggered.
• The divergence line connects the two chart pivots involved, so you can see the exact swings being compared.
• Treat the red zone as risk (entry-to-stop) and the blue/violet zone as reward (entry-to-target). Use them as a visual framework, not a mechanical order.
• Combine signals with your own read of market structure, session timing, and key levels rather than trading them in isolation.
▎ KEY SETTINGS
• Engine — swing pivot length, the two reference symbols and their enable toggles, and correlation lookback.
• Filters — confirmation mode (None / RSI / Candle / Both), RSI length, positive-correlation requirement with a minimum threshold, and signal cooldown.
• Trade Model — show ATR SL/TP toggle, ATR length, stop distance in ATR multiples, risk/reward target, and a cap on drawn setups for performance.
• Visuals — divergence lines, signal labels, pivot markers, label size, custom bull/bear colors, an optional candle zone-reader, and a session VWAP with ±σ bands.
• Dashboard — show toggle, position, and text size.
▎ DASHBOARD
The panel reports correlation state and value for each reference (Strong+, Positive, Weak, Negative, Strong−, or OFF), the last SMT side with the triggering reference, current market structure (HH / HL / LH / LL), running bull/bear counts , total divergences , live signal status , and current ATR .
▎ ALERTS
• Bullish SMT — chart lower low versus a correlated higher low.
• Bearish SMT — chart higher high versus a correlated lower high.
Both include ticker and interval placeholders in the message.
▎ NOTES
• Works on any symbol and any timeframe; references are read on the chart's own timeframe.
• Signals are based on confirmed pivots, which require the configured right-side bars to close before a swing is validated.
• Colored candles and VWAP bands are off by default for a clean chart, and the drawn-setup cap keeps performance stable.
• Reference data uses non-lookahead requests and tolerates invalid symbols without breaking the script.
For research and education only. This is not financial advice. No indicator predicts the future, on-chart signals and counts are illustrative of historical behavior only, and past behavior does not guarantee future results. Always manage your own risk.
Made with passion by JackOfAllTrades ⚡ Indicator

Adaptive Cycle Momentum Oscillator [ZurvanEG]⯁ Adaptive Cycle Momentum Oscillator
◇ Overview
MOM is a cycle-adaptive momentum oscillator built to present market direction, strength, fatigue, volatility compression and saturation within one coherent framework.
Unlike conventional momentum oscillators that apply the same lookback to every market condition, MOM can adjust its momentum window to the market’s active rhythm. This allows its response to become faster or slower as market behaviour changes, while a fixed-length mode remains available for users who require consistent settings.
Beyond measuring momentum, MOM adds context to the reading. It distinguishes strengthening movement from fading pressure, reduces the influence of momentum formed during volatility compression, identifies statistically unusual momentum zones, and detects confirmed divergence structures.
The objective is not to produce more signals or predict every reversal. It is to provide a cleaner and more informative view of momentum—showing not only its direction, but also the conditions under which it is developing.
◈ Key Features
◇ Adaptive Momentum
Automatically adjusts the momentum lookback as market rhythm changes. Fixed mode can be selected whenever a constant length is preferred.
◇ Momentum Regime
Classifies momentum as bullish, bearish or neutral. Separate entry and exit levels reduce unstable regime switching around the dead zone.
◇ Strength & Fatigue
The line gradient shows direction and magnitude, while color strength distinguishes expanding momentum from momentum fading toward zero.
◇ Volatility Squeeze
Detects compressed volatility and reduces momentum produced inside quiet conditions. Squeeze intensity can also be displayed as a variable background.
◇ Saturation Bands
Adaptive upper and lower bands identify momentum readings that are extreme relative to the oscillator’s own recent behavior. They should be treated as saturation zones, not automatic reversal signals.
◇ Divergence
Detects confirmed regular and hidden bullish or bearish divergence. Signals can optionally be restricted to pivots occurring beyond the saturation bands to filter weaker mid-range structures.
◇ Visuals & Information
Optional candle coloring transfers the oscillator’s momentum gradient to the main chart. A compact table displays the current regime, momentum value and slope state, with optional cycle, length, squeeze and divergence diagnostics.
◇ Alerts
Independent alerts are available for:
⬦ Bullish and bearish regime shifts
⬦ Upper and lower saturation contacts
⬦ Squeeze entry and release
⬦ Confirmed bullish and bearish divergence
◈ Interpretation
Adaptive Cycle Momentum Oscillator helps answer:
⬦ Is momentum bullish, bearish or neutral?
⬦ Is the current move strengthening or fading?
⬦ Was momentum produced during expansion or compression?
⬦ Is the reading unusually saturated for this market?
⬦ Has a meaningful divergence been confirmed?
◈ Notes
⬦ Adaptive mode requires sufficient historical data for cycle estimation.
⬦ Divergences appear after pivot confirmation and are therefore delayed by design.
⬦ Saturation does not guarantee reversal, especially during strong trends.
⬦ Squeeze attenuation provides context; it does not predict breakout direction.
◈ Conclusion
Adaptive Cycle Momentum Oscillator is designed as a complete momentum-analysis framework rather than a simple oscillator or signal generator. It combines adaptive measurement, stable directional regimes, strength and fatigue colouring, volatility context, dynamic saturation bands and confirmed divergence in a single visual system.
By adapting to market rhythm and evaluating momentum within its surrounding conditions, MOM helps separate meaningful directional pressure from weak movement produced inside noise or compression. Its visual structure is intended to make changes in direction, intensity and exhaustion recognizable without requiring several overlapping indicators.
MOM does not attempt to replace price structure, risk management or trading confirmation. Its role is to provide a clearer and more consistent momentum perspective that can support trend analysis, pullback evaluation, saturation monitoring and divergence assessment across different instruments and timeframes.
Indicator

Echo Vector PVSRA Volume### Credits and licence
The starting point for the relative-volume and volume-spread classification framework was the open-source “Traders Reality PVSRA Volume Suite,” originally created by infernix with library integration by peshocore, under the Mozilla Public License 2.0.
This derivative is independently named and does not use the Traders Reality or Pattern Watchers names as its branding.
The imported library calculation has been replaced with script-level calculations. This implementation adds configurable volume tiers, price-extension filters, volume divergence, optional divergence lines, extreme-volume event detection, body-recovery measurements, expanded alerts, and simplified historical outcome tables.
### Overview
Echo Volume Structure is a volume-analysis indicator that classifies candles according to:
* reported volume;
* candle direction;
* candle range;
* volume multiplied by candle range;
* body size;
* price extension from a configurable EMA.
The classifications are displayed as colour-coded volume columns in a separate pane.
Users can optionally apply the same classification colours to the candles on the main price chart.
The script also includes:
* regular bullish and bearish volume divergence;
* divergence markers and configurable lines;
* extreme-volume event diamonds;
* body-recovery tracking;
* simplified divergence target/stop outcomes;
* recovery statistics;
* configurable alerts.
The indicator identifies when its mathematical conditions are present. It does not establish why the activity occurred and does not predict what price will do afterward.
### Data source
By default, the indicator uses OHLC and volume data from the active chart symbol and timeframe.
The requested values include:
* open;
* high;
* low;
* close;
* volume.
The data is requested with lookahead disabled.
### Symbol override
Users can optionally analyze data from a different symbol instead of the active chart symbol.
The override can also contain a combination of compatible feeds, such as multiple exchange symbols added together.
Adding several data feeds can increase processing requirements.
When symbol override is enabled, users should confirm that the selected source is meaningfully related to the active chart.
Differences in exchange activity, trading hours, price scale, market structure, and volume reporting can cause the classifications to differ from those produced by the chart symbol.
### Volume-spread calculation
The script calculates a volume-spread value by multiplying candle volume by the candle’s high-to-low range.
This allows the classification process to consider both:
* the amount of reported volume;
* the price range produced during that volume.
A candle may qualify for an elevated classification because its volume is unusually high, its volume-spread value is unusually large, or it meets a combination of volume, body-size, and price-extension conditions.
### Candle-classification hierarchy
The script applies a fixed priority hierarchy.
When a candle qualifies for more than one classification, the highest active tier determines its colour.
The hierarchy from highest to lowest is:
1. Echo Peak Up or Echo Valley Down;
2. Ultra Up or Ultra Down;
3. Echo Surge Up or Echo Surge Down;
4. Echo Pulse Up or Echo Pulse Down;
5. Normal Up or Normal Down.
The classifications are internal analytical categories. They are not measurements of trade quality and do not guarantee reversal or continuation.
### Default colour key
The default candle classifications and colours are:
* Echo Peak Up — bright green;
* Echo Valley Down — bright red;
* Ultra Up — dark green;
* Ultra Down — dark red;
* Echo Surge Up — lime green;
* Echo Surge Down — light red;
* Echo Pulse Up — blue;
* Echo Pulse Down — fuchsia;
* Normal Up — light grey;
* Normal Down — dark grey;
* Extreme Volume Event — yellow diamond;
* Bullish Volume Divergence — turquoise upward triangle;
* Bearish Volume Divergence — coral-red downward triangle.
All classification, divergence, and line colours can be adjusted in the indicator settings.
### Echo Peak Up — bright green
An Echo Peak Up candle is bright green by default.
It requires:
* an up candle;
* volume at or above the selected multiple of the longer-term average volume;
* a candle body above the selected multiple of its average body size;
* price above the selected EMA by more than the configured standard-deviation distance.
The longer-term volume, body, EMA, and deviation settings are independently configurable.
Echo Peak Up identifies an unusually large bullish candle occurring while price is extended above its recent mean.
It may be examined as possible climactic or blow-off activity, but it does not prove that a market top has formed.
Price may continue rising after an Echo Peak Up candle.
### Echo Valley Down — bright red
An Echo Valley Down candle is bright red by default.
It requires:
* a down candle;
* volume at or above the selected multiple of the longer-term average volume;
* a candle body above the selected multiple of its average body size;
* price below the selected EMA by more than the configured standard-deviation distance.
Echo Valley Down identifies an unusually large bearish candle occurring while price is extended below its recent mean.
It may be examined as possible climactic or exhaustion activity, but it does not prove that a market bottom has formed.
Price may continue falling after an Echo Valley Down candle.
### Ultra Up — dark green
An Ultra Up candle is dark green by default.
It occurs when:
* the candle closes above its open;
* volume reaches the selected Ultra multiple of the longer-term average;
* the candle does not meet all the additional body-size and price-extension requirements of Echo Peak Up.
Ultra Up identifies exceptionally high reported volume on an up candle relative to the selected baseline.
It does not determine whether the activity represents accumulation, distribution, continuation, short covering, or reversal.
### Ultra Down — dark red
An Ultra Down candle is dark red by default.
It occurs when:
* the candle closes at or below its open;
* volume reaches the selected Ultra multiple of the longer-term average;
* the candle does not meet all the additional body-size and price-extension requirements of Echo Valley Down.
Ultra Down identifies exceptionally high reported volume on a down candle relative to the selected baseline.
It does not determine whether the activity represents accumulation, distribution, liquidation, continuation, or reversal.
### Echo Surge Up — lime green
An Echo Surge Up candle is lime green by default.
It is an up candle that meets at least one of the following conditions:
* volume reaches the selected Surge multiple of the recent average volume;
* the candle’s volume-spread value reaches or exceeds the highest previous volume-spread value within the selected lookback.
The candle must not already qualify for Echo Peak Up or Ultra Up.
Echo Surge Up identifies elevated volume or volume-spread activity on an up candle.
It is not an automatic bullish entry signal and does not guarantee that price will continue rising.
### Echo Surge Down — light red
An Echo Surge Down candle is light red by default.
It is a down candle that meets at least one of the following conditions:
* volume reaches the selected Surge multiple of the recent average volume;
* the candle’s volume-spread value reaches or exceeds the highest previous volume-spread value within the selected lookback.
The candle must not already qualify for Echo Valley Down or Ultra Down.
Echo Surge Down identifies elevated volume or volume-spread activity on a down candle.
It is not an automatic bearish entry signal and does not guarantee that price will continue falling.
### Echo Pulse Up — blue
An Echo Pulse Up candle is blue by default.
It occurs when:
* the candle closes above its open;
* volume reaches the selected Pulse multiple of the recent average;
* the candle does not qualify for Echo Peak Up, Ultra Up, or Echo Surge Up.
Echo Pulse Up represents moderately elevated volume on an up candle relative to the selected lookback.
It does not guarantee that upward movement will continue.
### Echo Pulse Down — fuchsia
An Echo Pulse Down candle is fuchsia by default.
It occurs when:
* the candle closes at or below its open;
* volume reaches the selected Pulse multiple of the recent average;
* the candle does not qualify for Echo Valley Down, Ultra Down, or Echo Surge Down.
Echo Pulse Down represents moderately elevated volume on a down candle relative to the selected lookback.
It does not guarantee that downward movement will continue.
### Normal Up — light grey
A Normal Up candle is light grey by default.
It closes above its open but does not meet any enabled elevated-volume classification.
A normal classification does not mean that the candle is unimportant. It means only that the selected relative-volume and volume-spread thresholds were not reached.
### Normal Down — dark grey
A Normal Down candle is dark grey by default.
It closes at or below its open but does not meet any enabled elevated-volume classification.
A normal classification does not mean that the candle is unimportant. It means only that the selected relative-volume and volume-spread thresholds were not reached.
### How to interpret the colours
The colour describes the candle’s direction and the relative-volume tier detected by the script.
For example:
* bright green identifies Echo Peak Up;
* bright red identifies Echo Valley Down;
* dark green identifies Ultra Up;
* dark red identifies Ultra Down;
* lime green identifies Echo Surge Up;
* light red identifies Echo Surge Down;
* blue identifies Echo Pulse Up;
* fuchsia identifies Echo Pulse Down;
* light grey identifies Normal Up;
* dark grey identifies Normal Down.
The colour should be interpreted together with price location and market structure.
An elevated-volume up candle near resistance may have a different context from the same classification during a breakout.
An elevated-volume down candle near support may have a different context from the same classification during an established decline.
The colour identifies the configured mathematical condition. It does not identify the intent of market participants and is not an instruction to buy or sell.
### How to use the indicator
Apply the indicator to a liquid symbol with usable volume data.
A practical workflow is:
1. Review the broader price trend and market structure.
2. Observe the normal volume behaviour of the selected symbol and timeframe.
3. Identify where elevated-volume colours appear relative to support, resistance, breakouts, failed breakouts, and extended price movement.
4. Compare the direction of each classified candle with subsequent price behaviour.
5. Note whether the event is isolated or part of a sequence of elevated-volume candles.
6. Review any bullish or bearish divergence marker while accounting for its pivot-confirmation delay.
7. Inspect yellow extreme-volume diamonds and whether price later crosses their recovery level.
8. Use the historical tables only as simplified chart-based measurements.
9. Test alerts on the intended symbol and timeframe.
10. Combine the indicator with independent price, volatility, liquidity, and risk analysis.
Do not treat an individual colour, triangle, diamond, ratio, or alert as an automatic trade instruction.
### Example use of an Echo Peak Up candle
When a bright-green Echo Peak Up candle appears, consider:
* whether price is already extended above its recent mean;
* whether the candle appears near established resistance;
* whether the candle closes strongly or leaves a large wick;
* whether subsequent candles continue higher or fail to maintain progress;
* whether similar high-volume activity appeared earlier;
* whether a bearish divergence is also present.
The condition identifies unusual volume, body size, and price extension. It does not prove a reversal.
### Example use of an Echo Valley Down candle
When a bright-red Echo Valley Down candle appears, consider:
* whether price is already extended below its recent mean;
* whether the candle appears near established support;
* whether the candle closes strongly or leaves a large wick;
* whether subsequent candles continue lower or recover;
* whether similar high-volume activity appeared earlier;
* whether a bullish divergence is also present.
The condition identifies unusual volume, body size, and price extension. It does not prove a reversal.
### Example use of Surge and Pulse candles
Echo Surge and Echo Pulse candles identify lower relative-volume tiers than Echo Peak, Echo Valley, and Ultra candles.
A sequence of lime-green or blue up candles during a breakout can show repeated elevated activity.
A sequence of light-red or fuchsia down candles during a decline can show repeated elevated activity.
The same colours near failed breakouts or important support and resistance may have a different context.
The classifications describe relative volume and direction, not future price outcomes.
### Main-chart candle colouring
When main-chart candle colouring is enabled, the script applies the classification colour to the corresponding candles on the price chart.
When disabled, the original price-chart colours remain unchanged while the classified volume columns continue to appear in the indicator pane.
### Background preset
The Dark Background and Light Background options adjust the table text colour for visibility.
The preset does not change the candle-classification colour palette.
Individual candle and line colours can be changed separately.
### Volume moving average
An optional simple moving average can be displayed over the volume columns.
The moving-average period is configurable.
The visible moving average provides an additional reference for current volume, but it is separate from some of the internal classification averages.
Changing the visible moving-average period does not automatically change the internal Peak, Valley, Ultra, Surge, or Pulse thresholds.
### Regular volume divergence
The divergence module compares confirmed pivots in price with confirmed pivots in volume.
It identifies two regular divergence conditions:
* bullish volume divergence;
* bearish volume divergence.
The conditions show structural disagreement between price pivots and volume pivots.
They do not guarantee that price will reverse.
### Bullish volume divergence — turquoise upward triangle
A turquoise upward triangle marks a confirmed bullish volume divergence.
The condition requires:
* price to form a lower confirmed low;
* volume to form a higher confirmed low.
This means price reached a lower pivot while the volume pivot did not form a corresponding lower low.
Users may examine the condition together with:
* nearby support;
* reduced downward progress;
* candle structure;
* broader trend;
* subsequent volume classifications.
Price can continue lower after bullish volume divergence is confirmed.
### Bearish volume divergence — coral-red downward triangle
A coral-red downward triangle marks a confirmed bearish volume divergence.
The condition requires:
* price to form a higher confirmed high;
* volume to form a lower confirmed high.
This means price reached a higher pivot while the volume pivot did not form a corresponding higher high.
Users may examine the condition together with:
* nearby resistance;
* reduced upward progress;
* candle structure;
* broader trend;
* subsequent volume classifications.
Price can continue higher after bearish volume divergence is confirmed.
### Divergence pivot strength
The Divergence Pivot Strength setting is applied to both the left and right sides of each pivot.
Higher values generally produce:
* fewer pivots;
* broader pivot structures;
* later confirmation;
* fewer divergence markers.
Lower values generally produce:
* more pivots;
* narrower structures;
* earlier confirmation;
* greater sensitivity to short-term noise.
There is no universal pivot value that is suitable for every symbol and timeframe.
### Divergence confirmation delay
A divergence is not known on the exact historical pivot bar.
The script must wait for the selected number of right-side bars before the pivot can be confirmed.
Once confirmed, the triangle is displayed on the earlier pivot bar.
For example, a pivot strength of 5 requires five later bars before confirmation.
The marker therefore appears earlier on the historical chart than the time at which the condition became available.
### Divergence lines in the indicator pane
Optional panel lines connect the previous and current volume pivots associated with the divergence structure.
Users can configure:
* bullish line colour;
* bearish line colour;
* line width;
* solid, dashed, or dotted style.
These lines help users inspect the change in volume pivots.
They do not project future movement.
### Divergence lines on the price chart
Optional price-chart lines provide a visual reference between price points associated with the volume-pivot locations.
Users can configure their colour, width, and style independently from the panel lines.
These lines are visual aids and should not be interpreted as projected support, resistance, or a forecast of future price movement.
### Extreme Volume Event — yellow diamond
A yellow diamond identifies an Extreme Volume Event.
The condition requires a combination of:
* an already elevated-volume classification;
* volume at least four times the rolling average of recent qualifying elevated-volume candles;
* the highest volume within the recent 50-bar period;
* a candle range above the recent average range.
The rolling event-volume average becomes available only after the script has collected 30 qualifying elevated-volume observations.
The diamond identifies an unusually large volume-and-range event under the selected rules.
It does not prove:
* manipulation;
* institutional activity;
* accumulation;
* distribution;
* liquidation;
* an imminent reversal.
### Extreme-event recovery level
When an Extreme Volume Event occurs, the script calculates a configurable level inside the candle’s body.
At the default 50% setting, the recovery level is the midpoint between the candle’s open and close.
It is not the midpoint of the full high-to-low candle range.
A recovery is counted when closing price crosses the body-based level within the selected recovery lookback.
A wick touching the level without a qualifying close-to-close crossing does not count as a recovery.
A recorded recovery does not guarantee continued movement beyond the level.
### Recovery lookback
The Recovery Lookback setting controls how many bars are allowed for price to cross the active recovery level.
If the level is not crossed within the selected number of bars, that event is no longer tracked as unresolved.
The script tracks only one unresolved recovery event at a time.
If a new yellow-diamond event appears before the earlier event is resolved, the active recovery level is replaced by the newer event.
### Historical divergence outcome table
The left table displays:
* Wins;
* Losses;
* Ratio.
When no earlier hypothetical outcome is active, a confirmed bullish or bearish divergence creates a new measurement.
The script records the confirmation-bar closing price and calculates:
* a fixed percentage target;
* a fixed percentage stop.
For a bullish divergence:
* the target is above the recorded close;
* the stop is below the recorded close.
For a bearish divergence:
* the target is below the recorded close;
* the stop is above the recorded close.
The script records which threshold is detected first.
Only one hypothetical divergence outcome is tracked at a time.
A new divergence is ignored while an earlier outcome remains unresolved.
### Same-bar target and stop behaviour
The target is checked before the stop.
If both the target and stop are reached during the same chart bar, the script records the case as a win.
The script does not reconstruct the lower-timeframe path within that candle, so it cannot determine which level was actually reached first.
This is a material limitation of the table.
### Meaning of the win ratio
The displayed ratio is the number of recorded wins divided by the total number of recorded wins and losses.
It is a simplified historical chart measurement.
It is not equivalent to PulseWire Strategy Tester results and does not model:
* commissions;
* slippage;
* spread;
* realistic order execution;
* position sizing;
* portfolio equity;
* liquidity;
* overlapping trades;
* all intrabar sequencing possibilities.
The ratio depends on:
* the symbol;
* timeframe;
* available chart history;
* divergence pivot strength;
* target percentage;
* stop percentage.
The displayed results do not imply future performance.
### Extreme-event recovery table
The right table displays:
* Recovered;
* Ratio.
Recovered is the number of yellow-diamond events for which closing price crossed the configured body-recovery level within the selected lookback.
The ratio is the number of recovered events divided by the total number of detected yellow-diamond events.
This is a simplified event measurement.
It is not:
* a reversal probability;
* an accuracy score;
* a trading win rate;
* evidence that future events will behave similarly.
### Alerts
Alerts are available for:
* any elevated-volume candle;
* Echo Peak Up;
* Echo Valley Down;
* Ultra Up or Ultra Down;
* Echo Surge Up or Echo Surge Down;
* Echo Pulse Up or Echo Pulse Down;
* bullish volume divergence;
* bearish volume divergence.
The general elevated-volume alert activates when any non-normal classification is detected.
### Current-bar behaviour
Volume, high, low, and close can continue changing while the current chart candle remains open.
As a result, candle classifications may appear, change tier, change colour, or disappear before the candle closes.
Extreme Volume Event conditions may also change while the current candle remains open.
Pivot divergence requires right-side confirmation, but the confirmation bar itself may still be open when the condition first becomes true.
Users seeking stable alerts should generally configure PulseWire alerts for bar-close execution.
### Suggested starting settings
A practical starting process is:
1. Begin with the default settings on a liquid symbol.
2. Observe how frequently each colour appears.
3. Review the relationship between elevated-volume candles and nearby price structure.
4. Keep the default volume multiples until several historical examples have been inspected.
5. Enable chart-candle colouring only if it improves readability.
6. Enable the volume moving average for additional context.
7. Review divergence triangles while accounting for their confirmation delay.
8. Treat yellow diamonds as extreme-volume markers rather than proof of manipulation.
9. Treat both tables as simplified research measurements.
10. Test alerts before relying on them.
### Adjusting the volume tiers
Increase a tier’s volume multiple to make that classification less frequent.
Decrease the multiple to make it more frequent.
Changing the Echo Peak and Echo Valley body, EMA, or deviation settings affects how strictly the script defines price extension and candle size.
More restrictive values generally produce fewer classifications.
Less restrictive values generally produce more classifications.
Settings should be reviewed separately for each market and timeframe.
### What this implementation adds
Compared with the referenced open-source starting framework, this implementation adds or replaces:
* script-level volume calculations;
* script-level volume-spread calculations;
* configurable multi-tier candle classifications;
* longer-term extreme-volume thresholds;
* candle-body filters;
* EMA-extension filters;
* standard-deviation extension measurements;
* independently configurable classification colours;
* dark- and light-background table presets;
* optional main-chart candle colouring;
* regular price-versus-volume divergence;
* configurable divergence markers and lines;
* optional price-chart divergence references;
* Extreme Volume Event diamonds;
* body-based recovery measurements;
* recovery statistics;
* simplified divergence target/stop outcomes;
* expanded alert conditions.
These modules are combined to study relative volume, price response, divergence, and subsequent recovery within one indicator.
### Limitations
* Reported volume differs between exchanges, brokers, markets, and symbols.
* Some markets provide tick volume rather than centralized transaction volume.
* Combined or overridden data feeds can produce different results from the active chart.
* The classification tiers depend on configurable averages, lookbacks, and thresholds.
* An elevated-volume candle does not reveal the identity or intent of market participants.
* Echo Peak Up does not confirm a market top.
* Echo Valley Down does not confirm a market bottom.
* Ultra, Surge, and Pulse classifications are relative-volume categories, not trade-quality grades.
* Candle classifications may change before the current candle closes.
* Pivot divergence is delayed by the selected right-side confirmation length.
* Confirmed divergence markers are displayed on earlier pivot bars.
* Price-chart divergence lines are visual references and not projections.
* Extreme volume does not prove manipulation.
* Extreme-event detection requires sufficient qualifying historical samples.
* The recovery calculation uses body-based levels and closing-price crossings.
* Only one unresolved recovery event is tracked at a time.
* The historical tables are simplified measurements and not full strategy backtests.
* Only one unresolved divergence outcome is tracked at a time.
* Same-bar target and stop sequencing is not reconstructed.
* The outcome tracker checks the target before the stop.
* The indicator does not account for commissions, slippage, spread, liquidity, position sizing, or realistic execution.
* The indicator should not be used as the sole basis for a trading decision.
This indicator is an analytical tool and does not provide financial advice or guaranteed trading outcomes.
Indicator

Quant Regime Oscillator [JOAT]════════════════════════════════
QUANT REGIME OSCILLATOR
════════════════════════════════
A separate-pane composite oscillator that fuses two classic quant signals — how stretched price is from its own mean, and how strong its momentum is relative to recent volatility — into a single bounded line from -100 to +100 . A Kaufman Efficiency Ratio regime filter then decides whether the market is Trending , Mean-Reverting , or Random , so signals only fire when conditions actually support them.
▎ WHAT IT DOES
It condenses mean-deviation and normalized momentum into one clean, smoothed oscillator, classifies the current market regime, and prints sparing BUY / SELL labels only at stretched extremes that align with a trend. A dashboard summarizes every moving part at a glance.
▎ HOW IT WORKS
• Z-Score component — price is measured against its moving mean and standard deviation, then clamped at ±3σ and rescaled to ±100. This captures how far price has deviated from equilibrium.
• Momentum component — rate-of-change is normalized by its own standard deviation (volatility-adjusted), clamped at ±3σ and rescaled to ±100. This measures thrust independent of raw price size.
• Composite blend — the two components are combined using your chosen weights, EMA-smoothed, and clamped into a single -100..+100 oscillator , with an EMA signal line layered on top.
• Regime filter — a Kaufman Efficiency Ratio (directional change ÷ total path) scores 0..1. High values = trending; low values = mean-reverting; in-between = random. Direction is read from price versus its mean.
• Signal gate — a raw BUY needs the oscillator to cross up over its signal, to have recently visited oversold , and to sit inside a trending-up regime. SELL is the mirror. A cooldown enforces a minimum bar gap so labels stay few and never stack.
• Divergence — pivot highs/lows on the oscillator are compared to price pivots to flag regular bullish and bearish divergences.
▎ HOW TO USE IT
• Read the oscillator like a bounded momentum gauge — blue above zero, magenta below. Pushes into the dotted ±80 extreme bands mark exhaustion zones.
• BUY pills appear at oversold turns inside up-trends; SELL pills at overbought turns inside down-trends. Treat them as context-filtered setups, not standalone triggers.
• Use the regime as your playbook: in Trending , favor pullback continuation; in Mean-Rev , fade the band extremes; in Random , stand aside or size down.
• The subtle pane background tint mirrors the regime — blue for trending-up, magenta for trending-down, grey for mean-reverting.
• Divergence dots on the oscillator hint at weakening thrust; combine with your own structure and risk levels.
▎ KEY SETTINGS
• Engine — Z-Score length, Momentum (ROC) length, per-component weights, oscillator smoothing, and signal-line length.
• Regime — Efficiency Ratio window plus the Trending and Mean-Revert thresholds that split the three regimes.
• Signals — Overbought / Oversold levels, OB/OS recall window, minimum bars between signals (cooldown), and divergence pivot length.
• Visuals — toggle the gradient fill, oscillator line, signal line, regime background, and signal markers.
• Dashboard — show/hide, position, and text size.
▎ DASHBOARD
A compact blue/magenta panel reporting: the current bias (Long / Short / Flat), the composite score, raw Z-Score in σ, the momentum value, the active regime with a strength percentage, the OB/OS state , any live divergence , and the current signal status.
▎ ALERTS
• QRO — Long — oscillator crossed up from oversold in a trending-up regime.
• QRO — Short — oscillator crossed down from overbought in a trending-down regime.
• QRO — Any Signal — fires on either a long or short signal.
▎ NOTES
• Works on all timeframes and all assets — the oscillator is self-normalizing, so it adapts to the instrument automatically.
• Every visual layer is toggleable for a clean chart; the cooldown keeps markers sparse on any timeframe.
• Signals confirm on the closed bar and are non-repainting once the bar completes; divergence markers reference confirmed pivots offset back by the pivot length.
For research and education only. This is not financial advice. No indicator can predict the future, and past behavior does not guarantee future results. Always do your own analysis and manage your own risk.
Made with passion by JackOfAllTrades ⚡
Indicator

Directional Volume Shapes (Zeiierman)█ Overview
Directional Volume Shapes (Zeiierman) is a regime-classification oscillator that reframes volume analysis around a different question: not simply “how much volume traded,” but “what statistical shape has directional pressure been forming, and which way is it leaning?”
Instead of plotting raw buy and sell volume bar by bar, the indicator scores each candle for directional pressure using a triangular intrabar distribution model. It collects those scores in a rolling window, classifies the pattern into one of seven distribution shapes, and displays a smooth synthetic template of the detected shape.
The result is less like a traditional volume indicator and more like a distribution-regime display, showing the type of pressure environment currently developing.
⚪ Why Is This One Unique?
Most volume tools show exactly what happened: green bar up, red bar down, and taller bar equals more volume. This indicator uses a two-stage process: classify, then synthesize.
It combines:
• A triangular CDF candle scorer that estimates directional pressure from OHLC data
• A rolling shape classifier using skewness, Gaussian-smoothed peak detection, and time correlation
• Seven possible classifications: Bell, Right-skewed, Left-skewed, J-shaped, Reverse-J, Bimodal, and Multimodal
• A template generator that displays an idealized mathematical version of the active shape
• A separate EMA-based polarity engine that controls bullish or bearish direction
█ How It Works
⚪ 1. Scores Each Candle’s Directional Pressure
Instead of using a simple “close above open equals bullish” rule, the indicator models the candle’s high-low range as a triangular probability distribution centered at the close.
The scr() function evaluates the candle’s full OHLC structure and returns a value between 0 and 1. That result is then converted into a signed pressure score between -1 and +1.
dm = scr(open, high, low, close)
ps = 2.0 * dm - 1.0
Values near +1 represent stronger bullish pressure, while values near -1 represent stronger bearish pressure. Values near zero indicate a more balanced candle.
⚪ 2. Optionally Weights Pressure by Volume
When Volume Weighting is enabled, the pressure score is multiplied by raw volume.
src = vw ? volume * ps : ps
This gives high-volume bars more influence over the rolling shape-classification window. When disabled, the classifier uses directional pressure alone.
Volume still controls the height of the plotted columns regardless of this setting.
⚪ 3. Classifies Pressure Shape, Not Direction
The indicator stores recent pressure values in a rolling window. Before classification, it converts each value into its absolute magnitude.
for i = 0 to buf.size() - 1
mag.set(i, math.abs(buf.get(i)))
Using math.abs() removes bullish and bearish direction from the classification stage. The classifier analyzes how pressure strength has been distributed, not which direction it points.
It measures:
• Skewness in the raw pressure magnitudes
• Local peaks in a Gaussian-smoothed version of the data
• Whether pressure strength is generally increasing or decreasing through time
The final shape is selected using a fixed priority order:
if peaks >= 2
out := peaks == 2 ? "Bimodal" : "Multimodal"
else if corr > 0.5
out := "J-shaped"
else if corr < -0.5
out := "Reverse-J"
else if skew > 0.1
out := "Right-skewed"
else if skew < -0.1
out := "Left-skewed"
else
out := "Bell"
Multiple peaks are checked first, followed by rising or falling behavior, then skewness. Bell is used when no other condition is detected.
⚪ 4. Requires Persistence Before Changing Shapes
The active shape changes only after five consecutive bars produce a classification different from the shape currently displayed.
if ns != sh
sc += 1
else
sc := 0
if sc >= 5
sh := ns
ph := 0.0
sc := 0
The five classifications do not need to match each other. They only need to differ from the current active shape.
When the fifth differing classification arrives, the indicator switches to that bar’s shape and restarts the template cycle.
⚪ 5. Tracks Polarity Separately
Bullish or bearish polarity is calculated independently from the shape classification.
A short EMA is applied to the original signed pressure score:
pr = ta.ema(ps, pl)
string np = pr >= 0 ? "Bull" : "Bear"
When the EMA is above or equal to zero, polarity is Bull. When it is below zero, polarity is Bear.
Because polarity can change as soon as the EMA crosses zero, it usually reacts faster than the shape classifier.
⚪ 6. Displays a Synthetic Shape Template
Once a shape is selected, the indicator does not plot the original pressure values.
Instead, it generates an idealized mathematical template for the active shape. For example, Bell uses a Gaussian curve, J-shaped uses a squared rising curve, and Bimodal combines two separate Gaussian peaks.
The generated template is then scaled by recent average volume and signed according to polarity.
p = pol == "Bull" ? ph : 1.0 - ph
tv = tpl(sh, p)
sgn = pol == "Bull" ? 1.0 : -1.0
amp = ta.sma(volume, 3) * 1.8
y = amp * tv * sgn
The template advances by a fixed amount on each bar. Template Cycle Length controls how many bars are used to complete one full cycle.
█ Assumptions We Are Explicitly Making
The indicator’s usefulness depends on whether its modeling assumptions are suitable for the instrument and timeframe being analyzed.
These are not facts about market behavior. They are simplifying assumptions used because Pine Script does not provide true intrabar tick or order-flow data.
⚪ Intrabar Activity Is Approximated With a Triangular Distribution
The model approximates intrabar activity using a triangular distribution centered at the close. It does not know where price actually spent the most time within the candle.
Using another reference point, such as VWAP, the midpoint, or the open, could produce a different pressure score.
⚪ Shape and Direction Are Treated Separately
The shape classifier analyzes the magnitude of pressure but removes its bullish or bearish direction. Two windows with similar pressure-strength patterns but opposite directional bias can therefore receive the same shape classification.
The shape describes how pressure has been distributed, while the separate polarity calculation determines whether it is leaning Bull or Bear.
⚪ Seven Shapes Are Used to Describe Pressure Behavior
Every window is placed into one of seven fixed categories using predefined thresholds:
• Skewness thresholds of ±0.1
• Correlation thresholds of ±0.5
• Peak prominence above 10% of the smoothed envelope’s maximum
The classifier follows a fixed priority order rather than selecting the mathematically closest-fitting shape.
There is also no statistical significance test behind these thresholds, so borderline classifications may change because of noise.
⚪ The Displayed Curve Represents the Classification, Not the Raw Data
After classification, the indicator displays an idealized template rather than the original pressure values. Two different pressure windows classified as Bell will use the same normalized Bell template.
The final column height and direction can still differ because the template is scaled by recent volume and signed by polarity.
█ How to Use
⚪ Directional Volume Reading
Use the indicator as you would a traditional volume oscillator.
• Readings above zero indicate bullish volume strength.
• Readings below zero indicate bearish volume strength.
⚪ Divergences
Use the columns to identify divergences in volume strength.
• Bullish divergence: Price makes a lower low while the indicator forms a higher low.
• Bearish divergence: Price makes a higher high while the indicator forms a lower high.
⚪ Interpreting the Shape Labels
• Bell: Pressure intensity is relatively symmetric and contains one main area of activity.
• Right-skewed / Left-skewed: Pressure intensity is uneven and has a longer tail on one side of the distribution.
• J-shaped: Pressure intensity has generally increased toward the most recent bars.
• Reverse-J: Pressure intensity was stronger earlier in the window and has weakened toward the present.
• Bimodal / Multimodal: The smoothed pressure path contains two or more separate periods of stronger activity within the detection window.
⚪ Choosing the Shape Speed
Template Cycle Length controls how quickly the displayed shape moves through its synthetic cycle. It changes the visual speed of the columns, not the shape-detection window or Bull/Bear polarity.
• 3 bars, Fast: Creates tight, fast-moving shapes. This is the most responsive and active-looking setting.
• 4 bars, Balanced: Gives each shape slightly more time to develop while remaining responsive.
• 5 to 7 bars, Slow: Stretches the shape across more bars, creating smoother and slower visual cycles.
A value of 3 is useful when you prefer compact, fast-moving shapes. Increase the value when you want each shape to develop more gradually and remain visible for longer.
█ Settings
Use Volume Weighting: Controls whether volume multiplies directional pressure before shape classification. Volume still controls the plotted column height when this setting is disabled.
Detection Window: Sets the number of recent bars used to classify the current shape. Higher values produce slower and more stable classifications. Lower values react faster and may change shape more often.
Polarity Smoothing: Sets the EMA length used to determine Bull or Bear polarity. Higher values create steadier polarity. Lower values react faster.
Template Cycle Length: Sets the number of bars used to complete one synthetic shape template. Lower values create faster and tighter cycles. Higher values stretch the template over more bars.
Show Moving Average: Shows or hides a moving average of the final plotted output.
Type: Selects the moving-average method: SMA, EMA, RMA, or WMA.
Length: Sets the moving-average period.
Maximum Transparency: Sets the maximum transparency applied near the lower points of each template. A value of 0 disables the transparency fade.
-----------------
Disclaimer
The content provided in my scripts, indicators, ideas, algorithms, and systems 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

Funding Rate & OI Radar [StrixEDGE]What It Does
Funding Rate & OI Radar is a multi-symbol derivatives dashboard that consolidates funding rate intensity, open interest momentum across three timeframes, and price-OI divergence signals into a single on-chart table. It is designed for perpetual futures traders who need to read market positioning at a glance — without switching tabs or charts.
The indicator tracks up to 5 perpetual contract symbols simultaneously, surfaces extreme funding conditions as they develop, and flags structurally weak rallies or drops where price and open interest are moving in opposite directions.
Core Features
Funding Rate with Color Intensity
Funding rate values are color-graded by severity — from dim neutral tones near zero, through elevated orange, to extreme red (longs paying) or bright green (shorts paying). Extreme readings trigger a highlighted cell background so they stand out immediately during fast-moving markets.
Open Interest Change — 1H / 4H / 24H
Three separate OI delta columns show how positioning is shifting across intraday, swing, and daily windows. Each cell includes a directional arrow (▲ ▼ ►) and percentage change, color-coded against your configured alert threshold. This gives you a layered read: is OI building across all timeframes, or only spiking on the short window?
Price-OI Divergence Detection
The SIGNAL column cross-references 24H price change against 24H OI change and classifies the move:
- WEAK▲ — Price rising but OI declining. Rally lacks new capital commitment. Potential short squeeze or exhaustion move.
- WEAK▼ — Price falling but OI rising. New positions opening into the drop. Potential capitulation trap or forced selling.
- STRONG▲ — Price and OI both rising. New money entering on the long side. Structurally supported move.
- STRONG▼ — Price and OI both falling. Positions closing out. Orderly deleveraging.
- NEUTRAL — No meaningful divergence.
Weak signals receive a highlighted background row to ensure they are not missed.
Multi-Symbol Table
Monitor BTC, ETH, SOL, and two custom perpetual contracts of your choice — all rendered in a single dashboard. The table includes configurable column visibility, so you can strip it down to just FR + divergence, or run the full 8-column view.
Aggregate Sentiment Footer
The bottom row averages funding rates across all active symbols and classifies the overall market into one of seven sentiment tiers — from 🟢 EXTREME FEAR through ⚪ NEUTRAL to 🔴 EXTREME GREED. A fast, blunt read on whether the derivatives market is skewing overleveraged in either direction.
Alerts
Four built-in alert conditions, all routed through PulseWire's native alert system:
- Extreme Funding Rate — Any tracked symbol's absolute FR exceeds your configured threshold (default: 0.05%/8h).
- OI Surge — Any symbol's 1H OI change exceeds your OI alert threshold (default: 5%).
- OI-Price Divergence — A WEAK▲ or WEAK▼ signal fires on any tracked symbol.
- Sentiment Extreme — Aggregate average FR across all symbols reaches the extreme zone.
Data Sources & Configuration
The indicator supports two modes for funding rate data:
- Ticker Mode (default) — Pulls funding rate from your exchange's dedicated FR data feed using a configurable ticker suffix (default: `_FR`). Requires the exchange to publish FR data through PulseWire.
- Basis Proxy Mode — Estimates the implied 8-hour funding rate from the perpetual-spot price spread: `(Perp − Spot) / Spot / 3`. Useful when direct FR tickers are unavailable. Note: this is an approximation, not the actual settlement rate.
Open interest data is fetched via configurable OI ticker suffix (default: `_OI`).
Important: Ticker formats vary across exchanges and PulseWire data providers. If columns display "N/A", adjust the OI/FR suffix inputs under 🔌 Data Sources to match your exchange's naming convention. Consult your exchange's PulseWire symbol search for the correct format.
Settings Overview
📊 Symbols — Exchange selector, 3 default symbols (BTC/ETH/SOL perpetuals), 2 optional custom slots.
🔌 Data Sources — OI suffix, FR suffix, FR method toggle, spot suffix override for basis proxy.
🚨 Thresholds — Extreme FR level, elevated FR level, OI alert percentage. These control both color intensity breakpoints and alert trigger levels.
🎨 Display — Table position (8 positions), text size (Tiny / Small / Normal / Large).
📋 Columns — Individual toggles for Price, Price Δ24H, Funding Rate, OI Δ1H, OI Δ4H, OI Δ24H, Divergence Signal, and Sentiment Footer. Disable any column you don't need to keep the table compact.
Technical Notes
- Uses 25 `request.security()` calls across 5 symbols (well within Pine Script's 40-call limit).
- OI changes are calculated from actual multi-timeframe requests (60min, 240min, Daily) — not bar-count estimates — so they remain accurate regardless of your chart's timeframe.
- Table renders only on the last bar (`barstate.islast`) for performance.
- Inactive custom symbol slots (left blank) fall back to the primary ticker internally and are hidden from the table.
How to Read It
Open the indicator on any chart. The table appears as an overlay (default: top-right corner). Scan left to right:
1. Symbol — Which asset.
2. Price — Current perpetual price.
3. Δ24H — Daily price change. Green = up, red = down.
4. FR /8h — Current funding rate per 8-hour interval. Bright color = elevated. Highlighted background = extreme.
5. OI Δ1H / 4H / 24H — Open interest change with directional arrows. Look for alignment across timeframes (all rising = strong conviction) or divergence (1H spiking, 24H flat = short-term noise).
6. SIGNAL — Divergence classification. WEAK▲ and WEAK▼ are the actionable signals — they indicate structural fragility in the current move.
7. Sentiment — Aggregate market tilt from combined funding rates.
Use Cases
- Scalpers & intraday traders — Monitor 1H OI spikes alongside funding rate to detect short-squeeze or long-squeeze setups forming in real time.
- Swing traders — Use the divergence signal column to filter entries. Avoid longing into WEAK▲ conditions; avoid shorting into WEAK▼.
- Portfolio monitors — Track funding costs across multiple positions simultaneously. Elevated aggregate sentiment warns of crowded positioning before liquidation cascades.
Complementary Tools
Designed to pair with liquidity heatmaps and liquidation level estimators. Funding rate tells you who is paying whom. OI tells you how much is at stake. Liquidity maps tell you where the pressure points are. Together, they give a full derivatives positioning read. 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

Adaptive Confluence Oscillator [ForexCracked]🔵 OVERVIEW
The Adaptive Confluence Oscillator scores four independent read-outs of the market on a continuous scale, weights them according to the current market regime, and plots the result as a single 0 to 100 line. Instead of asking "do my indicators agree, yes or no," it asks "how strongly does each one agree, and which of them should I be listening to right now."
It has no fixed overbought or oversold levels. The bands are calculated from the oscillator's own recent behaviour, so they widen when the market gets volatile and tighten when it goes quiet.
Signals confirm on candle close and do not repaint.
🔵 WHY THIS IS BUILT THE WAY IT IS
Most multi-indicator tools take a vote. RSI is oversold or it is not. That throws away most of the information: an RSI of 29 and an RSI of 12 are not the same signal, but a vote counts them identically. It also treats every indicator as equally relevant at all times, which is plainly false. Stochastic exhaustion means one thing in a strong trend and the opposite thing in a range.
This oscillator fixes both problems. Every component returns a continuous score, and the market regime decides how much each score is worth.
🔵 THE FOUR COMPONENTS (each scored from -1 to +1)
• Trend: how far price sits from its baseline EMA, measured in ATR units rather than in price. Distance matters, not just which side of the line you are on. Because it is measured in ATR, it reads the same on gold as it does on EURUSD.
• Momentum: RSI recentred around 50, so it contributes proportionally instead of flipping at a threshold.
• Impulse: the MACD histogram converted to a z-score against its own rolling deviation. This makes MACD comparable across symbols and timeframes without ever re-tuning it, which raw MACD values are not.
• Stretch: the Stochastic, recentred. This is the component that changes behaviour with regime (see below).
🔵 THE REGIME SWITCH (the part that makes it adaptive)
ADX decides whether the market is trending or ranging, and that changes two things.
First, the weights re-balance:
• Trending: Trend 0.35, Momentum 0.25, Impulse 0.30, Stretch 0.10
• Ranging: Trend 0.15, Momentum 0.25, Impulse 0.20, Stretch 0.40
Second, and more importantly, the Stretch component flips sign. In a trend, a stretched Stochastic confirms the move and pushes the score further in that direction. In a range, the same reading argues for a fade and pushes the score the other way. This is the behaviour a discretionary trader applies without thinking about it, and it is what a fixed vote cannot express.
🔵 ADAPTIVE BANDS
There are no 70/30 lines here. The upper and lower bands are the rolling mean of the oscillator plus and minus a multiple of its own standard deviation. A reading of 68 can be an extreme in a quiet market and completely unremarkable in a volatile one, and the bands reflect that.
• BUY: the score crosses above the upper adaptive band
• SELL: the score crosses below the lower adaptive band
🔵 DIVERGENCE
The script finds pivots on the score itself and compares them against price at those same bars. When price makes a higher high but the score makes a lower high, that is marked as a bearish divergence, and the mirror case as bullish. Divergences are labelled and have their own alerts. Because a divergence is anchored to a confirmed pivot, it prints a few bars after that pivot forms and never moves once printed.
🔵 THE DASHBOARD
The panel shows each component's live score, its current weight, the detected regime with the ADX value, and the oscillator against its adaptive bands. You can see exactly which component is driving the reading and why, rather than trusting a black box.
🔵 SETTINGS
• Baseline EMA 34, ATR 14, Trend Span 2.0 x ATR
• RSI 14, MACD 12/26/9, Stochastic 14
• ADX 14, trending above 22
• Band lookback 100, band width 1.0 x standard deviation
🔵 HOW TO USE
• Take signals where the dashboard regime agrees with the direction. A BUY in a trending regime is a continuation. A BUY in a ranging regime is a fade off the bottom of the range.
• Treat a divergence as a warning to tighten or take partials, not as a standalone entry.
• Raise the band width above 1.0 for fewer and stronger signals, lower it for more.
• Widen Trend Span on noisy symbols so ordinary volatility does not read as trend.
⚠️ DISCLAIMER
This is an analysis tool, not a prediction. A confluence score is a measure of agreement, and indicators can agree and still be wrong. Results depend on market conditions, settings, and your own execution and risk management. Shared for educational and research purposes. Not financial advice. Indicator

Order Flow Volume Delta, CVD, Absorption & Divergence [LunqFX]Price shows you WHERE the market went. Order flow shows you WHO pushed it there — buyers or sellers — and whether they had real volume behind the move. This Order Flow indicator reads the volume delta on every candle (the balance of buying volume vs selling volume), builds it into a cumulative volume delta (CVD) trend, and automatically marks the two order-flow events that lead price: absorption and delta divergence. Everything is drawn on your chart as clean delta candles, order-flow support/resistance levels and a live buying-pressure dashboard.
❶ THE CONCEPTS (so it's clear)
▸ VOLUME DELTA — the difference between buying volume and selling volume inside a bar. Positive delta = buyers were more aggressive, negative = sellers. It is the core of all order-flow analysis.
▸ CVD (CUMULATIVE VOLUME DELTA) — delta added up over time. A rising CVD means buyers are steadily accumulating; a falling CVD means distribution by sellers. CVD is how you see the real trend of order flow, not just price.
▸ ABSORPTION — a bar with heavy volume but almost no price movement. It means a large player (smart money / institutional) is absorbing every market order at that level. Absorption very often appears right before a reversal.
▸ DELTA DIVERGENCE — price makes a new high but CVD does not (or a new low but CVD does not). The move has no real volume behind it — a trap / exhaustion signal that warns a reversal is likely.
❷ WHAT YOU SEE ON THE CHART
▸ Delta candles — sky-blue when buyers won the bar, coral when sellers won; the brighter the candle, the more one-sided the flow. You read buying and selling pressure at a glance.
▸ Order-flow levels — every absorption (gold) and divergence (blue / coral) is projected to the right as a support/resistance level with its exact price. These are the levels where big volume actually traded, so price reacts to them again.
▸ Live dashboard — who is in control (buyers vs sellers) from the CVD, the CVD value, the current bar's buy/sell pressure split, and the latest signal.
❸ HOW TO TRADE IT — STEP BY STEP
1 — Read the BIAS. The panel shows ▲ BUYERS or ▼ SELLERS IN CONTROL from the CVD. Trade with the side that controls order flow, not against it.
2 — Watch for DELTA DIVERGENCE against the move. Price higher high while CVD makes a lower high = buyers are exhausted → look for shorts. Price lower low while CVD makes a higher low = sellers are exhausted → look for longs. This is the highest-value order-flow reversal signal.
3 — Use ABSORPTION as a reversal cue. When heavy volume fails to move price, the move is being absorbed; watch for the turn and use that gold level as your invalidation line.
4 — Trade the reaction at order-flow levels. Old absorption and divergence levels act as support and resistance — enter when the delta flips back in your favour as price returns to a level.
5 — Confirm with Bar pressure. The panel's ▲/▼ % buy shows the live buy/sell split — take the trade when it agrees with your setup and the bias.
❹ HOW IT WORKS (fully transparent)
Each bar's volume is split by where price closed in its range: buy-volume = volume × (close − low) ÷ range, sell-volume = volume × (high − close) ÷ range, and delta = buy − sell. This is a transparent, range-based volume-delta estimate — it needs no tick or bid/ask feed, so it runs on any symbol. CVD is the running sum of that delta (session-anchored on intraday charts, fully cumulative on daily and higher, handled automatically). Absorption is flagged when volume rises above its average by your chosen multiple while the candle body stays smaller than a fraction of ATR. Divergence compares each confirmed swing pivot in price with the CVD value at that pivot. Every reading comes from closed bars and confirmed pivots — no repainting, no lookahead.
Order flow is strongest on markets with true exchange volume — crypto, stocks, futures and indices — and on intraday timeframes (1m–4h), where buying and selling pressure is most meaningful. On forex, volume is broker tick-volume, so treat the delta as an approximation of order flow rather than exact.
SETTINGS — CVD reset (Session / Week / None), absorption sensitivity, divergence swing length, number of order-flow levels + glow, delta candles on/off, dashboard position.
ALERTS — bullish delta divergence, bearish delta divergence, absorption, and CVD crossing zero (buyers / sellers taking control).
This indicator is an educational market-analysis tool, not financial advice. The volume delta shown here is a transparent estimate from price and volume, not exchange-audited bid/ask order flow, and past behaviour does not guarantee future results. Always confirm with your own analysis and manage your risk.
Indicator

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

RSI Divergence Hunter [JOAT]RSI Divergence Hunter
Automatically detects the four classic RSI divergence types on confirmed pivots and frames each one as a trade.
What it is
Divergence between price and momentum is one of the oldest reversal and continuation reads, but marking it by hand is subjective and easy to force. This indicator detects all four divergence types algorithmically on confirmed pivots, so what you see is defined and repeatable, and then attaches a full trade structure to each. It is an original divergence engine, not a plain RSI plot.
How it works
• RSI core — the relative strength index measures the speed and size of recent moves. It is the momentum reference every divergence is measured against.
• Confirmed pivots — the engine waits for pivots on both price and RSI to confirm a set number of bars back before comparing them. Because pivots are only evaluated once confirmed, a plotted divergence does not repaint into or out of existence.
• The four types — regular bullish (price lower low, RSI higher low) and regular bearish (price higher high, RSI lower high) point to potential reversals; hidden bullish and hidden bearish point to trend continuation after a pullback. Each is drawn with a connecting line on both price and RSI and labelled by type.
• Zones and gating — overbought and oversold zones give context, and a minimum-gap control keeps divergence signals from stacking on lower timeframes.
Trade levels
Each qualifying divergence draws a red risk box to the stop and a green reward box to the third target, with inner dividers and right-edge labels for entry, stop and each take-profit at your R multiples. The stop is anchored beyond the pivot that formed the divergence.
The dashboard
An adjustable divergence-scope panel shows the current RSI value and zone, the most recent divergence type detected, the active signal, a conviction estimate, and a live first-target-before-stop tally from closed bars only.
How to use it
• Works on any asset and timeframe.
• Treat regular divergences as counter-trend reversal cues and hidden divergences as with-trend continuation cues — the distinction matters.
• Combine with structure or a trend filter; divergence works well as confluence, not in isolation.
Settings
RSI length and source, pivot strength, which divergence types to display, overbought/oversold levels, risk multiple and target R multiples, plus visual and dashboard controls.
Originality and usefulness
The contribution is a complete, confirmed-pivot detector for all four divergence classes with clear per-type labelling and integrated, non-repainting trade framing. By fixing the definition of a divergence and waiting for pivot confirmation, it removes much of the hindsight bias that makes manual divergence unreliable.
Notes and limitations
• Divergence signals can persist and reappear in strong trends; a divergence is a condition, not a timing guarantee.
• Confirmed pivots introduce a natural delay equal to the pivot strength — this is the cost of not repainting.
• The tally reflects only past bars on the current chart and is not a forecast.
• Educational and analytical tool, not financial advice.
— made with passion by officialjackofalltrades
Indicator

RSI Levels & Regime Map Heatmap & Cardwell Reversal SignalsOVERVIEW
RSI is the most-used oscillator in the world, and almost nobody trades it — because "RSI is 62" is not something you can place an order against.
This tool moves RSI onto price.
RSI IS INVERTIBLE. Wilder's smoothing can be solved backwards, so for any RSI value there is an EXACT price that would produce it on the next bar. Instead of "RSI is 62", the chart tells you:
Close above 24,278 -> RSI 70 (resistance)
Close below 24,193 -> RSI 30 (support)
Those are real levels. You can put a stop there. You can put a target there.
The script draws the full ladder (30 / 40 / 50 / 60 / 70, all configurable), shades the bands between them into a regime heatmap, measures the Cardwell range regime, marks Cardwell positive and negative reversals with projected targets, shows a multi-timeframe strip — and then does the thing nobody else does: IT FORWARD-TESTS WHETHER ANY OF IT ACTUALLY HOLDS.
This is a research and framing tool. It is NOT a strategy, NOT a signal service, and NOT a validated edge.
THE MATHS (exact, not an approximation)
RSI = 100 - 100/(1 + AG/AL), where AG and AL are the Wilder-smoothed average gain and loss.
For a target T, let RSt = T/(100 - T). Solving the next bar's RSI for the move x required:
an UP move needs x = (n-1) * (RSt*AL - AG)
a DOWN move needs x = (n-1) * (AL - AG/RSt)
Level = close + x. The up form applies when it is non-negative; otherwise the down form does.
This is algebra, not curve fitting. Feed the derived price back through RSI and you get the target value back exactly. The levels are not estimates — they are the precise prices at which the RSI state changes, recomputed every bar. The ladder breathes with volatility on its own: it tightens in quiet markets and widens in violent ones, with no smoothing parameter to tune.
WHY THESE PARTS ARE ONE TOOL (mashup rationale)
1. THE INVERSE-RSI LADDER — the core. Every rung is the exact price at which RSI would print a chosen value.
2. THE HEATMAP — the bands between the rungs, shaded by regime. It shows at a glance how far price must travel to change the RSI story, which is the one question the oscillator pane can never answer.
3. THE CARDWELL REGIME — Andrew Cardwell's observation: in a BULL market RSI holds roughly 40-80, and 40 becomes SUPPORT. In a BEAR market it holds 20-60, and 60 becomes RESISTANCE. So "RSI 40" means the OPPOSITE thing in the two regimes. A tool that ignores this will cheerfully tell you to buy oversold all the way down a trend. The regime here is MEASURED over a lookback, not assumed — and the rung the script watches follows the regime rather than a fixed number.
4. CARDWELL REVERSALS — the signal almost nobody implements. A POSITIVE REVERSAL is RSI making a LOWER low while PRICE makes a HIGHER low. That is the mirror image of classic divergence, and it is a CONTINUATION signal, not a trend reversal. A NEGATIVE REVERSAL is the bearish mirror. A measured target is projected from each.
5. THE HONESTY LAYER — everyone says RSI 30 is support. Nobody checks. Every level test and every Cardwell reversal is logged and graded with a triple barrier against an unconditional control.
Remove any one and you are left with a prettier RSI that still cannot tell you whether RSI works.
THE CALIBRATION — AND THE TWO TRAPS IT TOOK A LIVE TEST TO FIND
Two subtle biases can make a level tool look brilliant while it is doing nothing at all. Both are handled explicitly here, and both are worth understanding whichever tool you use.
TRAP 1 — THE FILL ADVANTAGE.
A support test fires when price dips INTO the rung and closes back ABOVE it. If you enter the event AT THE RUNG (below the close) but compare it with a control entered at the CLOSE, the event gets a strictly better fill on EVERY trade. It then "beats" the control by construction — not because the level held, but because it bought lower. That is a rigged comparison, and it produces a large fake edge.
THE FIX: the level test is treated as a SIGNAL, NOT A FILL. The event and the control enter at the SAME reference price — the bar's close. The only thing that differs is which bars were selected.
TRAP 2 — DIRECTIONAL DRIFT.
Indices drift upward. If level tests are mostly LONG while the control is 50/50, the events win on drift alone and prove nothing.
THE FIX: longs are compared only with control longs, shorts only with control shorts, then blended back using the events' OWN direction mix. The panel also reports the baseline drift directly, so you can see whether the instrument is simply going up.
The control is UNCONDITIONAL: the same trade geometry taken on arbitrary bars, selected by no signal at all. If the levels cannot beat that, they carry no edge.
Results are reported as EXPECTANCY IN R, not hit rate. A Welch t-test decides whether the difference is real or luck — the panel does not say PROVEN unless t > 1.96.
Other conventions, all chosen so the tool cannot flatter itself:
· Both barriers touched on one bar -> the STOP is assumed first.
· Expired trades are marked to market, not booked as losses.
· The level tested is the one computed at the END OF THE PREVIOUS BAR — the price a trader could actually have rested an order at. Using the current bar's own level would be a look-ahead.
· Everything is logged and resolved on confirmed bars only.
HOW TO USE IT
1. READ THE REGIME FIRST. In a bull regime the 40 rung is support and you are hunting long tests of it. In a bear regime the 60 rung is resistance. In neutral, the ladder is simply a map.
2. The rungs are LEVELS. Price closing through one changes the RSI state, by definition.
3. A CARDWELL REVERSAL is a continuation signal with a projected target.
4. READ THE CALIBRATION BEFORE YOU WEIGHT ANY OF IT — and read the baseline-drift row next to it. If level tests show no proven edge on your instrument, the ladder is a MAP, not a probability.
5. Entry, stop and target are drawn at the same price the calibration measures. They are arithmetic, not advice.
DATA / SCOPE
Any symbol, any timeframe. No volume required. The source is an input, so the ladder can be built from close, hlc3, or even another indicator's plot.
NON-REPAINTING
The ladder is computed from confirmed values and projects FORWARD — it is a statement about what the NEXT bar would need to do, so it necessarily moves as new bars arrive. That is a projection, not a repaint, and it is stated plainly rather than hidden.
Level tests are evaluated against the PREVIOUS bar's level, so no future information is used. Reversal pivots use ta.pivot* and confirm a few bars after the fact; once printed, they do not move. The calibration harness logs AND resolves on confirmed bars only, so its statistics cannot inflate intrabar.
HONEST LIMITATIONS — PLEASE READ
The ALGEBRA is exact. THE CLAIMS ABOUT RSI ARE NOT.
"RSI 30 is support" is folklore until it is measured, which is exactly why this script measures it — and why it is built to be able to return "not proven".
Calibration figures are IN-SAMPLE, with no costs or slippage, and use overlapping windows. A proven in-sample edge is NOT a guarantee out-of-sample. Real fills, spreads and commissions will all reduce it.
Cardwell's rules are discretionary in origin and are mechanised here in one particular way. A different mechanisation would give different numbers.
Small samples are unreliable even when they look good. If the edge is near zero, negative, or unstable across timeframes, the honest conclusion is that it is not there.
Nothing here predicts price.
CONCEPT CREDITS
Relative Strength Index and its Wilder smoothing — J. Welles Wilder Jr.
Range rules, positive and negative reversals, and the measured-move projection — Andrew Cardwell.
Triple-barrier forward labelling — Marcos López de Prado.
Welch's t-test — B. L. Welch.
The inverse-RSI level engine, the regime map, the unconditional direction-matched control and the significance testing are the author's own. Clean-room implementation; no third-party code is reused. Not affiliated with, nor endorsed by, any of the above.
DISCLAIMER
Research and educational tool only. NOT financial advice, NOT a recommendation, and NO guarantee of results. Indicators describe past behaviour; they do not predict the future. Entry, stop and target output is arithmetic, not advice. Trading carries a risk of loss. Test out-of-sample and make your own decisions. The author accepts no liability for any use of this script. Indicator

Supertrend - EMA Cloud - Divergence - ADX [StrixEDGE]Overview
Apex Trend Engine is a 5-layer confluence system that combines trend-following, momentum, and reversal detection into a single overlay indicator. Each layer operates independently and feeds into a unified scoring engine that generates high-conviction BUY and SELL signals only when multiple confirmations align.
Layer 1 — Supertrend (Trend Direction)
An ATR-based adaptive trend filter that hugs price during trends and flips cleanly on reversals. The Supertrend line is plotted directly on the chart with a subtle fill between price and the stop level, making the current trend direction visible at a glance.
Bull & Bear SuperTrend :
Layer 2 — EMA Cloud (Momentum & Entries)
A fast/slow EMA pair (default 9/21) with a filled cloud between them. The cloud color shows momentum direction: green when fast EMA is above slow, red when below. Crossovers serve as entry triggers when confirmed by other layers.
Bull & Bear EMA :
Layer 3 — RSI Divergence Scanner (Reversals)
Automatic detection of regular bullish and bearish divergences between price and RSI using pivot-confirmed swing points. When price makes a lower low but RSI makes a higher low, a bullish divergence line is drawn on the chart. The reverse for bearish.
Bull Div.
Bear Div.
Layer 4 — ADX Trend Strength (Filter)
The Average Directional Index measures whether the market is trending or ranging. ADX above the threshold (default 25) confirms a trending market. The directional indicators (DI+ vs DI-) determine if the trend is bullish or bearish.
Bull & Bear ADX :
Layer 5 — Combined Signal Engine
Each layer contributes one point to a bull score and one to a bear score (5 points maximum each):
Point 1 — Supertrend direction
Point 2 — EMA fast/slow alignment
Point 3 — Price position relative to 200 EMA
Point 4 — Recent RSI divergence (within 20 bars)
Point 5 — ADX trending with directional confirmation
Signal generation requires both a score threshold AND a trigger event:
STRONG BUY — 4 or more bullish points with an EMA crossover or Supertrend flip
BUY — 3 or more bullish points with a trigger
STRONG SELL — 4 or more bearish points with a trigger
SELL — 3 or more bearish points with a trigger
This dual requirement (score plus trigger) prevents signals from firing on every bar during a trend and limits them to actionable moments.
Chart visuals
Supertrend: colored line with transparent fill to price showing the trend zone
EMA Cloud: fast and slow EMA lines with filled cloud between them
EMA 200: gold line for macro trend reference
Divergence lines: green lines connecting bullish divergence pivots, red for bearish
Signal arrows: double arrows for strong signals, single triangles for regular
Background highlight: subtle bar coloring on strong signal bars
Dashboard table
The on-chart dashboard shows each layer's current reading:
Supertrend — stop level and direction
EMA Cross — values and cross status
EMA 200 — value and price position
RSI — value with overbought/oversold warnings
Divergence — type and how many bars ago
ADX — value with trending/ranging status
Score — X/5 BULL and X/5 BEAR
Signal — combined verdict
Settings
Every component is independently configurable with sensible defaults:
Supertrend: ATR length 10, multiplier 3.0
EMA Cloud: fast 9, slow 21, trend 200
RSI Divergence: length 14, pivot lookback 5
ADX: length 14, smoothing 14, trending threshold 25
Signals: buy/sell arrows and background highlights toggleable
Dashboard: position and text size adjustable
Alerts : 10 alert conditions covering every signal type:
Strong Buy, Buy, Strong Sell, Sell
Supertrend flip bullish/bearish
EMA cross up/down
Bullish/Bearish divergence detected
Disclaimer
This indicator is a technical analysis tool for educational and informational purposes. It does not constitute financial advice. Past performance does not guarantee future results. Always use proper risk management and never risk capital you cannot afford to lose. Indicator

Adaptive Volume Confluence OscillatorWhat it is
One pane that fuses seven different reads of the bar into a single 0–100 confluence score, gates that score by a trend-vs-chop regime filter, confirms it against an auto-mapped higher timeframe, and — most importantly — forward-calibrates its own Buy/Sell signals against an unconditional base rate, so you can see whether the construction actually carries an edge on your instrument.
The seven votes: momentum sign · momentum vs its signal · money flow · trend structure (MA fan) · price location vs VWAP · trend slope · higher-timeframe bias.
The displayed wave is a volume-flow ribbon; the votes drive the score, the signals and the verdict. A plain-language verdict and a subtle pane tint make it readable at a glance (Simple view); a full analytic layer is available for advanced users (Pro view).
Why these are combined (mashup rationale)
A single oscillator whipsaws and a single signal over-fires. Combining helps only when the inputs key on different quantities and their agreement is checked. Each vote reads a different thing — momentum, momentum-vs-signal, volume flow, multi-MA structure, location vs a session mean, slope, and a higher-timeframe read — so the count that agrees carries more information than any one of them alone. A Kaufman Efficiency-Ratio regime gate suppresses conviction in chop, and a forward-calibration harness ties the whole construction back to realised forward outcomes.
An honest caveat, stated up front: the votes are not statistically independent. The oscillator itself embeds money flow, and vote 2 is derived from vote 1's series. Treat the score as a weight-of-evidence read, not as seven independent confirmations. The harness exists precisely so you can check whether the construction earns its keep on your instrument rather than taking the claim on faith.
How it works
Score — how many of the seven votes are bullish, scaled 0–100.
Regime — Kaufman Efficiency Ratio. Below the chop threshold, conviction dims, signals are withheld, and the verdict reads "WAIT – choppy".
HTF — the chart timeframe auto-maps to a confirming higher timeframe (~4–6×), requested with lookahead_off and offset by one bar while the live bar forms.
Signals — Buy/Sell fire only when the oscillator crosses its signal at a statistical OB/OS extreme and the score agrees and the regime isn't choppy and the visible wave isn't already at the opposite extreme.
Climax — a volume spike at an OB/OS extreme prints a Possible Bottom/Top exhaustion mark.
Divergence (Pro) — regular + hidden, from confirmed pivots on the momentum oscillator.
Calibration — each Buy/Sell is queued and resolved a fixed horizon later, then compared with the unconditional same-horizon base rate. The dashboard shows, per side: Hit %, Edge = Hit − Base, sample size, and a Wilson-gated star.
How to use it
Read the verdict and the score. Above the gate = bullish weight of evidence; below = bearish; in between, or in chop, the tool says WAIT — and it means it.
Treat Buy/Sell marks as context, not triggers. They already require the score, the regime and the wave to agree, but they remain a description of conditions — not a recommendation.
Read the Edge row before you weight any signal. If Buy/Sell Edge isn't clearly positive with an adequate sample and a star, this construction is not carrying an edge on this instrument — weight it down or ignore it. Do not tune the parameters until the Edge turns green: that is curve-fitting, and the harness is there to catch it, not to be defeated.
Combine with your own levels, structure and risk rules.
Universal across markets
Price / high / low are inputs, so the engine runs on any symbol or timeframe. The volume votes (money flow, climax, VWAP location) need real volume — prefer a futures contract or a stock. On a symbol with no volume the tool degrades gracefully: money flow is neutralised, the score falls back to the price-only votes, and the dashboard says "NO VOLUME", so you're never misled by a blank or a phantom reading.
Non-repainting
Votes read confirmed closes. The HTF series uses lookahead_off and is offset by one bar while the live bar forms. Divergences come from ta.pivot* and confirm a few bars after the pivot; once printed they don't move. The calibration harness logs and resolves only on confirmed bars, so its statistics never inflate intrabar. The live oscillator updates each bar, like any oscillator.
Concept credits
Super Smoother and Ultimate Smoother low-lag filters — John Ehlers. Chebyshev Type-I filter — classical DSP. Recursive (Kalman) smoothing — R. E. Kalman. Volume Zone Oscillator — Walid Khalil & David Steckler. Accumulation/Distribution money-flow multiplier — Marc Chaikin. Efficiency Ratio — Perry J. Kaufman. ATR — J. Welles Wilder. Wilson score interval — Edwin B. Wilson. VWAP, Hull MA and percentile rank — standard public methods.
Original implementation; not affiliated with, nor endorsed by, any third party. No third-party code is reused.
Honest limits
The score is context, not a guarantee, and the votes are correlated (see the caveat above). The Edge figures are in-sample, close-to-close, with overlapping forward windows and no costs — descriptive context, not a verified backtest. An Edge near zero, negative, or unstable across timeframes is the harness honestly telling you the signal has no reliable edge on that instrument. Nothing here predicts price.
Disclaimer
Research and educational tool only. Not financial advice and no guarantee of profitability or accuracy. Indicators describe past behaviour; they do not predict the future. Trading carries risk of loss. Test out-of-sample and make your own decisions. The author accepts no liability for any use of this script. Indicator

Keltner Position Divergence with Reliability ScoringOverview
Keltner-Position Divergence with Reliability Scoring turns where price sits inside its Keltner channel into a bounded oscillator, reads it for divergence against price, and then scores — in real time — whether those divergences have actually been worth acting on for the symbol on your chart, and which direction is carrying the edge. It is a context / research read, not a standalone buy or sell signal.
The idea
A Keltner channel frames price with an ATR envelope around a moving average. Where price sits inside that envelope — pinned to the upper band, mid, or pinned to the lower band — is a bounded read of stretch. When price makes a new high but its Keltner position does not confirm (a lower band-position high), that non-confirmation can precede a turn. This script measures the divergence between price and its Keltner position, then keeps a self-updating track record of whether such divergences pay.
Why these parts are combined (mashup rationale)
Three components form one pipeline, not three separate signals:
A Keltner-position oscillator — price's location within the ATR envelope (0 centre, +1 upper band, −1 lower band), z-scored so the bands and zones mean the same on every asset.
Confirmed-pivot divergence — regular and hidden, between that position line and price, with an optional triple-pivot mode for rarer, stronger disagreements.
A reliability harness — a binomial-proportion confidence test that asks whether each class of divergence has preceded a favourable move (a k×ATR travel over a fixed horizon) more often than a same-zone baseline, reported per direction with a Wilson confidence bound.
Part 1 builds the bounded stretch read, part 2 fires only where price and position disagree, part 3 decides whether that disagreement has actually paid on this instrument. Remove any one and the tool can no longer answer "is this Keltner divergence worth trading here?"
How to use it
Read the verdict panel first. GREEN = these divergences have beaten a same-spot baseline here; RED = they've lost to it (skip, or change the band width / timeframe); AMBER = not statistically established yet; GREY = still gathering data. "Best signal" names the direction with the strongest measured edge; "Reward : risk" is the average best-vs-worst move after a signal, in ATR. A divergence is price making a higher high / lower low while the Keltner-position line does the opposite — marked in the pane and, optionally, on the price chart. It is context, never a standalone trigger.
Settings worth knowing
The regime filter ("Only count signals in regime") restricts the track record to signals that fired in a chosen regime — reverting markets suit divergence, strong trends punish it — so you can measure the edge where it's supposed to work. Costs subtracted (×ATR) raises the bar a signal must clear so the score is net of costs. Band width, MA length and the z-score window adapt the read to any instrument.
Universality & non-repainting
It reads only the chart's own price (configurable source), so it runs on any symbol, any timeframe, with no external data. Pivots confirm a fixed number of bars after the fact, and the track-record harness logs, updates and resolves only on confirmed (closed) bars, so its statistics never inflate or shift intrabar. The live oscillator updates each bar like any oscillator. All figures are in-sample and past-only.
Outputs for other scripts
Generic EXP_* plots — oscillator, signal, probability, edge, edge lower-bound, sample count, regime, band position — are published to the Data Window for use from other scripts via input.source().
Originality
Standard Keltner tools just plot the channel. This one turns band-position into a divergence oscillator and keeps a self-updating, confidence-scored, per-class track record against a same-zone baseline — so you see not just that a divergence printed, but whether and how it has paid on the current market. Clean-room implementation; no third-party Pine code reused.
Concept credits
Keltner channel — Chester Keltner; ATR-band refinement — Linda Raschke
Average True Range — J. Welles Wilder
Binomial score confidence interval — Edwin B. Wilson
Trend-efficiency regime measure — Perry Kaufman
Disclaimer
For research and education only. Not financial advice, not a recommendation, and not a guarantee of future results. All figures are in-sample and past-only. Markets carry risk; do your own research and manage your own risk. Indicator

Liquidity Divergence OscillatorOverview
Liquidity Divergence Oscillator is a distribution / absorption detector. It estimates liquidity health from Kyle's lambda — the price impact per unit of signed volume — and reads it for divergence against price. When price grinds to a higher high while liquidity health makes a lower high, large participants are often unloading size into strength (a distribution footprint); the mirror — price lower low, health higher low — is absorption. A forward-calibration harness scores whether those price/liquidity divergences have actually followed through on your instrument. It is a flow-structure read, not a signal to trade alone.
Why it is different — not another CVD/volume oscillator
CVD, the A/D line and MFI all measure the direction and amount of flow — who is buying or selling. Kyle's lambda measures something orthogonal: how much price moves per unit of that flow — the depth and fragility of the book. Price pushing to new highs while lambda quietly rises (liquidity thinning) is the classic footprint of size being distributed into strength, and no direction-only flow tool sees it. That impact axis is what makes a liquidity divergence its own, independent read — and it's why this belongs alongside your CVD tools rather than duplicating them. It's also distinct from a liquidity map: this is a standalone divergence oscillator, built to surface the turn, not to chart the shelves.
How the parts work as one tool
Signed volume — sv = volume × sign(price change), a tick-rule aggressor proxy.
Kyle's lambda — Cov(ΔP, sv) / Var(sv) over a rolling window: the regression slope of price change on signed flow, the standard lambda estimator. High = thin/stressed book, low = deep/liquid.
Liquidity health — −z(lambda), smoothed and tanh-squashed to a soft ±100 pane so "liquid vs stressed" reads on a fixed, self-scaling axis (0 = balance, ±50 ≈ a 1.6σ stretch).
Divergence — regular and hidden, from confirmed price pivots against health at those pivots.
Calibration harness — each regular divergence is queued and resolved a fixed horizon later against the unconditional base rate, reporting Hit / Edge / sample and a Wilson-gated star. A divergence class that never beats the base rate here is adding no information — and the dashboard shows that instead of assuming it.
How to use it
Read the oscillator's side and slope — above 0 is liquidity firming, below 0 is liquidity stressed. Treat a divergence mark as context (a distribution or absorption warning), never a standalone entry. Before you weight it, check the dashboard: if the Bull/Bear Edge isn't clearly positive with an adequate sample and a star, that class isn't carrying an edge on this instrument. Signals are marked in the pane and, optionally, on the price chart. Combine with your own levels, trend and risk rules — it describes behaviour; it decides nothing.
Universal & non-repainting
High/Low/Price are inputs, so the divergence engine runs on any series; the lambda estimate needs real volume, so use the futures (a cash index reads "no volume"). Pivots confirm a fixed number of bars after the fact and don't move once printed, and the calibration harness logs and resolves only on confirmed bars, so its statistics never repaint intrabar. The live oscillator updates each bar like any oscillator. Edge figures are in-sample, forward-measured at a fixed horizon, with no costs — a study aid, not a backtest.
Originality
Kyle's lambda and price/oscillator divergence are public; the Wilson interval is Edwin B. Wilson's. What's original is the specific construction: the detrend → z-score → tanh-squash liquidity-health oscillator built off the lambda estimate, the combined regular+hidden divergence engine keyed to it, and the forward-calibration harness that scores each divergence class against its base rate. Clean-room implementation; no third-party Pine code reused.
Concept credits
Price impact / lambda — Albert S. Kyle (1985)
Tick-rule aggressor signing — after the classic trade-sign literature (Lee & Ready)
Wilson score confidence interval — Edwin B. Wilson
Price/oscillator divergence — standard public technical-analysis technique
Disclaimer
Educational / informational only. Not financial advice, not a signal, not a recommendation. The lambda estimate uses tick-rule signed volume — a proxy, not the true tape — so liquidity health is an inference, not an order-book reading. Edge figures are in-sample, forward-measured with no costs. Past behaviour does not assure future behaviour. Markets carry risk. Do your own research and paper-trade before risking capital; you alone are responsible for your decisions.
Indicator

Burst Size Flow Divergence Large vs Small CVDOverview
A single cumulative-delta line tells you net buying or selling, but hides who is doing the pushing. Burst-Size Flow Divergence splits the flow inside each bar by the size of each volume burst — small / medium / large sub-intervals — and runs a separate signed delta on each tier. The signal is the divergence between the large-burst delta and the small-burst delta: concentrated bursts leaning one way while trickle flow leans the other. It is a flow-structure read, not a signal to trade alone.
What this is — and is NOT (read this before using)
This measures activity-burst size, not per-trade size. Pine cannot see individual trades — it sees a bar's volume and, via lower-timeframe requests, the volume of each sub-interval within the bar. "Large" here means a sub-interval that printed a lot of volume relative to normal — not a large single trade, and not "institutional." Institutions deliberately slice big orders into many small child-orders, so burst size is a proxy, not proof of who is behind the flow. The classification is honest about this, and the built-in harness is there precisely to test whether the divergence carries any information rather than to assert that it does.
Why these components are ONE tool (mashup justification)
Each stage exists because the previous one is ambiguous on its own:
Intrabar bucketing. Each lower-timeframe sub-bar is classed small/medium/large by its volume against an adaptive average, so "large" means large for this symbol and session, not a fixed lot count. A fixed threshold would misclassify on every instrument and every volatility regime.
Per-tier directional imbalance. Each tier gets its own signed delta (up sub-bar → +volume, down → −volume), expressed as net ÷ gross in — what fraction of that tier was net buying versus selling. Normalising this way lets the tiers' directions be compared apples-to-apples even though the large tier moves far less total volume than the small one.
The divergence. The large-minus-small spread is the object. Three separate delta lines would just be clutter to eyeball; the disagreement between the concentrated and the trickle flow is the actual read, so the tool computes it directly.
The calibration harness. "Concentrated bursts are informed" is a hypothesis, not a law — so when the spread is strong, the harness checks forward whether price actually followed the large tier more than the unconditional base rate, and reports Hit / Base / Edge on confirmed bars. That's what turns the divergence from a story into something you can verify on your instrument.
How it works
For each chart bar the finest available sub-bars are requested. Each is signed by close-versus-open (a tick-rule aggressor proxy) and bucketed by volume against the adaptive average. Per-tier signed volume becomes a net÷gross imbalance in , the large-minus-small spread is smoothed into the oscillator, and a strong gated spread is the divergence signal.
How to use it
Read the histogram (the large-minus-small spread): green means large bursts are accumulating while small flow lags or sells; red means large bursts are distributing. The bold line is the large-tier imbalance, the faint line the small tier. A gated turn in the spread suggests concentrated flow is leading, and is marked in the pane and — optionally — on the price chart. Always check the Coverage row (how much real sub-bar resolution the current bar received) and the Edge row (whether the divergence has actually led on this instrument). It is never a standalone trigger.
Plan-adaptive & data note
Sub-bar precision auto-selects the finest your plan serves (seconds on Premium+, else 1-minute). Lower-timeframe data exists only for recent bars, so older bars fall back to whole-bar flow and the coverage read shows it. The tool needs an instrument with real volume — a cash index reports none, so use the futures. The adaptive average and the calibration harness advance only on confirmed bars, so they never drift or inflate intrabar. Edge is in-sample, no costs — a study aid, not a backtest.
Originality
The parts are public: cumulative volume delta, the close-vs-open (tick-rule) aggressor proxy, and the general idea of size-partitioned / flow-toxicity order flow. What's assembled here is the specific construction — the adaptive intrabar size-tiering, the net÷gross per-tier imbalance that makes tiers of very different volume directly comparable, the large-minus-small divergence as the headline object, and the forward-calibration harness that scores it against the base rate. This is a clean-room implementation; no third-party Pine code is reused.
Concept credits
Cumulative Volume Delta — standard order-flow technique.
Close-vs-open (tick-rule) aggressor classification — after the classic trade-sign literature (Lee & Ready).
Size-partitioned / flow-toxicity order flow (VPIN) — Easley, López de Prado & O'Hara.
Disclaimer
Research and educational tool only. Not financial advice, no recommendation, no guarantee of results. Burst size is not trade size and does not identify institutions versus retail; the up/down sign is a close-vs-open proxy for the aggressor, not the true tape. Indicators describe past behaviour; they do not predict the future. Trading carries risk of loss. Test out-of-sample and make your own decisions. The author accepts no liability. Indicator

Accumulation Distribution DivergenceOverview
Accumulation Distribution Divergence turns Chaikin's Accumulation/Distribution line into a bounded pane oscillator and runs a price/oscillator divergence engine on it, with a built-in forward-calibration harness that measures whether those divergences have actually preceded a move on your instrument. It is an analytical study of accumulation versus distribution — not a strategy, not a signal, not a recommendation.
What it measures — and why it is not another CVD/MFI tool
The A/D line measures a different physical quantity from the volume oscillators most traders already run. Cumulative Volume Delta signs an entire bar's volume by tick direction; the Money Flow Index weights volume by typical price. The A/D line instead weights each bar's volume by its Close-Location-Value — how close the bar finishes to its high versus its low — so a bar that opens weak but closes on its high still accumulates. Because the input quantity is different, an A/D-line divergence is an independent read of who is in control, not a restatement of a signed-tick or typical-price oscillator. That independence is the entire point of running it alongside your existing volume tools.
How the three components work together (why they are combined)
This is a deliberate three-part construction, not a random stack. Each part answers a question the previous one leaves open:
The oscillator answers "is volume accumulating or distributing right now?" — the raw A/D line drifts endlessly and can't be read on a fixed scale, so it is detrended (subtract its EMA), z-scored over a window to put it on a portable σ axis, and tanh-squashed to a soft ±100 pane where 0 is balance and the ±50 bands mark an accumulation/distribution edge.
The divergence engine answers "is that flow diverging from price?" — it compares confirmed price pivots to the oscillator at those pivots. Regular divergence (price makes a new extreme, flow does not) flags thinning conviction; hidden divergence flags trend continuation. Divergence alone, though, is famously prone to firing early and often.
The calibration harness answers the question every divergence tool leaves unanswered: "has this class of divergence actually paid on this symbol?" Every regular divergence is queued and resolved a fixed horizon later against the unconditional same-horizon base rate, and the dashboard reports Hit % / Edge / sample size with a Wilson-score-gated star. A divergence that never beats the base rate is adding no information — and now you can see that instead of assuming it.
Together: a distinct volume lens, a divergence read on it, and an honesty layer that tells you whether the read is worth anything on the instrument in front of you.
How to use it
Read the oscillator's side and slope — above 0 is net accumulation, below 0 is net distribution.
Treat a divergence mark as context (conviction thinning or trend confirming), never as a standalone entry. It marks a condition, not a trade.
Read the dashboard before you weight a divergence: if the Bull/Bear Edge is not clearly positive with an adequate sample and a star, that class is not carrying an edge on this instrument right now.
Combine with your own level/trend framework and risk rules. This tool describes behaviour; it does not decide anything for you.
Settings
Five grouped sections: Data source (High/Low series for the pivots — configurable so the engine runs on any market), A/D engine (detrend EMA and normalization window), Divergence (pivot strength, max bars between pivots, hidden on/off, connecting lines), Calibration (forward horizon, minimum sample for stars), and Dashboard & theme (position, auto/dark/light palette that reads the chart background so the table stays legible, and the bull/bear colours).
Universality & data note
High/Low are inputs, so the divergence engine works on any symbol or timeframe. The A/D line, however, needs real volume — on a no-volume symbol (like a cash index) the dashboard reads "no volume" and no signals fire. Use the futures contract. Defaults target liquid index-futures intraday; change the sources and lengths for any other asset.
Non-repainting
Pivots confirm a fixed number of bars after the fact and do not move once printed. The calibration harness logs and resolves only on confirmed bars, so its statistics never repaint. The live oscillator value updates each bar, like any oscillator.
Originality
The Accumulation/Distribution line and Close-Location-Value are Marc Chaikin's public concepts; the Wilson score interval is Edwin B. Wilson's; price/oscillator divergence is a standard public technique. What is original here is the specific construction: the detrend → z-score → tanh-squash oscillator that makes the A/D line readable on a fixed bounded scale, the combined regular+hidden divergence engine keyed to that oscillator, and — most importantly — the forward-calibration harness that scores each divergence class against its unconditional base rate with a Wilson-gated confidence read. This is a clean-room implementation; no third-party script code is reused.
Concept credits
Accumulation/Distribution line & Close-Location-Value — Marc Chaikin
Wilson score confidence interval — Edwin B. Wilson
Price/oscillator divergence — standard public technical-analysis technique
Disclaimer
Educational / informational only. Not financial advice, not a signal, not a recommendation. The oscillator describes past volume-and-location behaviour; the edge figures are in-sample, forward-measured at a fixed horizon over overlapping windows, with no costs, slippage or stops — read them as context, not a verified backtest. Past behaviour does not assure future behaviour. Markets carry risk. Do your own research and paper-trade before risking capital; you alone are responsible for your decisions. Indicator

Signature Pivots: Conviction & DivergenceSignature Pivots: Conviction & Divergence
Every chart prints dozens of swings and most of them are noise. This
tool has one job: help you pick the pivots worth anchoring analysis
on. It finds confirmed swing highs and lows, filters out the minor
wiggles, stamps each survivor with a time signature, grades it by
volume conviction, and warns when a new extreme was made on hollow
volume. It draws and grades structure - it never tells you to buy or
sell.
How pivots are found
A swing high is a bar whose high is the highest of N bars on either
side (N is the "Pivot strength" input; swing lows mirror it). A pivot
can therefore only confirm N bars after the fact - that is detection
lag, not repainting, and once a marker prints it stays. On top of that
sits a size filter: a new pivot must be at least "Min swing size" ATRs
away from the previous kept pivot, so a daily chart shows the swings
that matter instead of every five-bar fractal. Set it to 0 if you want
them all.
The signature
This is the unusual part. Each pivot's UTC timestamp is converted,
through sidereal time at the market center you choose, into the degree
of the zodiac rising on the eastern horizon at that exact moment - the
Ascendant. That gives a number from 0 to 360 which sweeps the full
circle once every 23 hours 56 minutes. It depends only on the clock
and the location, never on price, so the same moment always maps to
the same number on every chart and timeframe. In plain terms, it tags
each pivot with where in the daily rotation cycle it formed. The old
observation being tested here is that turns tend to recur at the same
phase of that cycle.
Matching
The last 24 pivots (a setting) are kept in memory. Each new pivot's
signature is compared against stored pivots of the same kind only -
highs against earlier highs, lows against earlier lows - measured
correctly around the 360 ring, so 359 and 1 are two degrees apart, not
358. If the nearest same-kind signature sits within the match
tolerance (1 degree by default), the pivot is flagged: its label
highlights with a star, a dotted line links it back to the pivot it
repeats, and an alert fires. A match is a candidate worth studying,
not proof of anything - the defaults are deliberately strict so that a
star stays rare.
Conviction and divergence
Volume flow is measured with on-balance volume: each bar's volume
added on an up close, subtracted on a down close. A pivot's conviction
is simply whether OBV stood above or below its own moving average at
the pivot bar - was volume flow supporting the move that made the
swing, or fighting it. Divergence looks at consecutive extremes: a new
swing high above the previous one, with OBV lower than it was at the
previous high, prints a bearish divergence mark (price stretched,
volume flow did not follow); new lows mirror that for bullish
divergence.
Why these three live in one tool: they are three questions about the
same object. Did this pivot form at a recurring phase of the rotation
cycle? Did volume back the swing? Was the extreme hollow? Read
together on one label, they turn a plain zigzag into a graded list of
anchor candidates.
Reading the chart
H and L mark confirmed swing highs and lows. The caret after the
letter is conviction at that pivot (^ above the OBV average, v below).
The number is the signature in degrees. A star and highlighted color
mean a signature match, with a dotted line back to the earlier pivot
it repeats. "Div" marks print at divergent extremes. The zigzag
connects consecutive pivots so the structure stays visible. The HUD
shows the live conviction state, the last signature, the last
high-value pivot, and running pivot and match counts - event counts,
not performance figures.
Settings worth knowing
Pivot strength and Min swing size control how selective the swing
detection is. Match tolerance and Match memory control how strict a
"repeat" must be - loosening either will flag more pivots, and past a
point most of those extra stars are coincidence, which is why the
defaults are tight. The Market Center sets the geographic reference
for the signature; keep one consistent choice across your charts so
signatures stay comparable (for 24/7 crypto any consistent center
works). "Only show high-value pivots" hides everything except matches
if you want the quietest possible chart.
Using it
It runs on any timeframe, with one honest caveat: the matching layer
is most alive on intraday charts. On daily bars every pivot stamps at
the same time of day, so signatures drift about a degree per day and
repeats are naturally rare and far apart - on a daily chart this tool
is mainly a swing, conviction and divergence grader. Use it as a
filter, not a trigger: when you need a swing to anchor other work on,
prefer the starred pivots, and among those prefer the ones whose
conviction agreed with the swing and that carry no divergence warning.
Alerts are provided for a high-value pivot, bullish and bearish
divergence, and each new confirmed swing.
What is original here
Swing detection, OBV and divergence are standard public techniques.
The original work is the signature layer - the rising-degree
computation runs entirely on the chart from the timestamp, with no
external data - together with the ring-correct same-kind matching and
its pivot-to-pivot links, and the fusion of the three readings into a
single graded label. Written from scratch in Pine v6; no open-source
code was reused.
Honest notes
Pivots confirm late by construction. Some matches will always be
coincidence; the tolerance and memory settings exist to keep that in
check, and a star is an invitation to look closer, nothing more.
Different market centers give different signature numbers, so keep
yours consistent. Educational study tool; the HUD counts events, not
wins; no performance claims; not financial advice. Indicator

MACD Dynamic Squeeze Pro [ZynAlgo]1. Technical Overview
ZynAlgo MACD Dynamic Squeeze Pro is a momentum-context indicator built from the traditional MACD concept. Instead of trying to pick tops and bottoms against the trend, it focuses on trend-following shakeouts, energy compression, and breakout confirmation after a squeeze phase.
2. Chart Reading & UI Guide
ZynAlgo Ribbon
The area between the MACD line and Signal line is filled with Green/Purple ribbon colors.
The ribbon helps traders quickly see which side currently has momentum control.
Use the ribbon as context for your own trading approach, not as a standalone entry trigger.
4-State Histogram
Neon Green highlights bullish acceleration.
Neon Purple highlights bearish acceleration.
Faded colors warn that momentum is losing strength or price may be stagnating.
Diamond Marker on Main Chart
The breakout context marker is plotted directly on the main price chart.
This reduces the need to constantly switch attention between the oscillator pane and price candles.
Treat the marker as a context alert that should be confirmed with your own entry method, risk plan, and market structure.
3. Zyn Explosion Logic
The Green/Purple diamond markers appear only when the indicator detects several conditions together:
Trend Filter: The MACD and Signal lines must both be above the Zero line for bullish trend context, or both below the Zero line for bearish trend context.
Squeeze Phase: The histogram compresses, showing that the market is consolidating or shaking out traders.
Explosion Phase: After the squeeze, MACD crosses the Signal line with enough timing alignment to suggest momentum expansion.
This is a context/analysis tool, not a signal generator. The marker identifies a possible momentum continuation area, but it does not execute trades or guarantee direction.
4. Settings Explanation
Momentum Average Length
Controls the period used to calculate the average volatility of the histogram.
This average becomes the baseline for detecting whether current momentum is compressed.
Squeeze Compression Ratio
Controls how tightly the histogram must compress before the market is considered to be in a squeeze phase.
For example, 0.5 means the current histogram column must compress to less than 50% of the average.
Lower values reduce marker frequency and make the squeeze requirement stricter.
Squeeze Valid Lookback
Defines how many bars after the squeeze phase the MACD cross can still qualify.
This helps reject late or off-beat crossover events.
5. Recommended Presets
Gold Breakout - XAUUSD 5m/15m
Squeeze Average Length: 20
Squeeze Compression Ratio: 0.4
Valid Lookback: 3
Useful when gold creates short-term shakeouts before starting a stronger trend move.
Crypto Trend Following - BTC/ETH 15m/1H
Squeeze Average Length: 30
Squeeze Compression Ratio: 0.5
Valid Lookback: 5
Useful when crypto spends longer periods in sideways consolidation before momentum expansion.
6. Best Practices & Limitations
Use this tool as momentum and squeeze context for your own framework.
Confirm any trade idea with price structure, session context, volatility, and risk planning.
A diamond marker is not an automatic buy or sell instruction.
This tool does not predict price movement.
You alone are responsible for your trading decisions.
No tool eliminates risk or guarantees results.
Indicator

Divergence Indicator RSI, MACD,, Hidden Reversal Signals LunqFXDivergence Indicator is a multi-engine divergence scanner for PulseWire that reads RSI, MACD and OBV at every confirmed swing and only draws a divergence when the engines agree — so instead of the usual flood of weak one-oscillator signals, you get a few graded, high-conviction ones. Every divergence is rated by strength: ★★★ all three engines confirm (rare, strongest), ★★ two confirm, single-engine noise is filtered out by default. It detects regular divergences (price makes a new extreme, oscillators refuse — potential reversal) and hidden divergences (trend continuation), on any market — forex, crypto, stocks, indices, gold — and any timeframe. Built in Pine Script v6, fully non-repainting. Keywords: divergence indicator, RSI divergence, MACD divergence, OBV divergence, hidden divergence, regular divergence, reversal, momentum, exhaustion, multi oscillator scanner.
◆ WHY MULTI-ENGINE
Any single oscillator diverges constantly — that's why classic divergence tools feel random. Requiring independent confirmation from momentum (RSI), trend-momentum (MACD) and volume flow (OBV) removes most false positives: when all three refuse to follow price, the move is genuinely running out of fuel.
◆ WHAT IT DRAWS
Divergence lines on price — solid neon violet for bullish, neon amber for bearish; dashed for hidden divergences.
Star-graded labels — ★★ / ★★★ with tooltips explaining exactly what diverged.
Exhaustion candles — a unique display layer: candles glow at full neon while price and engines agree, and fade as engines stop confirming — you see a divergence brewing before it prints.
Status strip dashboard — a horizontal HUD along the bottom: last signal + strength, a live engine board (P / RSI / MACD / OBV direction arrows), a FUEL meter, and bull/bear counters.
◆ HOW IT WORKS
Swings are detected with confirmed pivots (N closed bars each side).
At each new confirmed pivot the scanner compares price and each engine against the previous pivot: price lower low + engine higher low = regular bull; price higher low + engine lower low = hidden bull (mirrored for highs).
The number of agreeing engines (1–3) becomes the star rating; signals below your minimum are skipped.
The live engine board and fuel meter track slope agreement in real time — display-only context that never alters signals.
◆ HOW TO USE IT
Treat ★★★ regular divergences as your primary reversal alerts — look for entries with your own structure/levels.
Use hidden divergences to join the trend on pullbacks.
Watch the FUEL meter: when it drains and candles fade, tighten stops on trend trades.
Raise Min strength to 3 for only the rarest, cleanest signals; lower pivot bars for faster (but noisier) detection.
◆ SETTINGS
Pivot left/right bars, max gap between swings, minimum strength, hidden divergences on/off, engine toggles (RSI/MACD/OBV), RSI length, exhaustion candles, label size, dashboard position/size.
◆ ALERTS
Bullish divergence · Bearish divergence (fire when a confirmed signal prints).
◆ LIMITATIONS
Signals confirm with a pivot delay (right bars) — that is the honest cost of zero repaint; lower it for speed, raise it for reliability.
On symbols without volume data the OBV engine adds no information — disable it there.
Divergence marks exhaustion, not timing — always combine with structure and risk management.
◆ ORIGINALITY & NON-REPAINTING
Original work: the three-engine agreement grading, the exhaustion-candle layer, the live engine board and the fuel meter are my own implementation — no third-party code. All divergences are built from confirmed pivots only; a drawn line or label never moves or disappears.
Educational analysis tool, not financial advice. © LunqFX. Indicator
