STRX - AutoBar Index NavigatorSTRX - Bar Index Navigator is a lightweight overlay indicator designed to display the numerical position of each candle on PulseWire. It helps users quickly identify the exact index of historical candles through the Data Window, Status Line, live label, and optional milestone markers at regular intervals. The script is intended as a chart navigation and orientation tool for manual analysis, replay, and visual chart review.
pulsewire
+1
In addition to its direct charting use, this indicator was also created to support other indicators, scripts, or studies that require the correct identification of a candle’s bar_index. In that role, it can serve as an auxiliary tool for locating the exact bar to use as a reference in custom analysis or scripted logic.
pulsewire
+1
Features
Displays the current candle index in real time.
Shows bar_index values in the Data Window and Status Line.
Adds an optional live label on the last bar.
Includes optional historical milestone markers at configurable intervals.
Fully customizable colors and marker spacing.
pulsewire
+1
Intended Use
This indicator is designed as a visual aid for traders and script developers who need to reference candle positions quickly and precisely. It does not generate trade signals, forecasts, or automated orders.
pulsewire
+1
Notes
Intended for educational, analytical, and development-support use.
Can be useful as a reference tool for other scripts that rely on bar_index-based coordinates. Indicator

Price Structure RSIOverview
Price Structure RSI is a market-structure oscillator that converts confirmed structural breaks into a cumulative directional series and then applies the Relative Strength Index calculation to that series.
Unlike a traditional RSI, which is calculated directly from price changes, this indicator measures how previously identified pivot highs and pivot lows are being broken.
The oscillator includes:
- market-structure-based RSI
- configurable RSI length
- configurable overbought and oversold levels
- Close or High/Low structure-break confirmation
- optional EMA, SMA, or WMA smoothing
- confirmed bullish and bearish signals
- dark and light colour presets
- gradient oscillator visualization
- simplified bullish and bearish historical W/L panels
- configurable target and stop distances
- configurable panel positions
- bullish and bearish alerts
The indicator is intended to help users examine whether recent market-structure breaks are producing stronger bullish or bearish pressure.
It does not predict future price movement and does not provide automatic instructions to enter or exit a trade.
Open-source reuse and credits
Price Structure RSI is a modified and expanded derivative of the open-source indicator "Market Structure RSI" by ClayeWeight.
The original pivot detection, stored structure levels, broken-structure accumulation, cumulative structure total, RSI transformation, moving-average selection, threshold-crossing signals, and alert framework were adapted from ClayeWeight's work.
This version adds:
- Pine Script v6 compatibility
- dark and light colour presets
- revised oscillator colours and gradient fills
- confirmed-bar signal processing
- configurable historical target and stop measurements
- next-bar outcome evaluation
- conservative same-bar target and stop handling
- separate bullish and bearish W/L panels
- configurable panel positioning and offsets
- additional input validation
- revised alert messages
The original source was published under the Mozilla Public License 2.0.
This modified version is also published open-source under the Mozilla Public License 2.0.
Core methodology
The indicator first identifies simple confirmed pivot highs and pivot lows.
A pivot high is identified when:
- the centre candle has a higher high than the candle before it
- the centre candle has a higher high than the candle after it
A pivot low is identified when:
- the centre candle has a lower low than the candle before it
- the centre candle has a lower low than the candle after it
Because the script evaluates historical candles, the pivot is recognized only after the necessary later candle has closed.
Confirmed pivot-high prices are stored in an array.
Confirmed pivot-low prices are stored in a separate array.
Structure breaks
The indicator checks whether stored pivot levels have been broken.
Users can select one of two Structure Break Type settings:
- Close
- High/Low
When Close is selected:
- a stored pivot high is considered broken when the previous candle closes above it
- a stored pivot low is considered broken when the previous candle closes below it
When High/Low is selected:
- a stored pivot high is considered broken when the previous candle high moves above it
- a stored pivot low is considered broken when the previous candle low moves below it
When one or more stored pivot highs are broken, positive values are added to the cumulative structure total.
When one or more stored pivot lows are broken, negative values are added to the cumulative structure total.
Broken levels are removed from their respective arrays so that the same structure level is not counted repeatedly.
Cumulative structure total
Each broken pivot high contributes:
- +1
Each broken pivot low contributes:
- -1
If several stored structure levels are broken together, several values can be added during the same calculation.
The script then calculates the cumulative sum of these positive and negative structure changes.
A rising structure total indicates that more stored pivot highs are being broken.
A falling structure total indicates that more stored pivot lows are being broken.
Structure RSI
The Relative Strength Index calculation is applied to the cumulative structure total rather than directly to price.
The default RSI Length is:
- 20
The resulting oscillator is called the Structure RSI.
Higher Structure RSI values indicate that bullish structure breaks have recently had greater influence on the cumulative series.
Lower Structure RSI values indicate that bearish structure breaks have recently had greater influence.
The Structure RSI should not be interpreted as a standard price RSI because its input is the cumulative structure-break series rather than normal closing-price changes.
Overbought and oversold levels
The default levels are:
- Overbought Level: 80
- Oversold Level: 20
The Oversold Level must remain below the Overbought Level.
The script displays an error when the oversold setting is equal to or above the overbought setting.
The levels are configurable and should be treated as analytical thresholds rather than universally optimal settings.
Bullish signal
A bullish signal occurs when the Structure RSI crosses upward through the selected Oversold Level.
The signal is confirmed only after the chart candle closes.
The bullish marker appears at the bottom of the oscillator pane.
A bullish signal indicates that the structure-based oscillator has recovered above its lower threshold.
It does not guarantee that price will continue higher.
Bearish signal
A bearish signal occurs when the Structure RSI crosses downward through the selected Overbought Level.
The signal is confirmed only after the chart candle closes.
The bearish marker appears at the top of the oscillator pane.
A bearish signal indicates that the structure-based oscillator has moved back below its upper threshold.
It does not guarantee that price will continue lower.
Moving average
An optional moving average can be applied to the Structure RSI.
Available moving-average types are:
- EMA
- SMA
- WMA
The default settings are:
- Moving Average Type: EMA
- Moving Average Length: 8
The moving average can be used to observe the smoother direction of the Structure RSI.
The moving average does not directly create the bullish or bearish threshold signals.
Hiding the moving average does not change the Structure RSI calculation.
Oscillator colours
The Structure RSI line changes colour according to its current position.
- Above the Overbought Level: bearish colour
- Below the Oversold Level: bullish colour
- Between the two levels: neutral grey
The oscillator also includes:
- a dashed overbought line
- a dashed oversold line
- a dotted 50 midline
- a neutral background fill between the main levels
- bullish and bearish gradient fills
- optional dark and light colour presets
The colour settings change presentation only.
They do not alter the structure calculation or signal logic.
Confirmed signals
Bullish and bearish signals are accepted only on confirmed chart bars.
The script does not finalize a signal solely because the Structure RSI temporarily crosses a threshold while the active candle is still open.
Values may still move while the current chart candle develops.
The final marker and alert are generated only after the candle closes with the crossing condition confirmed.
Historical W/L measurements
The indicator includes simplified historical bullish and bearish outcome measurements.
These measurements are not a complete PulseWire strategy backtest.
When no measurement is currently active, a confirmed signal can begin a new historical measurement.
For a bullish signal:
- the signal candle close becomes the recorded entry price
- the target is placed above the recorded entry
- the stop is placed below the recorded entry
For a bearish signal:
- the signal candle close becomes the recorded entry price
- the target is placed below the recorded entry
- the stop is placed above the recorded entry
Only one unresolved historical measurement is tracked at a time.
Target distance
Target Distance (%) controls the percentage distance between the recorded signal close and the historical target.
The default value is:
- 1.0%
For a bullish measurement:
- Target = Entry Price × (1 + Target Percentage)
For a bearish measurement:
- Target = Entry Price × (1 - Target Percentage)
The minimum allowed target distance is 0.1%.
Stop distance
Stop Distance (%) controls the percentage distance between the recorded signal close and the historical stop.
The default value is:
- 1.0%
For a bullish measurement:
- Stop = Entry Price × (1 - Stop Percentage)
For a bearish measurement:
- Stop = Entry Price × (1 + Stop Percentage)
The minimum allowed stop distance is 0.1%.
Next-bar evaluation
Target and stop evaluation begins on the bar after the signal.
The signal candle itself is not used to determine the result.
This prevents price movement that occurred earlier during the signal candle from being counted after the entry has been recorded at that candle's close.
Wins and losses
The tables use the following labels:
- W = Win
- L = Loss
A win means that the configured target was reached before the configured stop.
A loss means that the configured stop was reached before the configured target.
The displayed percentage is:
- Wins divided by completed Wins and Losses
Bullish and bearish measurements are counted separately.
Same-bar target and stop handling
A chart candle can sometimes touch both the target and stop.
Standard OHLC chart data does not reveal which level was reached first inside that candle.
When both levels are touched during the same bar, the script records a loss.
This conservative rule avoids automatically assuming the more favourable outcome.
The script does not reconstruct lower-timeframe intrabar movement.
One active measurement at a time
Only one unresolved historical measurement can be active.
When a measurement is already active:
- later bullish or bearish signals can still appear
- later signals can still trigger alerts
- later signals do not start another W/L measurement
- the active measurement remains open until its target or stop is reached
An opposite signal does not automatically close the existing measurement.
This means that not every displayed signal is included in the W/L panels.
Bull panel
The Bull panel displays results from completed bullish measurements.
The panel contains:
- Bull
- W: number of bullish targets reached first
- L: number of bullish stops reached first
- percentage of completed bullish measurements recorded as wins
The Bull panel position can be selected from the available chart locations.
Bear panel
The Bear panel displays results from completed bearish measurements.
The panel contains:
- Bear
- W: number of bearish targets reached first
- L: number of bearish stops reached first
- percentage of completed bearish measurements recorded as wins
The Bear panel position can be selected independently from the Bull panel.
Panel positions and offsets
The Bull and Bear panels can be placed at:
- top left
- top centre
- top right
- middle left
- middle centre
- middle right
- bottom left
- bottom centre
- bottom right
Row and column offsets can be used to move each panel within the available position grid.
Negative row values move the selected panel upward.
Positive row values move it downward.
Negative column values move it to the left.
Positive column values move it to the right.
The final position is restricted to the available PulseWire table locations.
The panels can overlap when both are assigned to the same effective position.
Meaning of the displayed percentage
The percentage represents the share of completed measurements where the configured target was reached before the configured stop.
It is not:
- a guaranteed win rate
- proof of future profitability
- a complete strategy result
- a recommendation to enter a trade
- a forecast of future performance
The historical measurement does not include:
- commissions
- spread
- slippage
- liquidity
- order execution
- position sizing
- account equity
- partial exits
- trailing stops
- market gaps
- order rejection
- overlapping positions
- complete intrabar sequencing
Historical results do not guarantee future results.
Alerts
The indicator includes two alert conditions:
- Bullish Signal
- Bearish Signal
The Bullish Signal alert is triggered when the Structure RSI crosses upward through the Oversold Level on a confirmed chart bar.
The Bearish Signal alert is triggered when the Structure RSI crosses downward through the Overbought Level on a confirmed chart bar.
When creating PulseWire alerts, use:
- Once Per Bar Close
This matches the confirmed signal logic.
How to Use
1. Apply the indicator
Add Price Structure RSI to a standard PulseWire chart.
The oscillator appears in a separate pane below the main price chart.
2. Begin with the default settings
The default configuration is:
- RSI Length: 20
- Overbought Level: 80
- Oversold Level: 20
- Structure Break Type: High/Low
- Moving Average Type: EMA
- Moving Average Length: 8
- Target Distance: 1.0%
- Stop Distance: 1.0%
Review the indicator with its default configuration before changing several settings simultaneously.
3. Select the structure-break type
Choose High/Low when a stored structure level should be considered broken as soon as the previous candle's high or low passes it.
Choose Close when the previous candle must close beyond the stored structure level.
High/Low is generally more responsive.
Close is generally more restrictive.
Neither setting is automatically more accurate.
4. Read the Structure RSI
Use the oscillator to observe the balance of recent broken pivot highs and pivot lows.
A rising oscillator indicates that bullish structure breaks are having greater recent influence.
A falling oscillator indicates that bearish structure breaks are having greater recent influence.
The oscillator can remain elevated or depressed during extended directional conditions.
5. Read the overbought area
When the Structure RSI moves above the Overbought Level, bullish structure-break pressure has pushed the oscillator into its upper region.
The bearish signal does not occur merely because the oscillator is above the level.
The bearish signal occurs only when the oscillator later crosses downward through the Overbought Level on a confirmed bar.
6. Read the oversold area
When the Structure RSI moves below the Oversold Level, bearish structure-break pressure has pushed the oscillator into its lower region.
The bullish signal does not occur merely because the oscillator is below the level.
The bullish signal occurs only when the oscillator later crosses upward through the Oversold Level on a confirmed bar.
7. Wait for the candle to close
Signals are confirmed at bar close.
Do not treat a temporary intrabar threshold crossing as a finalized signal.
Wait for the marker to remain after the chart candle closes.
8. Use the moving average
Enable the moving average to observe a smoother version of the Structure RSI.
Available types are:
- EMA
- SMA
- WMA
A shorter moving-average length reacts more quickly.
A longer moving-average length responds more slowly.
The moving average can provide visual context, but it is not part of the threshold-crossing signal condition.
9. Configure the target and stop distances
Set Target Distance (%) and Stop Distance (%) according to the historical measurement you want to study.
For example:
- Target: 1.0%
- Stop: 1.0%
This creates an equal-distance historical measurement.
Another example:
- Target: 2.0%
- Stop: 1.0%
This creates a larger target than stop.
These settings are research parameters and are not recommended trading settings.
10. Read the Bull panel
The Bull panel measures completed bullish signals.
- W means the bullish target was reached first
- L means the bullish stop was reached first
- the percentage shows bullish wins divided by completed bullish outcomes
Only signals that begin while no other measurement is active are included.
11. Read the Bear panel
The Bear panel measures completed bearish signals.
- W means the bearish target was reached first
- L means the bearish stop was reached first
- the percentage shows bearish wins divided by completed bearish outcomes
Only signals that begin while no other measurement is active are included.
12. Understand same-bar outcomes
When both the target and stop are touched during the same candle, the result is counted as a loss.
This is a conservative assumption because the chart's OHLC data cannot show which level was reached first.
13. Understand skipped measurements
A signal can appear while another historical measurement is still unresolved.
That signal can still:
- display a marker
- trigger an alert
However, it does not begin another historical measurement.
This is why the total W/L count may be lower than the total number of visible signals.
14. Position the panels
Choose separate positions for the Bull and Bear panels.
The default positions are:
- Bull panel: top left
- Bear panel: top right
Use the row and column offsets when small position adjustments are needed.
Avoid assigning both panels to the same final position unless overlapping panels are intended.
15. Select the colour preset
Use Dark Background on dark chart themes.
Use Light Background on light chart themes.
The preset changes moving-average and panel text colours.
It does not change the indicator calculations.
16. Create alerts
Create separate PulseWire alerts for:
- Bullish Signal
- Bearish Signal
Use Once Per Bar Close.
Test alerts on the intended symbol and timeframe before using them operationally.
17. Review broader market context
Use Price Structure RSI together with additional analysis such as:
- trend direction
- price structure
- support and resistance
- volume
- volatility
- liquidity
- market sessions
- recent swing highs and lows
- scheduled economic or company events
- risk management
A threshold crossing alone does not guarantee a reversal or continuation.
Suggested starting process
- Apply the indicator to a standard candlestick chart
- Keep RSI Length at 20
- Keep the levels at 80 and 20
- Begin with High/Low structure breaks
- Keep the EMA smoothing line enabled
- Use a target and stop distance of 1.0%
- Wait for confirmed bar-close signals
- Compare the oscillator with visible price structure
- Review the Bull and Bear panels separately
- Remember that only one active measurement is tracked
- Test several symbols and timeframes before drawing conclusions
- Use Once Per Bar Close for alerts
Limitations
- The indicator is derived from the open-source Market Structure RSI by ClayeWeight
- The central structure-break accumulation methodology is adapted from the original work
- Pivot identification is based on a simple three-candle relationship
- Pivots are identified only after the required later candle has closed
- The oscillator measures broken stored structure levels rather than normal price momentum
- The Structure RSI can behave differently from a standard price RSI
- The indicator does not determine whether a structure break is genuine or false
- The indicator does not measure volume, volatility, liquidity, or trend strength
- Signals are confirmed at bar close and may occur later than temporary intrabar conditions
- A bullish signal does not guarantee that price will rise
- A bearish signal does not guarantee that price will fall
- Only one unresolved historical measurement is tracked at a time
- Not every visible signal is represented in the W/L panels
- Opposite signals do not close active measurements
- Target and stop evaluation begins on the bar after the signal
- Same-bar target and stop contact is recorded as a loss
- The W/L panels are simplified historical measurements
- The displayed percentages are not complete backtest results
- Commissions, spread, slippage, liquidity, position sizing, and execution are not included
- Historical outcomes do not imply future results
- The indicator should not be used as the sole basis for a trading decision
Price Structure RSI is an analytical and research tool.
It does not provide financial advice, guaranteed signals, guaranteed win rates, or guaranteed results. Indicator

Pressure Fatigue Index [PFI] v3Pressure Fatigue Index (PFI)
OVERVIEW
The Pressure Fatigue Index is a bounded oscillator that reads from 0 to 100. Low readings mean oversold and high readings mean overbought, the same orientation you already know from RSI. That is where the resemblance ends. PFI does not use the average gain versus average loss ratio that RSI is built on. It reads a completely separate stream of information, namely where price settles inside each bar and how forceful that bar was, and it adds a fatigue mechanism that keeps the oscillator from pinning at an extreme for long stretches. That pinning behavior is the single most common frustration with RSI in trending markets, and removing it is the whole point of this tool.
HOW THE READING IS BUILT
For every bar, PFI measures where the close finished inside that bar's own range. A close near the high produces a positive value, a close near the low produces a negative value, and the exact middle of the bar is zero. In plain terms the raw bar value is twice the close, minus the high, minus the low, all divided by the range of the bar.
That location is then weighted by the size of the bar relative to recent volatility, using its true range compared with ATR. A wide conviction bar counts far more than a narrow indecisive one, so a big committed push moves the reading while chop barely registers.
Those weighted values are smoothed with a Wilder average into a running charge, and the charge is passed through a smooth squashing curve, a hyperbolic tangent, that maps it cleanly onto the 0 to 100 scale. The outcome is an oscillator that responds to genuine intrabar buying and selling pressure rather than to close to close drift.
THE FATIGUE MECHANIC
This is what separates PFI from every standard oscillator. While the reading sits beyond your overbought or oversold level, a hidden fatigue term builds up, and it builds faster the deeper the reading has pushed into the extreme. That fatigue then compresses the plotted line back toward the midline. To hold a value pinned at 85 the market would have to supply constantly accelerating fresh pressure, which real markets cannot sustain, so an extended run simply sags the line out of the zone on its own. The moment the reading leaves the extreme, fatigue releases and full sensitivity returns. Fatigue is driven by the underlying raw reading rather than the visible plotted line, so there is no threshold flutter and no repainting.
THE RAW GHOST LINE
PFI plots two lines. The bold purple line is the fatigue compressed reading you trade from. The faint gray ghost line behind it is the raw pressure before fatigue is applied. The distance between the two is itself information. When the ghost is still pinned deep in a zone while the purple line sags away from it, the move is still strong and it is not yet time to fade. When both lines roll out of the zone together, the exhaustion is real. The gap between them also drives the signal engine described below.
THE SIGNAL ENGINE
The buy and sell markers are built to catch turns at the actual low and high, not to fire every time a line touches a level. A signal is the end of a short sequence rather than a single condition, and each side can fire only once per cycle.
A buy requires the following to line up in order. First, a flush bar must occur while the raw reading is oversold, meaning a bar that is unusually wide relative to ATR and that closes down at the bottom of its own range. That is the panic capitulation that tends to mark bottoms, and it is marked on the pane with a small dot. Second, the episode must be mature, meaning the gap between the ghost and the purple line has grown wide enough to prove the move was both deep and sustained. Third, the trigger bar itself must be a conviction reversal, a bar with real size that closes up near the top of its range while the reading turns back up near the zone. In short, sellers pressed hard, exhausted themselves on a flush, and buyers just took the first decisive bar back.
Sells are the exact mirror. A euphoric blowoff bar in the overbought zone, a mature episode, and then a heavy rejection bar near the high.
After a signal fires, that side locks and cannot fire again until the reading passes back through the midline, so a single messy bottoming or topping process produces one marker rather than a cluster. A cooldown allows a second attempt only if a fresh, deeper flush develops.
There is also an optional divergence filter. When enabled, a buy also requires price to print a new low for the episode while the pressure reading makes a higher low, the classic bottoming tell. It is off by default because it screens out clean sharp reversals that have no divergence, but you can enable it when you only want the highest conviction fades.
INPUTS
Core sets the price source, the pressure length, the volatility length, and the sensitivity that controls how easily the reading reaches its extremes.
Zones set your overbought and oversold levels.
Fatigue exposes the build rate, the release rate, and the impact, so you can tune how quickly the oscillator tires and recovers and how hard it is pulled back toward the middle.
Signals expose the arm gap, the flush bar strictness, the trigger bar strictness, the near zone buffer, the optional divergence filter, and the re signal cooldown.
Smoothing gives you a moving average over the oscillator with the same menu as the built in RSI, including SMA, EMA, SMMA, WMA, VWMA, and an SMA option with Bollinger Bands.
HOW TO USE IT
Treat the purple line the way you would treat any oscillator, with low as oversold and high as overbought, but trust it to leave the zone on its own rather than staying stuck. Use the ghost line and its distance from the purple line to judge whether a move is still strong or genuinely tiring. Take the triangle markers as your prepared fade entries, and remember that each side fires once per cycle by design. If you want more markers on a fast timeframe, loosen the flush range first, then the arm gap, then the trigger close location. If you want fewer and stronger markers, do the reverse and consider enabling the divergence filter.
Set your alerts to fire once per bar close, since the live bar can move before it settles.
NOTE
This tool is offered for research and education. It is not financial advice. Test it on your own markets and timeframes and manage your own risk before trading it.
Indicator

EGADE Research-Based RSI Threshold ConfigurationEGADE Research-Based RSI Threshold Configuration is an empirical RSI decision-support indicator based on the findings of research by Hatem Mabrouk , Federico Trigos , and Francisco Valderrey , Tecnologico de Monterrey, EGADE Business School, Mexico
The underlying study systematically evaluated nine RSI threshold configurations across nine major cryptocurrencies and the S&P 500 using weekly RSI(14) data. The findings challenge the conventional assumption that the standard 30/70 configuration is universally optimal and identify asset-specific dominant threshold configurations based on win rate, geometric weekly return, and average holding period.
This indicator operationalizes those empirical findings directly within PulseWire. For assets included in the study, it automatically displays the research-based RSI threshold configuration identified by the empirical analysis.
The indicator provides three display modes:
• Research-Based: Displays the empirically identified threshold configuration for the selected asset.
• Conventional 30/70: Displays the traditional RSI 30/70 configuration.
• Compare Both: Displays the research-based and conventional configurations simultaneously for direct comparison.
The indicator uses weekly RSI(14) regardless of the chart timeframe and provides visual entry and exit zones, threshold-entry markers, alerts, and an information dashboard.
Assets currently supported by the empirical research: BTC, ETH, ADA, AVAX, BNB, DOGE, SOL, TRX, XRP, and the S&P 500.
Disclaimer: The findings and information presented through this indicator are intended exclusively for academic, research, educational, and decision-support purposes. Nothing contained in the underlying study or this indicator constitutes financial or investment advice, an investment recommendation, or a solicitation to buy or sell any financial instrument. Historical empirical performance does not guarantee future results. Users should conduct their own analysis and exercise independent judgment when making financial or investment decisions. Indicator

Indicator

Market Euphoria Index - MEI1. The Three Core Factors
The script measures market sentiment by evaluating three different "factors" of price action and assigning a score from 0 to 100 for both Euphoria and Panic.
RSI Factor (Momentum Extremes): It checks if the traditional RSI is overextended.
If RSI is above 70, it scales the value into an Euphoria Score. For example, an RSI of 85 will have a higher Euphoria score than an RSI of 75.
If RSI is below 30, it scales into a Panic Score.
VWAP Stretch Factor (Overextension): It measures how far the current price has stretched away from the Volume Weighted Average Price (VWAP), normalized by the Average True Range (ATR).
If the price shoots up higher than the VWAP by a multiple of the ATR (default is 2.0x), it triggers a maximum 100 Euphoria Score (indicating the asset is heavily overvalued relative to its average volume-weighted baseline).
If it crashes below the VWAP by the same distance, it triggers a 100 Panic Score.
Price Momentum / K's Factor (Candlestick Sentiment): This looks purely at the candlesticks over the last 14 periods (by default).
It counts how many candles closed higher than they opened (Bullish candles) and converts that ratio into an Euphoria Score.
It does the inverse for Bearish candles to create a Panic Score.
2. The Composite Blend
Once the script has the three Euphoria scores and three Panic scores, it averages them:
pinescript -
euphoriaScore = (rsiEuphoria + vwapEuphoria + momEuphoria) / 3
panicScore = (rsiPanic + vwapPanic + momPanic) / 3
Finally, it subtracts the panicScore from the euphoriaScore to get the final mei value.
3. Interpretation & Visuals
The indicator plots as a histogram with dynamic colors and static threshold lines:
> +50 (Red): Extreme Euphoria. The market is firing on all cylinders (RSI overbought, stretched far above VWAP, heavily bullish candles). High risk of a blow-off top reversal.
> +20 (Orange): Standard Euphoria/Strong Uptrend.
Between -20 and +20 (Gray): Neutral market.
< -20 (Teal): Standard Panic/Strong Downtrend.
< -50 (Green): Extreme Panic. The market is oversold, stretched far below VWAP, and showing heavy bearish momentum. High probability of a capitulation bottom bounce.
The script also includes built-in alert conditions (Extreme Euphoria Alert and Extreme Panic Alert) so you can automate notifications when the market reaches these psychological extremes! Indicator

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

Kinetic Slippage Index (KSI)Overview
The Kinetic Slippage Index (KSI) is an advanced volume-volatility oscillator designed to measure market efficiency—or the lack thereof. Inspired by order book microstructure and liquidity gaps, KSI calculates the "cost of price movement." It helps traders identify hidden institutional distribution, retail exhaustion, and high-probability false breakouts.
Unlike standard momentum oscillators (RSI, Stochastic) that only track price speed, KSI analyzes how much raw volume was required to achieve a specific price range.
The Theoretical Concept
In a highly liquid and efficient market, large trading volumes are absorbed by dense limit orders, causing the price to move smoothly and tightly.
However, when liquidity clears out (an "empty order book" or "liquidity vacuum"), even a small market order can cause a massive price jump. This phenomenon is called slippage.
KSI mathematically captures this by squaring the True Range and dividing it by the current Volume and its long-term EMA.
- High KSI: Price is flying or dropping fast, but on critically low volume. The market is "hollow."
- Low KSI: Enormous volume is pouring in, but the price is compressed into tight bars. Heavy institutional absorption is taking place.
How to Trade with KSI (Key Use Cases)
1. Fading False Breakouts (The "SPIKE" Signal)
- Scenario: The price breaks out of a key resistance or support level, creating a new local high/low.
- KSI Behavior: A purple "SPIKE" marker appears, meaning KSI has crossed above the critical threshold.
- Interpretation: The breakout is happening on a "hollow" market without institutional backing. It is highly likely a liquidity hunt (stop-run).
- Strategy: Look for a reversal pattern on the price chart and trade against the breakout (Fade).
2. Trend Exhaustion & Climax
- Scenario: The asset is in a strong, prolonged trend. Suddenly, a massive price bar occurs in the direction of the trend.
- KSI Behavior: KSI prints a series of extreme high histogram bars or triggers a "SPIKE" alert.
- Interpretation: This is a buying/selling climax (exhaustion). Smart money is withdrawing their limit orders, letting late retail buyers push the price into a vacuum right before the crash.
- Strategy: Tighten trailing stops on current positions or prepare for a counter-trend setup.
3. Institutional Accumulation / Compression
- Scenario: Price enters a tight, boring consolidation (flat).
- KSI Behavior: The histogram bars turn red and get tightly compressed near the zero line, staying significantly below the orange Signal Line.
- Interpretation: Huge trading volume is being injected, but the price isn't moving. Big players are quietly accumulating or distributing positions using iceberg orders.
- Strategy: Do not trade inside this zone. Prepare for a massive, explosive breakout. Wait for the KSI histogram to flip green and cross above the Signal Line to confirm the direction.
Inputs & Customization
- ATR / Range Period (Default: 14): Controls the lookback window for measuring the price range.
- Volume EMA Period (Default: 20): Smooths out volume to create a reliable benchmark for average liquidity.
- Signal Line Period (Default: 9): An EMA of the KSI itself, used to detect shorter-term shifts in momentum (Green/Red histogram flips).
- Spike Signal Level (Default: 50000): Critical value line for alerts.
Indicator

RX: Dual RSI Fusion 14/50 Compression Framework## RX: Dual RSI Fusion 14/50 Compression Framework
Is an advanced momentum framework designed to identify potential market exhaustion, compression phases, and high-probability reversal conditions by combining two Relative Strength Index structures into a single analytical model.
Unlike traditional RSI indicators that rely on a single momentum source, this framework integrates both a fast RSI (14-period by default) and a slow RSI (50-period by default) to provide a multi-layer view of market behavior.
### Core Concepts
• **Fast RSI (14):** Captures immediate momentum shifts, short-term exhaustion, and early divergence signals.
• **Slow RSI (50):** Represents the underlying market structure and helps identify broader momentum regimes.
• **Dynamic Compression Engine:** Measures the convergence between moving averages applied to the fast RSI, highlighting periods where momentum becomes increasingly compressed and potentially preparing for expansion.
• **Exhaustion Detection:** The indicator is specifically designed to monitor the sequence of events frequently observed near market turning points, including divergence development, momentum contraction, and structural breakout.
### Features
✔ Dual RSI architecture (Fast + Slow)
✔ Configurable moving averages applied directly to RSI values
✔ Compression detection between fast RSI moving averages
✔ Divergence memory engine with customizable validity period
✔ Momentum Delta histogram (Fast RSI - Slow RSI)
✔ Structural breakout detection from RSI compression zones
✔ Background state visualization for market context
✔ Alert conditions for potential exhaustion breakouts
### Interpretation
The framework is based on the premise that important market reversals are rarely caused by a single event. Instead, reversals often emerge from a succession of conditions:
1. Momentum divergence appears.
2. RSI structure begins to compress.
3. Market enters an exhaustion phase.
4. Fast momentum escapes the compression structure.
5. Expansion begins.
The indicator seeks to visualize this process and provide objective confirmation of potential exhaustion scenarios.
### Notes
This tool should not be interpreted as a standalone buy or sell system. It is intended to be used as a market structure and momentum exhaustion framework, ideally combined with price action, liquidity analysis, volume, or higher timeframe context.
Developed as part of the SXA analytical ecosystem by @Peter_n_n
Indicator

Indicator

Exogenous Heatmap [invincible3]Exogenous Heatmap
The Exogenous Heatmap is a multi-country macro and market-performance dashboard designed to help traders and investors monitor external economic forces that may influence currencies, equities, commodities, and broader risk sentiment.
Instead of focusing only on price action from the current chart, this indicator visualizes key exogenous variables across major economies in a clean historical heatmap format. Users can compare countries by interest rates, GDP growth, balance of trade, foreign exchange reserves, and major stock index performance.
The indicator supports two calculation modes:
1. Raw Value
Displays the actual macroeconomic value or stock index performance for each country.
2. Differential vs Base
Compares each country against a selected base country. This is useful for identifying relative macro strength or weakness. For example, if the base country is set to the USA, the indicator shows how Australia, Japan, the UK, Europe, China, and other countries compare against the United States.
The heatmap includes the following datasets:
Interest Rates and Differentials
Displays policy interest rates or interest-rate differentials between countries. This is especially useful for forex analysis because higher relative interest rates can influence capital flows and currency strength.
GDP and Differentials
Displays GDP year-over-year growth or GDP growth differentials. This helps identify which economies are expanding faster or slower relative to the selected base country.
Balance of Trade and Differentials
Displays trade balance data. A stronger trade surplus may indicate external demand strength, while a deficit may reflect import pressure or weaker export competitiveness.
Reserves and Differentials
Displays foreign exchange reserve levels. This can help assess external liquidity strength and a country’s ability to manage currency or balance-of-payment stress.
Stock Index Performance and Differentials
Displays the performance of major stock indexes from leading economies. This adds a global risk-on/risk-off component to the indicator. Strong equity index performance may reflect improving investor sentiment, while weak performance may signal risk aversion.
The default stock index symbols include:
Australia: ASX 200
Canada: TSX Composite
China: Shanghai Composite
Europe: Euro Stoxx 50
Japan: Nikkei 225
New Zealand: NZX 50
Switzerland: SMI
United Kingdom: FTSE 100
United States: S&P 500
Users can manually change these symbols from the settings panel if they prefer alternative benchmarks.
Example 1: Interest Rate Differential
Suppose the selected dataset is Interest Rates and Differentials and the base country is set to USA .
If:
USA interest rate = 5.50%
Japan interest rate = 0.50%
Then Japan’s differential versus the USA is:
0.50% - 5.50% = -5.00 pp
This means Japan’s policy rate is 5.00 percentage points lower than the USA. In the heatmap, this would appear as a negative differential and would be colored toward the negative side of the gradient.
Example 2: Stock Index Performance Differential
Suppose the selected dataset is Stock Index Performance and Differentials and the timeframe is set to Monthly .
If:
USA S&P 500 monthly return = +4.20%
Japan Nikkei 225 monthly return = +2.10%
Then Japan’s stock index performance differential versus the USA is:
2.10% - 4.20% = -2.10 pp
This means Japan’s equity market underperformed the USA by 2.10 percentage points during that monthly period.
Example 3: Raw Stock Index Performance
If the calculation mode is set to Raw Value , the indicator displays each country’s own index return for the selected period.
For example:
USA: +4.20%
Japan: +2.10%
UK: -1.30%
Europe: +0.80%
This allows users to quickly identify which regions are leading or lagging in global equity performance.
Color Interpretation
Positive values are shown using the positive color gradient.
Negative values are shown using the negative color gradient.
Neutral or near-zero values are shown near the neutral color.
The indicator includes both automatic and manual color scaling. Auto Scale adjusts the heatmap based on the strongest visible value, while Manual Scale lets the user set a fixed range for more consistent comparisons.
How Traders Can Use It
Forex traders can use interest-rate and GDP differentials to evaluate relative currency strength.
Macro traders can use trade balance and reserve data to identify external economic pressure or resilience.
Equity and index traders can use global stock index performance to track international risk sentiment.
Commodity traders can use the dashboard as a macro backdrop because global growth, rates, and risk appetite often influence commodity demand and capital flows.
Important Notes
For percentage-based datasets such as interest rates, GDP growth, and stock index returns, differential values are displayed in percentage points, abbreviated as “pp.”
For balance of trade and reserves, raw values may often be more meaningful than differentials because countries may report values in different scales or currencies.
This indicator is designed as a macro and risk-sentiment visualization tool. It should be used together with technical analysis, fundamental analysis, and proper risk management.
Indicator

Indicator

Artemis Wave Oscillator🟦 Artemis Wave Oscillator is a Pine v6 reimagination of the classical WaveTrend family, built on a Welford running-stdev channel and EMA-smoothed normalization. Unlike fixed-band WaveTrend variants that ship with hard-coded levels, the engine continuously rescales itself against its own dispersion — producing a momentum curve that stays perfectly bounded between visually consistent reversion bands on every asset and every timeframe, with no manual recalibration.
The indicator integrates six analytical layers — WaveTrend core, dynamic reversion bands, histogram momentum gauge, extremity reversion dots, regular + hidden divergence detection with a Smart AI Filter, and a theme-adaptive PRO dashboard — each operating independently and rendered on a single, clean oscillator panel.
🟦 HOW THE CORE ENGINE WORKS
**WaveTrend Channel**
Each bar, the engine builds an EMA-smoothed midline from the selected price aggregate over the Channel Length window. In parallel, a Welford single-pass running standard deviation measures the channel width — a numerically stable O(N) algorithm that updates the running mean and squared deviation simultaneously, preserving precision on long histories where naive sum-of-squares accumulators drift.
The raw wave is then computed as:
wave_raw = (src − chanMid) / chanDev × 100
This produces a z-score-like signal scaled to the ±100 range. Dividing by the running standard deviation normalizes the output regardless of asset volatility — BTC, EURUSD, SPY, and a small-cap stock all swing through the same band structure without parameter changes.
**EMA Smoothing**
The raw wave is then passed through an EMA of length Average Length to produce the visible `wave` line. This is the dominant responsiveness control — larger values produce a calmer curve with fewer reversion-zone touches.
**Signal Line**
An SMA of the wave (Signal Length) builds the trigger line. Crossovers between the wave and signal line mark momentum regime changes — the same convention used by classical MACD and Stochastic.
**Histogram**
The wave − signal delta is rendered as a filled area. Two opacity tiers distinguish rising momentum (brighter) from fading momentum (dimmer), so the eye picks up acceleration vs. deceleration at a glance.
**Source Selector**
Nine price aggregates are available:
| Source | Formula | Use case |
|---|---|---|
| Open | open | Open-of-bar bias |
| High | high | Top-of-range tracking |
| Low | low | Bottom-of-range tracking |
| Close | close | Standard, fastest reaction |
| OC2 | (open + close) / 2 | Body midpoint |
| HL2 | (high + low) / 2 | Body-independent midpoint |
| HLC3 | (high + low + close) / 3 | Typical mean — default |
| OHLC4 | (open + high + low + close) / 4 | Smoothest |
| HLCC4 | (high + low + 2×close) / 4 | Close-weighted |
🟦 REVERSION BANDS
The user picks a single Reversion Threshold (T) — the distance from zero (in normalized wave units) beyond which the wave is considered overbought (positive side) or oversold (negative side). Three proportional tiers render automatically:
| Tier | Level | Visual |
|---|---|---|
| Inner | ±T | Outer ring of the gradient fill |
| Middle | ±T × 1.25 | Boundary between outer ring and inner extreme |
| Outer | ±T × 1.5 | Hard outer boundary of the gradient fill |
Because the bands are derived from T, they always wrap the threshold no matter how the user tunes it. A trader scaling T from 80 (volatile assets) to 150 (trending assets) keeps the visual context intact without retuning the band levels.
The Reversion Threshold itself drives three downstream features:
- Extremity Dot triggers
- The "Extremities" bar-coloring mode
- The Dashboard Zone tag (OB / MID / OS)
🟦 EXTREMITY DOTS
OB / OS reversion markers — small dual-layer dots that fire when the wave crosses the signal line beyond the Reversion Threshold:
- **OS dot** (bull theme color) → wave crossed UP past −T
- **OB dot** (bear theme color) → wave crossed DOWN past +T
These are the highest-conviction mean-reversion triggers in the script. The dots use a two-track rendering — a pixel-perfect glow + core visual via `plot.style_circles`, paired with an invisible `label.style_circle` carrying a rich tooltip. Hovering on a dot surfaces:
- Direction (Crossed UP / DOWN through Signal)
- Active zone (Below −T / Above +T)
- Current wave value
- Current signal value
- Trading interpretation (mean-reversion long / short opportunity)
🟦 DIVERGENCE DETECTION
Pivots are calculated using `ta.pivothigh` and `ta.pivotlow` with an arm of `Channel Length / 2`. All divergence results appear `Channel Length / 2` bars late — this is standard Pine Script pivot behavior, not a bug.
**Four divergence types:**
| Type | Price | Wave | Signal |
|---|---|---|---|
| Regular Bull (D▲) | Lower Low | Higher Low | Potential reversal up |
| Regular Bear (D▼) | Higher High | Lower High | Potential reversal down |
| Hidden Bull (H▲) | Higher Low | Lower Low | Uptrend continuation |
| Hidden Bear (H▼) | Lower High | Higher High | Downtrend continuation |
Regular divergence uses solid lines (width 2). Hidden divergence uses dashed lines (width 1) — the thinner, dashed style makes the continuation signal visually quieter than the reversal signal, matching their respective conviction tiers. Labels use bracketed symbols (D▲ / D▼ / H▲ / H▼) and each carries a tooltip-rich hover with price + wave context.
**Smart Divergence Filter (AI)**
An optional pre-filter that rejects low-quality divergences before they render. Three independent gates:
1. **Min Wave Swing** — minimum oscillator swing between the two pivots (default: 5 units). Drops noise-level differences where the wave barely moved between pivots.
2. **Min Price Swing (%)** — minimum price swing between pivots as a percentage of the recent `Channel Length × 4` high-low range (default: 0.3%). Drops divergences where price barely moved relative to recent volatility.
3. **Zone Confirmation** — the wave at the current pivot must sit in the matching reversion half:
- Bullish divergence → wave at LL pivot ≤ −T × 0.5 (oversold half)
- Bearish divergence → wave at HH pivot ≥ +T × 0.5 (overbought half)
This encodes the classical "best divergences form at extremes" rule using the wave value itself as the gate — no MFI or volume input required.
When the master toggle is OFF (default), all detected divergences render. When ON, only divergences that clear all three gates survive. The filter applies identically to both chart rendering and alert conditions — no mismatch between visual and alert signals.
🟦 HISTOGRAM
The wave − signal histogram is rendered as a filled area between the histogram value and the zero line. Two opacity tiers per side:
| State | Color | Opacity |
|---|---|---|
| Bull, rising | thBull | Rising Opacity (default 60) |
| Bull, fading | thBull | Fading Opacity (default 40) |
| Bear, rising | thBear | Rising Opacity (default 60) |
| Bear, fading | thBear | Fading Opacity (default 40) |
Rising bars are the most actionable visual cue — they mark momentum that is accelerating in the active direction. Fading bars indicate momentum stalling.
🟦 BAR COLORING
Five mutually exclusive modes apply a wave-driven color to every price bar on the chart:
| Mode | Behavior |
|---|---|
| None | Leave bars untouched (default) |
| Midline Cross | Bull above zero, bear below zero |
| Extremities | Bull beyond +T, bear beyond −T, neutral elsewhere |
| Reversions | Bull on OS dot trigger, bear on OB dot trigger |
| Slope | Bull when wave > signal, bear when wave < signal |
Colors are pulled from the active theme — no per-mode color picker needed.
🟦 DASHBOARD
A compact 2-column, 7-row data panel renders on the last bar when enabled. Every value derives from variables already computed upstream, so the dashboard adds zero overhead until the final bar.
| Row | Left | Right |
|---|---|---|
| Header | Artemis Wave | ▲ BULL / ▼ BEAR / ■ NEUTRAL |
| Wave | Wave | Current value + trend arrow (▲ ▼ ■) |
| Signal | Signal | Current SMA trigger value |
| Strength | Strength | 10-block monospace bar gauge |
| Zone | Zone | OB / MID / OS tag |
| Div | Div | Most recent divergence within last 50 bars (▲ REG / ▼ REG / ▲ HID / ▼ HID / —) |
| Slope | Slope | ▲ UP / ▼ DOWN / ■ FLAT |
The strength gauge normalizes `|wave − signal|` against 50 (typical mid-amplitude swing) and buckets the result into 10 monospace blocks (`█` filled, `░` empty), giving an at-a-glance read of crossover conviction.
**Theme-Adaptive Chrome**
The dashboard auto-inverts its layout based on the active theme:
- **Dark themes** (Tropic, Amber, Pastel, Cyber, Helios, Electric, Candy, Bloomberg, Solar, Royal): header and footer use a faint `thBull` tint, middle rows stay solid dark, text uses full-saturation `thBull`. Border uses `thBull` at 20% transparency for strong theme presence.
- **Light themes** (Midnight, Graphite): backgrounds flip to white, text stays `thBull` (which is itself dark on these themes), border uses `thBull` at 40% transparency.
This guarantees text legibility against every palette without per-theme manual tuning.
**Position & Size**
Six anchor slots (Top/Middle/Bottom × Left/Right) and four text sizes (Tiny / Small / Normal / Large).
🟦 COLOR THEMES
Twelve cohesive palettes, each resolving to four axis colors:
| Theme | Character | Bull | Bear |
|---|---|---|---|
| Tropic | Cyan steel + deep orange | #00bcd4 | #ff6d00 |
| Amber | Warm amber + indigo blue | #ff9800 | #e53935 |
| Pastel | Sky blue + soft lavender | #4fc3f7 | #9575cd |
| Cyber | Neon lime + hot crimson | #00e676 | #ff1744 |
| Helios | Bright gold + scarlet | #ffd600 | #ef5350 |
| Electric | Electric aqua + magenta | #00e5ff | #e040fb |
| Candy | Neon green + hot pink | #69F0AE | #FF4081 |
| Bloomberg | Terminal orange + cyan | #ff8c00 | #00b0ff |
| Solar | Solarized olive + crimson | #859900 | #dc322f |
| Royal | Imperial gold + deep purple | #ffd700 | #6a0dad |
| Midnight | Deep navy + dark crimson | #0d47a1 | #b71c1c |
| Graphite | Near-black + silver grey | #1a1a1a | #757575 |
All four color roles (bull / bear / neutral / signal) change simultaneously when the theme changes. The whole script reads through these four variables — nothing below the resolver references a raw hex literal, so a single dropdown selection drives every plot, fill, dot, divergence line, dashboard cell and border.
🟦 ALERT SYSTEM
Ten alert conditions, all using `alert.freq_once_per_bar_close`:
| Alert | Condition |
|---|---|
| OS Reversion | Wave crossed UP through signal while wave < −T |
| OB Reversion | Wave crossed DOWN through signal while wave > +T |
| Regular Divergence | D▲ or D▼ detected (respects Smart Filter) |
| Hidden Divergence | H▲ or H▼ detected (respects Smart Filter) |
| Bullish Trend | Wave crossed above the midline (zero) |
| Bearish Trend | Wave crossed below the midline (zero) |
| Bullish Swing | Wave × signal upward cross, regardless of zone |
| Bearish Swing | Wave × signal downward cross, regardless of zone |
Each alert fires through `alert()` so the message body carries live context — direction, current wave value, and the threshold that triggered. Divergence alerts respect the Smart Divergence Filter — if the filter is ON and a divergence is rejected visually, the alert will also not fire.
🟦 SETTINGS REFERENCE
**WaveTrend Core**
- Source — 9 price aggregates. Default: HLC3
- Channel Length — EMA midline + Welford stdev lookback. Default: 10
- Average Length — EMA smoothing of the normalized wave. Default: 21
- Signal Length — SMA smoothing of the wave to build the trigger. Default: 4
**Reversion Bands**
- Reversion Threshold — 50–200, step 5. Default: 100
- Show Band Fills — Toggle. Default: ON
- Band Opacity — 0–100. Default: 30
**Histogram**
- Show Histogram — Toggle. Default: ON
- Rising Opacity — Default: 60
- Fading Opacity — Default: 40
**Extremity Dots**
- Show Extremity Dots — Toggle. Default: ON
**Divergence**
- Regular Divergence — Toggle. Default: ON
- Regular Opacity — Default: 80
- Hidden Divergence — Toggle. Default: ON
- Hidden Opacity — Default: 80
- Label Size — Tiny / Small / Normal / Large. Default: Tiny
- Smart Divergence Filter (AI) — Master toggle. Default: OFF
- Min Wave Swing — Default: 5.0
- Min Price Swing (%) — Default: 0.3%
- Require Zone Confirmation — Default: ON
**Bar Coloring**
- Bar Color Mode — None / Midline Cross / Extremities / Reversions / Slope. Default: None
**Dashboard**
- Show Dashboard — Toggle. Default: ON
- Panel Position — 6 anchor slots. Default: Middle Right
- Panel Text Size — Tiny / Small / Normal / Large. Default: Small
**Alerts**
- OS Reversion — Default: ON
- OB Reversion — Default: ON
- Regular Divergence — Default: ON
- Hidden Divergence — Default: OFF
- Bullish Trend — Default: ON
- Bearish Trend — Default: ON
- Bullish Swing — Default: OFF
- Bearish Swing — Default: OFF
🟦 COMPATIBILITY
Works on all asset classes and all timeframes in PulseWire Pine Script v6.
- Crypto: Spot, futures, perpetual contracts
- Forex: All pairs
- Equities: Stocks, ETFs, indices
- Commodities: Metals, energy, agriculture
- Timeframes: 1m through Monthly
The Welford running standard deviation normalizes the wave against its own dispersion, making the engine fully volatility-agnostic. The same default settings work on a 5-second BTC chart and a weekly index chart without retuning.
🟦 TECHNICAL NOTES
- Pine Script v6
- `max_lines_count = 500`, `max_labels_count = 500` (divergence drawings + extremity dot hover labels)
- No repainting — all values calculated on bar close. Pivot-based divergence results appear `Channel Length / 2` bars late by design
- WaveTrend engine intentionally mirrors EliCobra's original Enhanced WaveTrend formulation — the value added by Artemis Wave is in the Pine v6 idioms, the dynamic band scaling, the divergence engine, the Smart Filter, the theme system, and the dashboard, not in altering the well-tested core curve
- UDT fields declared without defaults to comply with Pine v6's compile-time-literal requirement; objects constructed via `Bar.new(...)` and `WaveReading.new(...)`
- `var int x = int(na)` pattern used for safe persistent integer state (pivot bar indices)
- Reversion-band anchors rendered as hidden `plot()`s rather than `hline()`s — `hline()` only accepts compile-time constants, but the band levels are series values driven by the user-tunable Reversion Threshold
- Extremity Dots use a dual-track rendering: `plot.style_circles` for the pixel-perfect visual, plus a parallel invisible `label.style_circle` carrying the hover tooltip (since `plot()` does not support the `tooltip` argument)
🟦 DISCLAIMER
This indicator is provided for educational and informational purposes only. It does not constitute financial advice. Past performance does not guarantee future results. Always conduct your own analysis and apply proper risk management. Indicator

AlphaTrend Momentum Matrix [MarkitTick]💡 The AlphaTrend Momentum Matrix is an advanced, comprehensive trend-following architecture designed to dynamically track market momentum, manage dynamic trade states, and seamlessly bridge the gap between technical charting and automated execution. Far from a simple overlay, this script acts as a multi-layered analytical suite. It evaluates primary trend direction using volatility and volume-weighted money flow, filters out market noise with a custom state-matrix, and projects actionable higher-timeframe data onto the active chart. Furthermore, it incorporates an internal mathematical framework capable of dynamically calculating strict risk-to-reward targets and dispatching meticulously formatted JSON payloads for external webhook execution.
✨ Originality and Utility
● The Momentum Matrix Advantage
While traditional trend indicators rigidly lock onto moving averages or standard price bands, the AlphaTrend Momentum Matrix thrives on market dynamism. Its true utility lies in its multifaceted approach to trend validation. It introduces an exclusive "ATR Breakout Override" system—a custom logic module that forces a trend recalibration if an explosive price movement severely disrupts the standard deviation envelope, regardless of standard trailing conditions. This ensures the indicator remains highly responsive to sudden, high-impact market events without waiting for lagging conditions to catch up.
● Automated Payload and State Management
A standout feature of this tool is its embedded Trade State system. It does not merely paint a signal on the chart; it internalizes the exact entry price, computes a precise stop-loss based on the active AlphaTrend baseline, and mathematically projects a 1:2 risk-to-reward Take Profit target. This localized tracking seamlessly interfaces with the built-in Alert Engine, dynamically injecting these critical metrics into formatted JSON templates ready for third-party automated execution systems.
🔬 Methodology and Concepts
● AlphaTrend Core Engine
The primary directional engine relies on the interplay between the Average True Range (ATR) and the Money Flow Index (MFI). A trailing upper band (Support) and lower band (Resistance) are calculated using a user-defined ATR coefficient. The script interrogates the 14-period MFI; if the MFI reads above 50, indicating positive money flow momentum, the algorithm biases toward the Support band, updating it only when the price makes higher lows. Conversely, an MFI below 50 shifts the bias to the Resistance band.
● Breakout Override Protocol
To counteract the inherent lag of volume-weighted smoothing, the indicator employs a momentum breakout scanner. By measuring the absolute distance between the previous two closing prices and comparing it against the prior ATR multiplied by a sensitivity factor, the script can definitively detect volatility shocks. If a shock occurs concurrently with a directional price cross over the active AlphaTrend line, the system immediately forces a directional shift, bypassing the standard MFI requirements.
● Signal Filtering and Matrix Constraints
Raw signal crossovers are notoriously noisy during consolidation. To mitigate whipsaw trades, this script implements a continuous loop counter (the K and O matrices). It tracks the consecutive bars since the last primary buy or sell condition. A signal is only declared "valid" if it successfully breaks the historical sequence of the opposing trend counter, ensuring that localized micro-fluctuations do not trigger premature trade entries.
🔍 Deconstruction of the Underlying Scientific and Academic Framework
● Volatility and the Average True Range
Developed by J. Welles Wilder Jr. in 1978, the Average True Range is a foundational pillar of this indicator. The ATR scientifically quantifies absolute market volatility by decomposing the entire range of an asset's periodic price action, factoring in gaps and limit moves. By applying a multiplier to the ATR, this script establishes a statistically significant standard deviation envelope, distinguishing between normal market "breathing" and definitive structural shifts.
● Volume-Weighted Momentum via Money Flow Index
The MFI, created by Gene Quigley and Colin Dysart, represents an evolution of the Relative Strength Index (RSI). From an academic standpoint, the MFI incorporates volume into its momentum calculation, producing a more robust metric of buying and selling pressure. It uses the Typical Price (High + Low + Close / 3) multiplied by volume to calculate raw money flow. The 50-level threshold serves as the equilibrium point; sustaining above this level empirically signifies net accumulation, providing the mathematical justification for the indicator's bullish bias.
● Algorithmic State Machines
The signal filtering mechanism and the internal Trade State tracker are practical applications of Finite State Machines (FSM) commonly used in quantitative algorithmic design. The script holds memory of its current operational state (Long, Short, Neutral) and refuses state transitions unless specifically validated mathematical conditions (boolean logic gates) are met, significantly reducing error rates inherent in purely reactive, memory-less indicators.
● Repainting and Lookahead Warning
This script utilizes the request component to pull Higher Timeframe (HTF) context into the primary chart. Crucially, it employs the barmerge.lookahead_on parameter. While this creates a visually perfect, non-lagging representation of higher timeframe trends when analyzing historical data, it introduces lookahead bias. Traders must understand that historical HTF visuals and signals may appear with perfect precision on past bars, but real-time execution will lack this future data context, potentially resulting in different localized behavior in live markets.
🎨 Visual Guide
● The AlphaTrend Trailing Line
Up Trend (Bullish): A bold, solid step-line tracking below the price, rendered in a distinctive golden-yellow (#F0D080).
Down Trend (Bearish): A bold, solid step-line tracking above the price, colored in a deep crimson (#7A2010).
● The Cloud Fill
Dynamic Channel: A semi-transparent shaded area connecting the active AlphaTrend line to a central Cloud Reference Line (a smoothing of the typical price). This cloud visually represents the buffer zone of the current trend.
Color Coding: The cloud dynamically changes color to match the dominant trend (Gold for bullish, Crimson for bearish), allowing for rapid peripheral analysis of market conditions.
● Price Action Overrides
Colored Candles: The bodies and wicks of the actual price candles are uniformly colored to reflect the AlphaTrend matrix state, instantly identifying periods of alignment or divergence.
● Execution Elements
Signal Labels: Distinct "BUY" and "SELL" textual shapes appear precisely on the chart at the moment the state matrix validates a trend shift.
HTF Stepline: When enabled, a secondary, smoothed step-line appears to show the overarching macro trend, colored accordingly to dictate the broader market regime.
📖 How to Use
● Trend Riding and Context
The most effective way to utilize this tool is to align the primary chart timeframe with the HTF AlphaTrend line. If the HTF line is Gold, you should strictly look for "BUY" signals generated by the primary indicator to trade in the direction of the macro trend, ignoring temporary bearish signals as minor pullbacks.
● Momentum Breakout Confirmation
When you observe a sudden color change accompanied by an unusually large price bar, this is often the Breakout Override triggering. These scenarios represent high-momentum events. Instead of waiting for a retest, aggressive traders may use these specific signals to capture immediate volatility expansions, placing their stop-loss strictly on the opposite side of the newly formed AlphaTrend line.
● Automating Your Strategy
For quantitative traders, the indicator handles the heavy lifting of trade logic. Ensure you configure the exact JSON payload strings required by your third-party execution platform (like 3Commas, PineConnector, etc.) in the settings. The indicator will autonomously calculate your risk/reward parameters upon every valid signal and fire a perfectly formatted JSON alert.
⚙️ Inputs and Settings
• ⚙️ Core Calculations
ATR Multiplier: Defines the sensitivity of the trailing line. Lower values (e.g., 0.5) track price closely for scalping; higher values (e.g., 2.0) provide wide breathing room for swing trades.
ATR & MFI Lookback Period: The standard window (default 14) for calculating both volatility and volume momentum.
Display Signals: Toggles the visibility of the "BUY" and "SELL" chart labels.
• 🛡️ Breakout Override
Enable ATR Breakout Override: Turns the momentum-shock detection system on or off.
Breakout Sensitivity: Determines how large a price jump must be (relative to the ATR) to force a trend change. Lower values trigger more aggressively.
• 🕐 Higher Timeframe
Show HTF AlphaTrend: Projects the higher timeframe data onto the current chart.
HTF Timeframe: The specific macro timeframe to monitor (e.g., Daily "D" when trading on the 1-Hour chart).
• ☁️ Cloud Fill
Show Cloud Fill: Toggles the visual buffer zone on the chart.
Cloud Reference Length: Adjusts the smoothing period of the central reference line.
Color Candles: Enables or disables the overriding of standard chart candle colors based on trend direction.
• 🔌 Webhook Execution Config
Payload Actions: Four distinct text fields where you can define the exact syntax your external bot requires for entering longs, entering shorts, closing longs, and closing shorts. These values are automatically injected into the dynamic JSON alert string.
⚠️ Disclaimer
All provided scripts and indicators are strictly for educational exploration and must not be interpreted as financial advice or a recommendation to execute trades. I expressly disclaim all liability for any financial losses or damages that may result, directly or indirectly, from the reliance on or application of these tools. Market participation carries inherent risk where past performance never guarantees future returns, leaving all investment decisions and due diligence solely at your own discretion. Indicator

Indicator

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

Elaris RSI Pro [Divergence]Elaris RSI Pro is a professional-grade RSI momentum and divergence indicator built for traders who want cleaner market structure signals, smarter divergence detection, and a more refined trading workflow.
The indicator combines a responsive RSI engine with advanced bullish and bearish divergence detection to help identify potential reversals, continuation setups, and momentum shifts across all market conditions.
Designed with a clean visual experience and optimized performance in mind, Elaris RSI Pro delivers clear signals without unnecessary chart clutter, making it suitable for scalpers, swing traders, and intraday traders alike.
Key Features:
• Regular Bullish & Bearish Divergence Detection
• Hidden Bullish & Bearish Divergence Detection
• Configurable Pivot Detection Engine
• Adjustable Minimum & Maximum Pivot Distance Filters
• Dynamic RSI Momentum Coloring
• Signal Smoothing with EMA Filter
• Overbought / Oversold Zone Visualization
• Optional Divergence Lines & Labels
• Optional Pivot Markers for Advanced Analysis
• Professional Alert Conditions
• Non-Repainting Confirmed Pivot Logic
• Optimized Object Management for Better Performance
Elaris RSI Pro is built using confirmed pivot logic, meaning divergence signals are generated only after pivot confirmation to reduce repainting behavior and improve signal reliability.
The indicator is highly customizable, allowing traders to adapt the sensitivity and visual behavior to different trading styles, markets, and timeframes.
Works well with:
• Market Structure Analysis
• Trend Following Systems
• Support & Resistance Trading
• Smart Money Concepts (SMC)
• Liquidity Sweep Confirmation
• Multi-Timeframe Confluence Strategies
Best used alongside proper risk management and confirmation tools.
Non-Repainting:
This indicator uses confirmed pivot-based calculations. Signals appear only after pivot confirmation and do not repaint historically after confirmation. Indicator

Indicator

Macro Risk Proxy Switchboard [AGPro Series]Macro Risk Proxy Switchboard
🧠 Core Idea
Are macro risk proxies supporting risk appetite, warning of defense, or sending a mixed signal?
📌 Overview / What it does
Macro Risk Proxy Switchboard is a macro context tool that compares multiple external risk proxies and converts them into a clean risk-on / risk-off switchboard.
The script uses configurable proxy symbols such as dollar pressure, yield pressure, volatility pressure, and credit appetite. It normalizes their recent movement, evaluates agreement, detects shock or divergence behavior, and displays the current macro regime directly on the chart.
It produces a macro risk rail, compact alignment labels, right-side regime tags, and a structured AG Pro panel. It does not predict price direction, automate decisions, or claim that macro proxies must control the chart.
🎯 Purpose & Design Philosophy
This script was built to solve a common context problem: traders often watch several macro proxies, but the information is scattered across different charts.
Macro Risk Proxy Switchboard compresses that context into one visual layer. It helps traders understand whether external risk conditions are supportive, defensive, mixed, or shocked.
The mindset is simple: price action matters first, but macro pressure can change the quality of breakouts, pullbacks, risk appetite, and continuation attempts.
⚡ Why This Script Is Different
Most tools focus only on the charted symbol.
This script does NOT treat macro data as a prediction engine.
Instead, it reads a configurable basket of risk proxies and asks whether those proxies agree, diverge, or create an external pressure warning.
The result is not a buy or sell signal. It is a compact macro context layer designed to improve situational awareness.
⚙️ Methodology
1. Proxy Selection
The script reads four configurable proxies: dollar pressure, yield pressure, volatility pressure, and credit appetite.
2. Proxy Normalization
Each proxy is measured by recent momentum and normalized against its own historical behavior so the readings can be compared.
3. Composite Evaluation
The script combines proxy pressure into a composite risk score and measures how many proxies agree with the current regime.
4. Visual Output
The output is displayed through a macro risk rail, event labels, right-side regime tags, and a clean AG Pro panel.
🗺️ How to Read the Chart
The macro rail represents the current external risk context.
Labels show important macro events such as risk-on alignment, risk-off alignment, proxy shock, or macro divergence.
Colors separate supportive, defensive, neutral, and shock-style behavior.
The panel shows macro regime, risk direction, composite pressure, agreement count, dominant proxy, individual proxy pressure, credit pressure, quality score, and next context.
🚦 Signals & States
• RISK-ON ALIGN → macro proxies are broadly supportive of risk appetite
• RISK-OFF ALIGN → macro proxies are broadly defensive or risk restrictive
• MIXED PROXIES → proxy agreement is weak or divided
• PROXY SHOCK → at least one proxy shows unusually strong pressure
• NEUTRAL BOARD → no clear macro tilt is active
🔔 Alerts Logic
Alerts trigger when the script detects risk-on alignment, risk-off alignment, proxy shock, or macro proxy divergence.
These alerts are attention markers only. They highlight a change in macro context, not a trading instruction.
🧩 Confluence Logic
The strongest macro context appears when multiple proxies point in the same direction and the composite score is strong.
When price structure, market trend, and macro proxy alignment agree, the context becomes more coherent.
When price action and macro pressure disagree, the chart should be interpreted with more caution.
📊 When to Use
• Crypto risk-on / risk-off evaluation
• Equity index context
• Breakout quality review
• Pullback environment analysis
• Volatility expansion periods
• Comparing price behavior against external macro pressure
⚠️ When NOT to Use
• When proxy symbols are unavailable on the selected PulseWire data plan
• During market holidays where proxy data may be stale
• On very low-liquidity symbols where local behavior dominates
• When using macro context as a standalone trade trigger
• When ignoring the chart’s own structure, liquidity, and volatility
🎛️ Key Inputs
• Dollar Pressure Proxy → default DXY-style risk pressure input
• Yield Pressure Proxy → default 10-year yield-style pressure input
• Volatility Proxy → default VIX-style defensive pressure input
• Credit Appetite Proxy → default HYG-style risk appetite input
• Proxy Momentum Length → controls how recent proxy movement is measured
• Proxy Rank Length → controls normalization stability
• Agreement Threshold → controls how strict risk-on/risk-off classification is
• Visual settings → control panel, rail, labels, and readability
🖥️ Interface & Visual Design
The interface is designed as a switchboard, not a traditional oscillator.
The panel carries the macro logic, while the chart displays only the most important regime rail and event labels.
This keeps the chart clean while still giving the viewer a premium first-glance macro context.
🧪 Practical Usage Workflow
1. Read the panel macro regime
2. Check risk direction and composite score
3. Review agreement count and dominant proxy
4. Compare macro rail with current price structure
5. Treat divergence or proxy shock as context requiring extra caution
🔍 Interpretation Guidelines
A risk-on reading does not guarantee upside.
A risk-off reading does not guarantee downside.
A proxy shock means external pressure is elevated and should be reviewed.
A mixed board means macro proxies are not giving a clean message.
The best use is to combine this switchboard with price action, structure, volatility, liquidity, and timeframe context.
🚫 What This Script Is NOT
This script is not a prediction engine.
It is not financial advice.
It is not an auto-trading system.
It does not provide guaranteed buy or sell signals.
It does not claim that macro proxies always lead price.
⚠️ Limitations & Transparency
Proxy symbols may behave differently across asset classes.
Some symbols may have delayed or unavailable data depending on the user’s PulseWire access.
Macro relationships can change over time.
Short-term price action can diverge from macro context for long periods.
Users should always interpret the switchboard within broader market conditions.
🧠 Market Context Notes
Macro context is most useful when it helps explain the quality of risk appetite.
Dollar pressure, yield pressure, volatility pressure, and credit appetite can all influence how traders interpret continuation, rejection, and acceptance behavior.
The script is built to simplify that context, not to replace the chart.
🧾 Use Case Examples
When price attempts a breakout while the switchboard shows risk-on alignment, the trader can evaluate whether external conditions support the move.
When price is holding support but the switchboard prints proxy shock, the trader can watch for defensive pressure.
When price trends strongly while macro proxies remain mixed, the trader can treat the move as less confirmed by external context.
🧱 System Philosophy
Macro Risk Proxy Switchboard follows the AGPro Series philosophy: clean decision-support tools that turn complex market context into readable, premium visual structure.
The script focuses on interpretation quality, not prediction claims.
🔐 Non-Promise Statement
No proxy basket can know the future.
No macro signal guarantees price direction.
This tool provides structured context only.
📉 Risk Disclosure
Trading involves risk.
Market conditions can change quickly.
All decisions remain the responsibility of the user.
This script does not provide financial advice or guaranteed trading outcomes.
📚 Educational Note
Use this script as an educational and analytical companion for studying macro pressure, risk appetite, defensive conditions, and cross-market context.
Indicator

Relative Strength Pullback Map [AGPro Series]Relative Strength Pullback Map
🧠 Core Idea
Is the pullback happening while the asset remains a relative leader against its benchmark?
📌 Overview / What it does
Relative Strength Pullback Map is a benchmark-relative price-action tool built to study whether an asset is pulling back from strength or breaking down into weakness.
The script compares the active symbol against a selected benchmark, builds a relative-strength baseline, evaluates leader status, measures pullback depth, maps a pullback pocket, marks the recovery rail, and summarizes the full context inside a compact AG Pro panel.
It does not predict future price, automate trades, or claim that every leader pullback must recover. It is a structured decision-support map for reading relative strength, benchmark leadership, pullback health, recovery readiness, and relative breakdown risk.
🎯 Purpose & Design Philosophy
Pullbacks are not all equal.
Some pullbacks happen while the asset continues to outperform its benchmark.
Other pullbacks happen because relative strength is already breaking down.
This script was built to separate those two conditions. The design goal is to help traders identify whether a pullback belongs to a still-strong relative leader or a weakening laggard.
⚡ Why This Script Is Different
Most pullback tools focus only on price.
Most relative-strength tools focus only on the ratio line.
This script does NOT treat pullback quality and relative strength as separate ideas.
Instead, it combines benchmark-relative leadership, price pullback depth, trend shelf behavior, recovery rail reclaim, and relative breakdown risk into one visual map.
The focus is not only whether price pulled back.
The focus is whether the asset remained a leader while pulling back.
⚙️ Methodology
1. Benchmark Comparison
The script compares the active symbol against a selected benchmark using a relative-strength ratio.
2. Relative Strength Baseline
The ratio is smoothed into a baseline so leadership can be evaluated against its own recent behavior.
3. Leader Status Scoring
Leader status combines relative-strength distance, relative-strength slope, and price trend structure.
4. Pullback Depth Measurement
The script measures how far price has pulled back from the recent high using ATR-normalized depth and percentage depth.
5. Pullback Pocket Mapping
The pullback pocket is mapped between the fast recovery rail and the deeper trend shelf.
6. Recovery Evaluation
The script checks whether price is reclaiming the recovery rail while relative strength remains constructive.
7. Visual Output
The chart displays the pullback pocket, recovery rail, relative-strength rail, leader/laggard labels, right-side context tags, alerts, and a compact AG Pro panel.
🗺️ How to Read the Chart
Relative Pullback Pocket = the area where a leader pullback can remain structurally constructive.
Recovery Rail = the fast trend rail used to evaluate whether price is starting to recover from the pullback.
RS LEADER tag = the active symbol is outperforming the selected benchmark with constructive relative strength.
PULLBACK tag = the current pullback depth measured in ATR.
LEADER PULLBACK = the asset remains a relative leader while pulling into a meaningful pullback area.
RS HOLD = relative strength remains constructive during the pullback.
RECOVERY READY = price reclaimed the recovery rail while relative strength remained constructive.
RS BREAK = relative strength weakened or price broke the deeper pullback shelf.
Panel = summarizes relative state, quality score, leader status, pullback depth, recovery trigger, benchmark, and next context.
🚦 Signals & States
• LEADER PULLBACK → the asset remains a relative leader while pulling back.
• RS HOLD → relative strength is still holding during the pullback.
• RECOVERY READY → price reclaimed the recovery rail with constructive relative strength.
• RS BREAK → relative strength weakened or the pullback shelf broke.
• LAGGARD RISK → price is pulling back while the asset is no longer a clear relative leader.
🔔 Alerts Logic
Alerts can trigger when a leader pullback appears, relative strength holds, recovery becomes ready, or relative breakdown appears.
These alerts are attention markers only.
They are not trade instructions, entry signals, exit signals, or guaranteed outcomes.
🧩 Confluence Logic
The context becomes stronger when the active symbol remains above its relative-strength baseline, relative-strength slope is constructive, pullback depth is meaningful but not too deep, and price starts reclaiming the recovery rail.
The context becomes weaker when relative strength drops below its baseline, the slope turns down, or price breaks below the deeper trend shelf.
📊 When to Use
• During trend pullbacks
• When comparing an asset against a benchmark
• In crypto rotation analysis
• In stock or ETF relative-strength review
• When looking for leader pullbacks rather than weak pullbacks
• When filtering pullbacks by benchmark-relative performance
⚠️ When NOT to Use
• On symbols with poor benchmark fit
• During extremely noisy sideways markets
• In low-liquidity markets with unreliable candles
• When benchmark data is missing or unsuitable
• As a standalone buy or sell system
🎛️ Key Inputs
• Benchmark Symbol → defines the market used for relative comparison.
• Relative Strength Baseline → controls the smoothing length of the RS ratio.
• RS Slope Lookback → controls how relative-strength direction is evaluated.
• Minimum Leader Score → controls how strict leader classification should be.
• Fast Trend Length → controls the recovery rail.
• Slow Trend Length → controls the deeper pullback shelf.
• Pullback Lookback → controls the recent high used to measure pullback depth.
• Maximum Healthy Pullback ATR → controls when a pullback becomes too deep.
• Label and Panel Font Size → controls chart readability.
🖥️ Interface & Visual Design
The visual design is built around one question:
Is this still a leader pullback?
The pullback pocket shows the structural area, the recovery rail marks the reclaim reference, the relative-strength rail keeps benchmark context visible, the labels mark state changes, and the AG Pro panel summarizes the current decision context.
🧪 Practical Usage Workflow
1. Select an appropriate benchmark.
2. Read the panel first.
3. Check whether the asset is a relative leader.
4. Review pullback depth.
5. Look at the pullback pocket.
6. Watch whether price reclaims the recovery rail.
7. Confirm the broader market structure independently.
🔍 Interpretation Guidelines
A leader pullback means the asset is pulling back while still holding relative strength.
An RS hold means relative leadership has not broken yet.
Recovery ready means price has started reclaiming the recovery rail while relative strength remains constructive.
An RS break means the pullback may no longer be a clean leader pullback.
None of these states guarantee what happens next.
🚫 What This Script Is NOT
This script is not a prediction engine.
It is not a financial advice tool.
It is not an automated trading system.
It does not guarantee recovery after a leader pullback.
It does not guarantee that relative leaders will continue outperforming.
It does not replace risk management or independent analysis.
⚠️ Limitations & Transparency
Relative strength depends heavily on benchmark selection.
Different benchmarks may produce different interpretations.
Different timeframes may show different relative-strength states.
Fast markets can move through the pullback pocket quickly.
Sideways markets may create unclear relative-strength readings.
🧠 Market Context Notes
Relative strength is most useful when combined with structure, trend, volatility, and market regime.
A pullback in a relative leader can be constructive if leadership remains intact.
A pullback with relative breakdown is a weaker context and should be interpreted with caution.
Benchmark choice matters: crypto pairs may use BTCUSDT, stock charts may use SPY, sector ETFs, or another relevant benchmark.
🧾 Use Case Examples
When ETH pulls back while still outperforming BTC, the script can identify whether the pullback remains constructive or starts losing relative strength.
When a stock pulls back against SPY but relative strength holds above baseline, the script can highlight a leader pullback context.
When price breaks the pullback shelf while RS weakens, the script can flag relative breakdown risk.
🧱 System Philosophy
Relative Strength Pullback Map is part of the AGPro Series approach:
Build visual tools that explain market context clearly, avoid hype, avoid prediction claims, and support structured decision-making.
The goal is not to tell users what to do.
The goal is to help users see whether a pullback belongs to a strong leader or a weakening asset.
🔐 Non-Promise Statement
No script can remove uncertainty from trading.
This tool does not promise accuracy, certainty, profitability, or future performance.
📉 Risk Disclosure
Trading involves risk.
Market conditions can change quickly.
Users are responsible for their own decisions, position sizing, risk management, benchmark selection, and interpretation.
This script is for educational and analytical purposes only and does not provide financial advice.
📚 Educational Note
Use this script as a structured way to study relative strength, benchmark leadership, pullback depth, and recovery context.
The most valuable output is not a single label.
The value is the full map: relative state, leader status, pullback pocket, recovery rail, and next context.
Indicator

ES/SPX/SPY & HSI Future/Cash Index Realtime converter + GEXThis script is designed for traders who monitor Gamma Exposure (GEX) levels on cash indices (SPX, HSI) but execute trades on their respective Futures (ES, HSI!) or ETFs (SPY).
Because of the "Basis" (the price difference caused by interest rates and dividends), cash levels and futures prices do not align perfectly. This indicator solves that problem by calculating the real-time basis and automatically mapping your GEX levels to your current chart.
🚀 Key Features
Real-Time Basis Calculation: Automatically calculates the spread between Futures and Cash for both the S&P 500 and the Hang Seng Index.
Dynamic GEX Mapping: Input your daily Call Wall, Put Wall, and Zero Gamma levels for the cash index, and the script will plot them at the mathematically correct price on your Futures chart.
Dual-Price Labels: Labels display both the original Cash level and the converted "Futures Equivalent" price for instant clarity.
Multi-Asset Support:
US Market: ES (Futures), SPX (Index), and SPY (ETF).
HK Market: HSI (Index) and HSI! (Futures).
Integrated Dashboard:
Showing Current Basis (+/- points).
Estimated SPX/SPY prices during non-RTH hours.
US20Y Yield Monitor: Includes a warning emoji if bond yields cross the 5% threshold.
Price Mapping Table: A quick-reference table showing cash levels in 50/100 point increments and their corresponding futures prices.
🛠️ How to Use
Inputs: Every morning, update the SPX GEX Levels or HSI GEX Levels in the settings with data from your preferred gamma provider.
Date Monitor: Set the GEX Data Date. If you forget to update your levels the next day, a large watermark will appear to warn you that the data is expired.
UI Customization: You can move the Info Board and Levels Table to any corner of your screen to avoid cluttering your specific chart layout.
📊 Technical Details
Pine Script® v6: Built using the latest version for maximum performance and stability.
Sync Logic: Uses request.security to pull data from multiple tickers simultaneously, ensuring the basis calculation is always based on the most recent available tick.
Disclaimer : This indicator is a tool for visual mapping and data organization. It does not provide financial advice or automated signals. GEX levels must be sourced and input manually by the user. Indicator

Indicator

Indicator
