Rolling Sharpe Ratio Oscillator | Astral Vision Rolling Sharpe Ratio Oscillator | Astral Vision 🌠💠
The Sharpe Ratio measures risk-adjusted return: how much excess return is being generated per unit of volatility. Applied as a rolling oscillator to Bitcoin's daily log returns, it answers a question that neither price nor momentum indicators address: is the current appreciation being earned efficiently relative to the risk being taken, or is it a volatile, noisy move that consumes large drawdowns to produce modest gains?
High rolling Sharpe values indicate sustained, low-volatility uptrends where return per unit of risk is structurally elevated, historically coinciding with the most efficient phases of Bitcoin's bull runs. Negative Sharpe values indicate periods where volatility exceeds returns, marking drawdowns and bear phases.
This indicator plots the annualized rolling Sharpe as a smoothed oscillator with configurable thresholds, and back-projects those thresholds onto the price chart as dynamic levels representing the price that would produce each Sharpe extreme given current return and volatility conditions.
Calculation ⚙️
`Log Return = log(close / close )`
`Rolling Sharpe = (SMA(Log Return, length) / StdDev(Log Return, length)) × √365`
The ratio is annualized by multiplying by the square root of 365, expressing it in standard annual terms. An EMA of configurable length is then applied to smooth the raw Sharpe before threshold evaluation and coloring.
The price bands invert the Sharpe thresholds back to price space:
`Band Price = close × exp(threshold × StdDev / √365 × length)`
This produces a dynamic price level representing what price would need to be, given current volatility, to produce the specified Sharpe value.
Plots 📊
Smoothed Sharpe oscillator line in the indicator panel, colored by regime or continuous gradient
Overbought and oversold threshold lines
Fill between oscillator and overbought threshold when breached (distribution zone)
Fill between oscillator and oversold threshold when breached (accumulation zone)
Dynamic overbought and oversold price bands on the price chart, EMA-smoothed
Candle coloring on the price chart by regime or gradient
Background highlight on the price chart when either threshold is active
Inputs 🎛️
`Lookback Period (days)`: rolling window for mean and standard deviation of log returns (default 365)
`Smoothing EMA Length`: EMA applied to the raw Sharpe before all output (default 30)
`Oversold Threshold`: Sharpe level marking risk-adjusted accumulation extremes (default −1.5)
`Overbought Threshold`: Sharpe level marking risk-adjusted distribution extremes (default 2.8)
`Use Gradient Color`: toggles between continuous gradient coloring across the −2 to +2 range and discrete regime-based coloring
Colors 🎨
5 Astral Vision presets + custom override. Default: Futura. In gradient mode, color transitions continuously from negative to positive across the Sharpe range. In discrete mode, positive color activates above the overbought threshold, negative below the oversold threshold, and neutral between them.
Purpose 🎯
Standard momentum indicators like RSI and MACD measure price direction and speed, but are blind to whether that directional move is being achieved efficiently. A 30% Bitcoin rally with 80% annualized volatility carries very different risk-adjusted implications than the same rally with 40% volatility, yet both look identical on a price or momentum chart.
The rolling Sharpe makes that distinction explicit. The price band back-projection eliminates the need to mentally translate Sharpe values into price context: the bands show directly on the chart what price level corresponds to each statistical extreme given current volatility, updating dynamically as the volatility regime evolves.
The gradient coloring option provides a continuous read of risk-adjusted efficiency across the entire oscillator range, not just at binary threshold crossings.
Disclaimer ⭕️
It is not financial advice, not an investment recommendation, and not affiliated with any financial institution, research firm, or organization of any kind. All content is provided for educational and informational purposes only. Always conduct your own research before making any financial decision. مؤشر

Convex Hull Channel [forexobroker]🔶 OVERVIEW
Convex Hull Channel forms a tight envelope from the rolling maximum of body-tops (max of open and close) and minimum of body-bottoms (min of open and close), filtering wick spikes that classic Donchian channels reward. An expansion regime, defined as channel width above its 50-bar average, gates breakout signals to high-volatility periods only.
🔶 ALGORITHM
1. body_high = max(open, close); body_low = min(open, close).
2. upper = ta.highest(body_high, N); lower = ta.lowest(body_low, N).
3. width = upper - lower; expansion regime when width >= width_avg * (1 + k).
4. Buy break: close crosses prior bar's upper envelope inside expansion regime.
5. Sell break: close crosses prior bar's lower envelope inside expansion regime.
🔶 SIGNAL LOGIC
- Buy: expansion AND close crosses upper AND not already long AND cooldown elapsed AND barstate.isconfirmed.
- Sell: expansion AND close crosses lower AND mirror conditions.
- Position-lock state machine.
🔶 INPUTS
- Envelope Window (default 20)
- Min Width Excess (default 0.20)
- Cooldown Bars (default 4)
- Visual: dashboard, glow, envelope bands, buy / sell colors
🔶 ALERTS
CHC Buy, CHC Sell, CHC Any Signal, CHC Expansion On, CHC Expansion Off, CHC Upper Cross, CHC Lower Cross, CHC Outside, CHC Webhook JSON.
🔶 LIMITATIONS
- Body-only envelope gives fewer false breaks than wick-inclusive Donchian, but can miss legitimate moves that close back inside the body range.
- Expansion regime is rolling-average relative; a long quiet period followed by even modest expansion will fire whereas absolute-width logic might not.
- Cross-of-prior-bar (upper ) introduces a 1-bar delay vs immediate-bar break; intentional, reduces noise.
- Defaults tuned for 15m-1H on majors and indices; very fast scalping timeframes may want a smaller window.
مؤشر

Bootstrap Confidence Break [forexobroker]Bootstrap Confidence Break flags bars whose return falls outside a 90 percent confidence interval on the rolling mean return. The CI uses the standard-error formulation that is asymptotically equivalent to the percentile bootstrap when N >= 30, but is fully deterministic — no random number generation, no repainting. Signals fire on EMA cross when the move is statistically significant.
🔶 ALGORITHM
1. r = close - close (single-bar return).
2. mu = sma(r, N); sd = stdev(r, N); se = sd / sqrt(N).
3. CI high = mu + 1.645 * se; CI low = mu - 1.645 * se (90 percent two-sided).
4. Outside-up regime when r > CI_high; outside-down when r < CI_low.
🔶 SIGNAL LOGIC
- Buy: outside-up AND close crosses EMA up AND not already long AND cooldown elapsed AND barstate.isconfirmed.
- Sell: outside-down AND close crosses EMA down.
- Position-lock state machine.
🔶 INPUTS
- Return Window (default 40)
- Pullback EMA Length (default 8)
- Cooldown Bars (default 4)
- Visual: dashboard, glow, EMA toggle, buy / sell colors
🔶 ALERTS
BCB Buy, BCB Sell, BCB Any Signal, BCB Outside Up, BCB Outside Down, BCB EMA Up, BCB EMA Down, BCB 2-Sigma, BCB Webhook JSON.
🔶 LIMITATIONS
- Standard-error CI assumes approximately normal returns; heavy-tailed distributions widen the true tail risk and make this more conservative than a true percentile bootstrap.
- 90 percent interval is a reasonable default; adjust the multiplier (1.645) for stricter or looser cutoffs by editing the script.
- Signal cadence depends entirely on volatility regime; quiet markets produce few outside-CI bars.
- Combining CI break with EMA cross dampens whipsaws but slightly delays entry vs raw CI break.
مؤشر

Percentile SD OscillatorPercentile SD Oscillator
Percentile SD Oscillator is a momentum oscillator that measures the distance between price and its own dynamic reference levels — derived from percentile bands and a volatility-adjusted standard deviation filter. Rather than using fixed overbought/oversold levels, it continuously adapts to recent price behavior and only confirms a directional state when price demonstrates genuine statistical strength beyond its own boundaries.
The result is a histogram that oscillates around a zero line — positive and blue when the market is in a confirmed bullish state, negative and red when bearish.
How It Works
A moving average of your choice is calculated on a configurable source and length. Two percentile bands are then derived from this MA — an upper band and a lower band — defining the statistical range of recent price behavior.
A standard deviation of the close price is then calculated and added to the lower percentile band, creating a volatility-adjusted long reference level called sd_long. Price must close above both the upper percentile band AND sd_long to confirm a long — requiring double confirmation before entering a bullish state.
For the short side, a simple and fast condition is used — price only needs to close at or below the lower percentile band. Once a short state is confirmed, the oscillator measures the distance between the close price and the upper percentile band plus standard deviation as the bearish momentum value.
An EMA of the oscillator value acts as a confluence filter — the final signal only confirms when the oscillator is not only positive or negative but also above or below its own EMA. This ensures the oscillator only shows a confirmed state when momentum is genuinely building in that direction.
Why This Approach Works
Most momentum oscillators use fixed thresholds that do not adapt to changing market conditions. By combining percentile bands with a close-based standard deviation filter, the Percentile SD Oscillator requires price to break beyond levels that are dynamically calculated from both recent price structure and current volatility.
The asymmetric design between long and short is intentional and reflects the structural reality of markets like crypto. Longs require double confirmation — price must clear both the upper percentile band and the volatility-adjusted SD level — ensuring only genuinely strong bullish moves trigger an entry. Shorts are deliberately simpler and faster — price only needs to break below the lower percentile band, allowing quick exits when support is lost. This asymmetry prevents premature long entries while ensuring fast risk-off behavior when the market weakens.
The bullish momentum is measured against the lower percentile band — this captures how far price has risen above its support zone, giving a direct measure of bullish momentum strength. The bearish momentum is measured against the upper percentile band plus standard deviation — this creates a wider reference that captures how far price has fallen from the resistance zone, giving a more meaningful picture of bearish momentum strength.
Settings
MA Type — Moving average type used as the basis for the percentile calculation: DEMA, EMA, SMA, WMA, HMA, RMA (default: DEMA)
MA Length — Lookback period for the moving average (default: 8)
MA Source — Price source for the moving average calculation (default: high)
Percentile Length — Lookback period for the percentile band calculation (default: 57)
Percentile Up — Upper percentile threshold defining the bullish boundary (default: 60)
Percentile Down — Lower percentile threshold defining the bearish boundary (default: 46)
SD Length — Lookback period for the standard deviation calculation (default: 19)
SD Multiplier — Controls the strength of the standard deviation filter. Set to 0 to disable the SD filter entirely (default: 1.0)
EMA Length — Lookback period for the EMA confluence filter (default: 48)
Background Transparency — Controls the transparency of the optional background color (default: 85)
Color Background — Enables background coloring of the chart based on the current state (default: false)
Use Bar Coloring — Colors bars based on the current state (default: true)
How to trade it
Long — when the histogram turns blue and rises above zero, a bullish state has been confirmed. This is the signal to look for long entries or to hold existing long positions
Short / Cash — when the histogram turns red and falls below zero, the bearish state has been confirmed. This is the signal to exit longs, move to cash, or look for short entries depending on your strategy
Avoid trading against the signal — if the histogram is red do not look for longs, if it is blue do not look for shorts
The EMA line acts as a dynamic reference — when the histogram is above the EMA momentum is building, when it crosses below the EMA momentum is weakening
Recommended Usage
Best used on the 1D timeframe for clean and reliable signal generation
Should not be used alone for trade entries — combine with a trend-following indicator for best results
Set SD Multiplier to 0 to rely solely on the percentile bands — useful when you want more frequent signals in trending markets
Higher SD Multiplier values increase signal quality at the cost of fewer signals — lower values make the indicator more reactive
The asymmetric design makes this oscillator particularly well suited for bullish-biased markets like crypto — long entries require double confirmation while short exits are fast and decisive
All signals are confirmed on bar close. مؤشر

Multi-System (RSI2 + Squeeze + MACD/ADX)Confluence Multi-System combines three independent, well-documented signal frameworks into a single overlay and only fires alerts when two or more agree on direction. The goal is to filter noise: each system has its own logic and failure mode, so coincidence between them is statistically rarer and historically higher quality than any individual signal.
THE THREE SYSTEMS
System 1 — Mean Reversion (RSI-2 + Williams %R + 200 SMA)
Larry Connors-style countertrend setup. Trades only in the direction of the 200 SMA trend filter, requires RSI(2) at an extreme (<5 long, >95 short) and Williams %R(10) confirming (<-90 long, >-10 short). Designed for pullbacks within a trend, not reversals against it.
System 2 — TTM Squeeze
Classic John Carter volatility compression setup. Detects when Bollinger Bands(20, 2.0) contract inside Keltner Channels(20, 1.5) — a "squeeze" — then signals on the release in the direction of a linear-regression momentum oscillator. Catches breakouts after consolidation.
System 3 — Triple Confirmation (MACD + RSI + ADX)
Trend-following filter stack. Long requires MACD(12,26,9) bullish cross + RSI(14) > 50 + ADX(14) > 25. Short is the mirror. ADX gates out chop; RSI confirms the cross is in the dominant momentum side.
CONFLUENCE LOGIC
The indicator counts how many systems are signaling in the same direction on the same bar:
• 3/3 → STRONG signal (background tinted, label printed, dedicated alert)
• 2/3 → MEDIUM signal (lighter tint, dedicated alert)
• <2 → no signal, no alert
The minimum number of systems required can be configured (default 2). You can also disable any system individually if you want to test 2-of-2 confluence on specific pairs.
WHAT YOU SEE ON THE CHART
• Background tint on confluence bars (green/red strong, lime/fuchsia medium)
• Labels marking the bar where confluence first appears
• 200 SMA plotted as visual reference for the System 1 trend filter
• A status table (top-right) showing for each system: long/short state, key indicator values (RSI, Williams %R, ADX, squeeze state, momentum), plus a summary row with the current confluence level
ALERTS
Six alertconditions are exposed:
• STRONG LONG (3/3) / STRONG SHORT (3/3)
• MEDIUM LONG (2/3) / MEDIUM SHORT (2/3)
• ANY CONFLUENCE LONG / ANY CONFLUENCE SHORT (respect the configured minimum)
Alerts include ticker, interval, and close price via standard TradingView placeholders.
INPUTS
All three systems are fully parametrized: SMA length, RSI/Williams %R lengths and thresholds, Bollinger and Keltner lengths and multipliers, MACD periods, ADX length and minimum strength. Defaults match the original published values for each framework.
USE CASES
• Day trading on lower timeframes — wait for 2/3 or 3/3 to enter, exit on opposite confluence or your own stop
• Swing trading on 1H/4H/Daily — confluence becomes rare but high quality
• As a confirmation layer over your own strategy — read the table to see which systems agree before pulling the trigger
NOTES AND DISCLAIMERS
This is an indicator, not a strategy — it does not place orders, manage stops, or compute P&L. Win-rate ranges referenced for each underlying system come from the original literature (Connors, Carter, Wilder/Appel) and are heavily dependent on instrument, timeframe, and exit logic. Past performance does not guarantee future results. Always backtest with your own exit rules before trading live.
Open source — fork it, adapt the thresholds, plug in your own systems. مؤشر

Regime Classifier : TREND / CHOP / VOL (Multi-Index Tuning)The Big Picture
The Regime Classifier is a single Pine Script that runs on any chart in TradingView and tells you what kind of market you are looking at. It analyzes the recent price action using three independent measurements and combines them into a single label that reads either TREND, CHOP, or VOL. This label appears as a colored tag at the top right of the most recent price bar, with green meaning the market is trending cleanly, red meaning it is choppy and directionless, and orange meaning it is in a high-volatility unstable phase.
The script is designed to be used across multiple charts — one instance on Nifty 50, another on Bank Nifty, another on Midcap 150, and so on for US indices. Each chart instance can be tuned independently from the indicator settings panel without touching the script itself. This is achieved through a configurable inputs section that exposes every important threshold as an adjustable parameter.
How The Script Is Structured
The script is organized into clearly demarcated sections, each separated by horizontal divider lines made of unicode characters. Reading from top to bottom, the sections are: a comprehensive documentation header, the Pine version declaration and indicator title, the inputs section, a position conversion block, the core calculations, the regime logic, the regime label and color assignments, the on-chart label display, the alert condition, a hidden plot for external referencing, and finally the diagnostic table.
This top-to-bottom flow matches the natural reading order. First you understand what the script does (header), then you see how it can be configured (inputs), then you see what it calculates (core calculations), then you see how those calculations are turned into decisions (regime logic), and finally you see how the decisions are displayed and made available (label, alert, plot, table).
The Documentation Header
The first major section of the script is a long block of comments that explains everything a user needs to know before using the indicator. This block is approximately one hundred lines long and is structured into seven distinct parts.
The first part explains what the indicator does in plain language, describing each of the three regimes — TREND, CHOP, and VOL — with their visual signature on the chart and the trading behavior recommended in each. The second part explains how the indicator makes its decisions, walking through the three underlying measurements (ADX, Bollinger Band Width Percentile, and EMA Whipsaw Filter) and explaining why each was chosen and what role it plays.
The third part is a detailed tuning guide showing recommended threshold values for seven different indices spanning Indian and US markets. This table is the most practical piece of documentation in the script because it tells the user exactly which numbers to enter when configuring the indicator on a specific chart.
The fourth part describes the diagnostic table, explaining what each row means and how to interpret the color coding. The fifth part is a deliberate disclosure of the indicator's limitations — what it cannot do, where it lags, and why these limitations are acceptable. The sixth part explains how to set up TradingView alerts using the indicator's built-in alert condition. The seventh part contains author and license information.
This entire header serves as both onboarding documentation for new users and a future reference for the author when revisiting the script after months away.
The Indicator Declaration
After the header comes the Pine version declaration and the indicator title. The script is written for Pine Script version 6, which is the current standard. The title is intentionally region-neutral, reading simply Regime Classifier with the three regime names listed. This neutrality matters because the same script is used across many different markets and indices, so the title should not imply it is specific to any one of them.
The overlay parameter is set to true, which means the indicator draws on top of the price chart rather than creating its own pane below the chart. This is the right choice for an indicator that places labels and tables on the chart but does not plot any price-like values that need their own scale.
The Inputs Section
The inputs section exposes every adjustable parameter to the user through TradingView's settings panel. There are nine inputs in total, organized into four logical groups.
The first input is the Configuration Label, which is a dropdown menu containing eight options corresponding to seven different indices plus a Custom option for any other instrument. This label is purely informational — it does not affect calculations. Its purpose is to give the user a clear visual indicator on each chart of which tuning preset is active. When you have multiple charts open, this label tells you at a glance whether you are looking at the Nifty 50 instance, the Bank Nifty instance, or another configuration.
The second input is the Diagnostic Table Position, which is another dropdown menu with nine options corresponding to the nine standard positions where Pine Script can place a table on a chart. This input lets the user move the diagnostic table to wherever it best fits the chart layout without having to edit the script.
The next group of inputs concerns the ADX calculation. The ADX Length controls the lookback period for the indicator (defaulting to fourteen, the classical value). The ADX Trend Threshold sets the value above which ADX is considered to confirm a trending market. The ADX Chop Threshold sets the value below which ADX contributes to a chop classification.
The third group concerns Bollinger Band Width. The Bollinger Length controls the period for the band calculation. The Bollinger StdDev controls how wide the bands are relative to the middle line. The BBW Percentile Lookback determines how many bars of history the current band width is ranked against. The BBW Volatility Percentile sets the threshold above which the indicator flags VOL.
The fourth group concerns the EMA Whipsaw Filter. The EMA Length sets the period of the moving average used to detect whipsawing. The EMA Whipsaw Lookback determines how many recent bars are checked for crossover counts.
Every input has a tooltip that explains its purpose when the user hovers over it in the settings panel. This makes the indicator self-documenting at the point of use.
The Position Conversion Block
After the inputs comes a small but important block that converts the user's selection from the Diagnostic Table Position dropdown into the actual Pine Script position constant required by the table.new function. The dropdown stores the user's choice as a text string like "Top Right" or "Bottom Left," but Pine Script's table function requires a specific built-in constant such as position.top_right or position.bottom_left.
The conversion block uses an if-else if chain to map each text option to its corresponding constant. The result is stored in a variable called posConstant, which is later used when creating the diagnostic table. This indirection is necessary because Pine Script does not allow dynamic position selection at the table creation point — you cannot pass a string variable directly. The conversion block solves this with a small one-time mapping.
The Core Calculations
This section computes the three underlying measurements that the regime logic depends on.
The first calculation is the ADX. The script uses Pine Script's built-in ta.dmi function, which returns three values — the Plus Directional Indicator, the Minus Directional Indicator, and the ADX itself. The script captures all three but uses only the ADX value for trend strength assessment. The other two are kept available for potential future enhancement but are not currently consumed.
The second calculation produces the Bollinger Band Width. The script first computes the Simple Moving Average over the configured length, then computes the standard deviation of price over the same length, then constructs the upper and lower bands by adding and subtracting a multiple of the standard deviation from the moving average. The band width is calculated as the upper minus the lower, divided by the middle, which normalizes the width to be comparable across instruments at different price levels.
After computing the raw band width, the script ranks it against its own history using the percentrank function. This produces a value between zero and one hundred indicating where the current band width falls compared to the previous one hundred bars (or whatever lookback the user configured). A value of ninety means the current width is wider than ninety percent of recent history, indicating volatility expansion.
The third calculation is the EMA whipsaw count. The script computes a twenty-period exponential moving average, then identifies every bar where price crossed above the EMA (a crossover) or below the EMA (a crossunder) within the recent lookback window. It sums these events to get a total cross count over the lookback. If this count reaches three or more, a boolean flag called isWhipsawing is set to true.
The Regime Logic
This is the heart of the script — the section where the three calculations are combined into a single regime classification. The logic uses three boolean flags computed in a specific priority order.
The first flag is isVol, which is set to true when the BBW percentile rank meets or exceeds the user's volatility threshold. This is checked first because volatility takes priority over everything else in the classification. A market in extreme volatility cannot be considered a clean trend regardless of what ADX says.
The second flag is isTrend, which requires three conditions to all be true. First, the market must not be in VOL state. Second, ADX must be at or above the trend threshold. Third, the whipsaw filter must not be active. Only when all three conditions hold does the indicator classify the market as TREND.
The third flag is isChop, which is the default fallback. It is set to true when the market is neither in VOL nor in TREND, and either ADX is below the chop threshold or whipsawing is active.
This priority structure — VOL first, TREND second, CHOP as fallback — biases the indicator toward conservative classification. If conditions are ambiguous, the indicator defaults to CHOP, which is the regime where the system tells you to stand aside. This bias is intentional because preventing bad trades is more valuable than catching every good one.
The Regime Label, Color, And Code Assignment
After determining which flag is true, the script assigns the appropriate label text, label color, and numeric code to three variables. The label text is one of TREND, CHOP, VOL, or MIXED. The label color is green for TREND, red for CHOP, orange for VOL, and gray for MIXED. The numeric code is one for TREND, negative one for CHOP, two for VOL, and zero for MIXED.
The MIXED state is a defensive fallback that should rarely if ever occur. It exists to handle the theoretical edge case where none of the three primary conditions is true, which can only happen due to floating-point precision issues at exactly the threshold boundaries.
The assignment logic uses if-else if blocks rather than nested ternary expressions. This is a deliberate choice because Pine Script's parser sometimes has trouble with multi-way nested ternaries that mix string and color types. The if-else structure is unambiguous and produces reliable compilation across Pine versions.
The On-Chart Label Display
This section renders the regime classification visually on the chart. The script uses Pine Script's persistent variable mechanism, declaring a label variable with the var keyword that retains its value across bars. On every bar, the script first deletes the previous label and then creates a new one positioned at the high of the current bar.
This delete-and-recreate pattern ensures that only one label exists on the chart at any time, always at the most recent bar. Without this pattern, the script would create a new label on every bar and accumulate hundreds of historical labels, cluttering the chart.
The label uses the style_label_down style, which makes it look like a tag pointing downward at the price bar. The text shows the current regime, the background color matches the regime color, the text itself is white for high contrast, and the size is set to large for visibility.
The Alert Condition
This section enables TradingView users to set up alerts that fire whenever the regime changes from one bar to the next. The script uses Pine Script's history-referencing operator to compare the current regime to the previous bar's regime. When they differ, the regimeChanged boolean is true, and the alertcondition function makes this state available to TradingView's alert engine.
When a user creates an alert in TradingView and selects this script as the source, the Regime Changed condition appears as a selectable trigger. The alert message is a simple text string indicating that the regime has shifted on the current ticker and timeframe. Users can configure delivery via popup, email, mobile push, or webhook depending on their TradingView subscription.
The Hidden Plot
After the alert section, the script includes a single plot statement that outputs the numeric regime code. This plot is hidden from the chart using the display.none parameter, so it does not visually clutter the chart. Its purpose is to make the regime code accessible to other Pine scripts that might want to reference this indicator's output.
For example, if a user later builds a separate strategy script that should only enter trades when the Regime Classifier shows TREND, that strategy can use Pine Script's input source mechanism to read this hidden plot value and gate its trade logic accordingly. The plot is essentially a structured way of exposing the regime decision to downstream automation while keeping the chart clean.
The Diagnostic Table
The final and largest section of the script renders a small information table on the chart showing the indicator's internal state. The table is created once using the var keyword (so it persists across bars) and is positioned according to the user's choice from the Diagnostic Table Position dropdown.
The table has two columns and six rows. The first row shows the Configuration Label, identifying which tuning preset is active on this chart. The second row is a header row labeling the columns as Metric and Value. The remaining four rows show the four diagnostic measurements.
The ADX row displays the current ADX value with two decimal places, color-coded green when above the trend threshold and orange when below. The BBW Rank row shows the current BBW percentile rank, color-coded orange when in volatility territory and white otherwise. The EMA Crosses row shows the count of recent EMA crossings, color-coded red when at or above the whipsaw threshold and white otherwise. The Whipsaw row shows a clean YES or NO indicator with red coloring for YES and green for NO.
The table updates only on the most recent bar by checking the barstate.islast condition. This optimization avoids unnecessary recomputation on historical bars, where the table would not be visible anyway.
The diagnostic table is what makes the indicator transparent rather than a black box. When the user sees a CHOP label and wants to understand why, they can read the table and see exactly which condition is responsible. If ADX is fifteen, the answer is clear — directional momentum has not been confirmed. If Whipsaw is YES, the answer is clear — the market has been crossing the EMA too frequently to be considered trending. This transparency builds user trust in the indicator and helps the user develop intuition about market regime over time.
How The Sections Work Together
Reading the script as a whole, you can trace a clear flow from input to output. The user configures parameters in the inputs section. The position conversion block translates the position selection into the format Pine Script needs. The core calculations transform raw price data into the three measurements (ADX, BBW Rank, Whipsaw count). The regime logic combines these measurements into a single classification. The label and color assignment renders the classification into visible elements. The on-chart label, the alert condition, the hidden plot, and the diagnostic table each consume the classification in different ways — for visual display, for notifications, for downstream automation, and for transparency.
Every section has a single clear purpose. Nothing is duplicated. The script is approximately three hundred lines including comments, but the actual executable Pine code is closer to ninety lines. The comment-to-code ratio reflects the priority on documentation and readability over compactness.
Why It Is Built This Way
The script reflects several deliberate design choices that may not be obvious from reading the code alone.
The choice of three measurements (ADX, BBW Percentile, Whipsaw) rather than one or two reflects the reality that no single technical indicator is reliable across all market conditions. Combining three independent measurements with a priority order significantly reduces the false signals that any one of them would produce alone.
The choice to put the configuration in inputs rather than constants reflects the reality that one set of thresholds cannot fit all markets. A bank index, a tech-heavy index, and a small-cap index have fundamentally different volatility characteristics, and the indicator must be tunable to fit each.
The choice to bias toward CHOP as the default fallback reflects the trading philosophy that protecting capital is more valuable than catching every move. The indicator is designed to keep the user out of bad markets even at the cost of occasionally missing the start of good ones.
The choice to provide a diagnostic table reflects the reality that black-box indicators erode user trust. By showing the user exactly which numbers are driving the classification, the script invites scrutiny rather than blind acceptance.
The choice to write extensive narrative documentation in the comment header reflects the reality that scripts are read by humans, including future versions of yourself, who need to understand the design intent and not just the code mechanics.
These choices add complexity to the script but produce an indicator that is genuinely useful, tunable, transparent, and maintainable.
What This Script Is Not
It is worth noting what this script does not attempt to do. It does not generate buy or sell signals. It does not calculate position sizes. It does not draw entry levels, stops, or targets on the chart. It does not provide a backtesting framework. It does not optimize its own thresholds. It does not access external data feeds.
These omissions are intentional. The script does one thing — classify market regime — and does it cleanly. Other concerns belong in other scripts. A trading system built around this indicator would consist of multiple scripts, each handling a separate concern, with the regime classifier serving as the foundational filter that determines whether the trading system should be active at all.
This separation of concerns is good software architecture in any context. Each script has clear boundaries, can be tested independently, can be improved without breaking other components, and can be replaced if a better version is developed.
In Summary
The Regime Classifier is a Pine Script v6 indicator that classifies any market chart into one of three regimes (TREND, CHOP, VOL) using three independent measurements (ADX, Bollinger Band Width Percentile, EMA Whipsaw Filter) combined with a priority-ordered logic that biases toward conservative classification. It is fully configurable through inputs, transparent through a diagnostic table, deployable across multiple charts with per-chart tuning, alert-enabled for hands-off monitoring, and extensively documented in plain language. It is one component of a larger trading system, focused on the single critical question of whether the current market environment is suitable for trading at all. مؤشر

Bitcoin Transaction Fees Z-Score | Astral Vision Bitcoin Transaction Fees Z-Score | Astral Vision 🌠💠
Transaction fees are one of the most direct expressions of genuine on-chain demand pressure. When users compete to get transactions confirmed, fees spike and historically those spikes have aligned tightly with late-stage cycle euphoria. Conversely, fee compression marks periods of network inactivity that have repeatedly preceded major accumulation opportunities.
This indicator standardizes total Bitcoin transaction fees (USD) in log space over a configurable lookback window, producing a Z-Score that exposes statistically extreme deviations from the long-term fee baseline, both to the upside and the downside.
Calculation ⚙️
`Z = (log(SMA(Total Fees USD, smooth)) − SMA(log_fees, length)) / StdDev(log_fees, length)`
Total on-chain fees in USD are first smoothed by a short SMA to reduce daily noise, then transformed into log space before standardization. The Z-Score measures how many standard deviations the current fee level sits above or below its long-term mean, compressing Bitcoin's exponential fee growth into a cycle-comparable signal.
Plots 📊
Z-Score line, colored by active regime (positive, negative, or neutral)
Extreme High threshold line (default 2.5)
Low threshold line (default −1.35)
Fill between Z-Score and Extreme High threshold when breached (distribution zone)
Fill between Z-Score and Low threshold when breached (accumulation zone)
Candle coloring on the price chart by active regime
Background highlight on the price chart when either threshold is active
Inputs 🎛️
`Z-Score Length (days)`: lookback window for mean and standard deviation calculation (default 730)
`Smooth Input (days)` : SMA applied to raw fee data before log transformation (default 7)
`Extreme High Threshold` : Z-Score level marking fee-driven distribution zones (default 2.5)
`Low Threshold` : Z-Score level marking fee-driven accumulation zones (default −1.35)
Colors 🎨
5 Astral Vision presets + custom override. Default: Futura. Positive color activates below the Low threshold; negative color activates above the Extreme High threshold; neutral applies between thresholds.
Purpose 🎯
Raw fee charts are dominated by Bitcoin's exponential price growth, making cycle-to-cycle comparison visually meaningless. Standard fee indicators plot absolute values with no statistical context, offering no signal on whether current fees are elevated or compressed relative to historical norms.
This indicator solves both problems: log transformation removes the exponential trend, and Z-Score standardization makes every cycle directly comparable regardless of Bitcoin's price magnitude. The result is a clean, threshold-driven signal that identifies when fee demand has reached statistically extreme levels, either as a distribution warning or an accumulation opportunity, directly overlaid on the price chart through candle and background coloring.
Disclaimer ⭕️
It is not financial advice, not an investment recommendation, and not affiliated with any financial institution, research firm, or organization of any kind. All content is provided for educational and informational purposes only. Always conduct your own research before making any financial decision. مؤشر

R2D2 Liquidation HeatmapR2D2 Liquidation Heatmap: The Professional’s Guide to Trapped Liquidity
Liquidity is the lifeblood of the crypto markets, and more often than not, someone’s forced exit is your ideal entry. In high-leverage environments, price doesn't just move linearly; it moves from one pocket of trapped traders to the next. The R2D2 Liquidation Heatmap is designed to pull back the curtain on these "invisible" price levels, mapping exactly where stop-losses cluster and where market stress is most likely to break.
________________________________________
The Core Philosophy: Trading the "Pain"
Most indicators look at where the price has been. This indicator looks at where the price wants to go to find fuel.
A liquidation cascade occurs when the market hits a dense cluster of stop-orders or liquidation prices. This triggers a self-reinforcing loop: forced sells lead to more price drops, which trigger more sells. By identifying these zones before they are hit, you shift from being a reactive trader to a predictive one.
Heatmap Components
• Current Liquidation Levels: These are "active" zones. They extend to the right of the current price because they represent future targets.
• Historical Liquidation Levels: These are "spent" zones. When a line stops and freezes at a specific bar, it shows you exactly where a flush occurred, giving you a map of how the market responded to that specific injection of volatility.
________________________________________
The Color Spectrum: Decoding Intensity
The heatmap uses a multi-stop gradient to show you the "mass" of the positions at any given level.
Color Meaning Expected Reaction
Dark Purple Low Liquidity Minor speed bump; price may slice through with little effort.
Blue / Indigo Medium Liquidity Potential area for a "pause" or a minor retracement.
Cyan / Light Blue High Liquidity Strong magnet for price; likely to see a spike in volume.
Bright Mint Green Extreme Liquidity High probability of a violent cascade or a major trend reversal.
________________________________________
Professional Trading Strategies
1. The "Liquidity Sweep" Entry
Professional traders rarely buy a support line the first time it’s touched. Instead, they look for the Bright Green cluster sitting just below that support. When price "sweeps" into that green zone and immediately bounces, it indicates that the trapped longs have been flushed out, leaving the path clear for an upside move.
2. Target-Based Exits
If you are in a long position and see a massive Cyan/Green cluster above the current price, that is your exit magnet. These zones act as "liquidity draws." Price is statistically drawn to these areas to facilitate large orders. Setting your Take Profit just inside these clusters ensures you get filled during the peak of the volatility.
3. Avoiding the "Gap"
If you see a large price gap between the current price and the next major liquidation cluster, expect a "slippage zone." Price tends to move very quickly through these low-liquidity areas (Dark Purple) because there are no orders to slow it down.
________________________________________
S caling for Professionals: Timeframe Optimization
The biggest mistake traders make is using the same sensitivity on a 30m chart as they do on a Daily chart. To get a clean, professional-grade heatmap, you must adjust your Cluster Tolerance and Intensity Threshold.
Recommended Settings Table
Timeframe Pivot Length Cluster Tolerance Intensity Threshold
30m - 1HR 3 0.05% - 0.1% 3.0
4HR 3 - 5 0.3% - 0.5% 4.5
Daily 3 1.0% - 2.0% 6.0+
Why the change?
• Cluster Tolerance: On a Daily chart, a "level" is a wide zone. If you keep the tolerance at 0.05%, you will see hundreds of tiny, weak lines. Setting it to 1.5% on the Daily allows the script to aggregate all the stops within a $1,200 range (on BTC), showing you the true macro "wall" of liquidity.
• Intensity Threshold: Daily volume is massive compared to the average. Pushing the intensity to 6.0 or higher ensures that only the most extreme, market-shifting events light up in green, keeping your chart clean and actionable.
________________________________________
Final Tips for Success
• Trust the "Untouched": Significant liquidation levels that haven't been hit for months are often the ultimate "Magnets" for a macro trend.
• Watch the Clusters: If you see three or four lines merging into one thick, bright green bar, pay attention. That is a high-conviction zone where thousands of traders have their "line in the sand."
• Scaling Matters: Always ensure your indicator is pinned to the Right Scale. If the lines don't move when you drag the chart, right-click the indicator name and select "Pin to Scale."
May the trades be with you. مؤشر

مؤشر

مؤشر

مؤشر

مؤشر

مؤشر

مؤشر

Volatility Gated Supertrend [BackQuant]Volatility Gated Supertrend
Overview
Volatility Gated Supertrend is a regime-aware trend-following indicator built around a modified Supertrend engine with an integrated volatility filter . Unlike a traditional Supertrend, which flips direction whenever price crosses its trailing bands, this version introduces a gating mechanism that can block trend reversals during low-volatility conditions .
The purpose of the indicator is simple:
Keep the responsiveness and structure of a Supertrend.
Reduce false flips during sideways or compressed conditions.
Allow trend transitions primarily when volatility is expanding enough to justify participation.
The result is a smoother and more selective trend engine designed to suppress whipsaws while still reacting to meaningful directional movement.
The full source structure for the indicator can be referenced here: :contentReference {index=0}
Core idea
Traditional Supertrend indicators work well during directional markets but struggle in compressed environments:
Price repeatedly crosses the trailing bands.
Trend direction flips too frequently.
False reversals appear during chop.
This indicator attempts to solve that problem by asking:
“Is there enough volatility expansion to justify accepting a new trend?”
Instead of blindly allowing every flip, the indicator measures:
Current volatility,
Baseline volatility,
Relative expansion or compression.
Only when volatility conditions are sufficient does the trend engine allow a directional transition.
What the Supertrend is
The Supertrend is a volatility-based trailing trend indicator built from:
ATR (Average True Range)
A central price source
A directional trailing stop structure
The classic logic:
Upper band = price source + ATR × multiplier
Lower band = price source − ATR × multiplier
These bands trail price dynamically:
In bullish conditions, the lower band ratchets upward.
In bearish conditions, the upper band ratchets downward.
When price crosses one of the bands:
The trend flips direction.
This creates a clean directional regime model.
How this version differs
The major difference is the volatility gate .
A normal Supertrend asks:
“Did price cross the band?”
This indicator asks:
“Did price cross the band, and is volatility strong enough to trust the move?”
That additional filter dramatically changes behavior in sideways conditions.
ATR and volatility structure
The indicator uses two ATR measurements:
Fast ATR → current short-term volatility
Slow ATR → baseline long-term volatility
The core ratio:
Volatility Ratio = Fast ATR / Slow ATR
Interpretation:
Ratio above threshold → volatility expansion
Ratio below threshold → volatility compression
This becomes the gate logic.
Volatility Gate Logic
The gate opens only when:
Fast ATR / Slow ATR ≥ Gate Threshold
If volatility is too compressed:
The gate closes.
Trend flips are blocked.
Importantly:
The Supertrend bands still calculate normally.
Price can still cross them.
But the directional state will not update while the gate is closed.
This distinction matters because it means:
The market may technically trigger a reversal,
But the indicator intentionally ignores it if volatility conditions are weak.
Why this helps
Most trend-following systems fail in chop because:
Small meaningless moves trigger directional flips.
There is insufficient range expansion.
The market lacks trend persistence.
By requiring volatility confirmation:
Weak reversals are filtered out.
Trend state becomes more stable.
Noise is reduced.
This makes the indicator particularly useful during:
Low-volatility consolidations,
Mean-reverting conditions,
Slow drifting ranges.
Band construction
The indicator uses:
hl2 as the central source,
ATR for dynamic width,
A configurable multiplier for sensitivity.
Formulas:
Upper Band = hl2 + ATR × multiplier
Lower Band = hl2 − ATR × multiplier
The trailing logic prevents the bands from moving backward unnecessarily:
Bullish lower band only rises.
Bearish upper band only falls.
This creates the staircase-style trailing structure common in Supertrend systems.
Trend state
Trend direction is binary:
1 = bullish
-1 = bearish
A raw bullish flip occurs when:
Close > trailing upper band
A raw bearish flip occurs when:
Close < trailing lower band
However:
The trend only updates if the volatility gate is open.
This is the defining behavior of the script.
Blocked flips
One of the most important features is the visualization of blocked signals .
When:
Price crosses a band,
But volatility is insufficient,
The script:
Plots an X-cross marker,
Keeps the existing trend state,
Refuses the flip.
This gives traders visibility into:
Potential but unconfirmed reversals,
Areas of weak participation,
Fake breakouts or low-energy transitions.
Visual behavior
Trend band
The active trailing band changes color based on trend direction:
Bullish → bullish color
Bearish → bearish color
Gate closed → gated color (dimmed)
Trend fill
The script fills the space between price and the active band:
Bullish fill during bullish regimes
Bearish fill during bearish regimes
This creates a cleaner directional overlay.
Outer glow
An additional glow layer expands slightly beyond the trend band:
Adds directional emphasis,
Improves trend readability,
Visually reinforces active regime.
When the gate closes:
The band and candles dim.
This visually communicates:
“The trend engine is currently suppressing flips.”
Candle coloring
Candles can optionally inherit the trend state:
Bullish regime → bullish candles
Bearish regime → bearish candles
Gate closed → dimmed neutral appearance
This allows the indicator to function as a full-chart regime overlay.
Signal logic
Bullish signal
Occurs when:
Trend flips from bearish to bullish,
AND the gate is open.
Bearish signal
Occurs when:
Trend flips from bullish to bearish,
AND the gate is open.
Blocked signal
Occurs when:
A raw flip condition appears,
BUT volatility ratio is below threshold.
This distinction is important:
A blocked signal is not ignored information.
It is a rejected transition.
How to interpret the gate
Gate open
Volatility is active.
Market expansion is sufficient.
Trend flips are allowed.
Gate closed
Market is compressed.
Conditions are likely choppy.
Trend reversals are suppressed.
This effectively turns the indicator into a:
Trend-following system during expansion,
Trend-holding system during compression.
Why ATR ratio works well
ATR ratio is a powerful regime detector because it measures:
Current volatility relative to normal volatility.
Not just:
“Is volatility high?”
But:
“Is volatility high relative to its recent baseline?”
This adaptive behavior allows the gate to work across:
Different assets,
Different timeframes,
Different volatility environments.
Input guide
ATR Multiplier
Controls band width:
Higher = wider bands, fewer flips
Lower = tighter bands, more sensitivity
ATR Length
Controls volatility calculation for the Supertrend itself.
Fast ATR
Short-term volatility measure.
Slow ATR
Long-term baseline volatility measure.
Gate Threshold
Controls how strict the gate is:
Lower threshold = more permissive
Higher threshold = more restrictive
Example:
0.6 → allows more flips
1.0 → requires current volatility to match baseline
1.2 → requires expansion regime
Strengths
Reduces Supertrend whipsaws in chop.
Adds regime awareness.
Uses adaptive volatility filtering.
Clean trend visualization.
Blocked-signal logic provides extra context.
Limitations
Can delay reversals during early expansion.
Very high thresholds may suppress legitimate transitions.
Still fundamentally a trend-following system.
Not designed for low-volatility mean reversion trading.
Best use case
Volatility Gated Supertrend works best as:
A directional regime filter,
A swing trend overlay,
A volatility-aware trend confirmation tool,
A way to suppress noise during consolidations.
It is particularly useful for traders who:
Like Supertrend logic,
But dislike how often it flips in sideways markets.
Summary
Volatility Gated Supertrend extends the classic Supertrend framework by introducing a volatility-aware gating engine that blocks trend reversals during compressed market conditions. By comparing fast ATR against slow ATR, the script determines whether enough volatility expansion exists to justify a directional transition. The result is a cleaner, more stable trend system that retains the strengths of Supertrend logic while dramatically reducing whipsaws during low-energy market regimes. مؤشر

مؤشر

Smart Money Liquidity Detector [PickMyTrade]Smart Money Liquidity Detector
This indicator measures market microstructure — the structural signals that institutional activity leaves behind in price and volume data. It combines four academically grounded models into a single Microstructure Stress Score (MSS) ranging from 0 to 100.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
MODELS USED
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
► Roll (1984)
Synthetic bid-ask spread estimated from the serial covariance of price changes. High Roll spread indicates wider market-maker quotes — historically associated with periods of elevated volatility.
► Corwin-Schultz (2012)
High-low range spread estimator. Uses the relationship between single-period and two-period high-low ranges to back out the effective spread without requiring tick data.
► Amihud (2002)
Illiquidity ratio measuring price move per unit of volume. High Amihud values mean large price impact per dollar traded — a sign of thin order books.
► Kyle Lambda (1985)
Price impact of signed order flow. Derived from the regression of price changes on volume direction. Estimates how aggressively informed participants are moving the market.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
MICROSTRUCTURE STRESS SCORE (MSS)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Each model is z-scored over a rolling window, normalised to , then averaged and scaled to 0–100.
MSS = (Roll + Corwin-Schultz + Amihud + Kyle Lambda) / 4 × 100
- MSS > 70 → High stress. Spreads wide, illiquidity elevated, price impact high. Consistent with institutional order flow.
- MSS 30–70 → Normal range. No structural signal.
- MSS < 30 → Low stress. Tight spreads, liquid conditions, quiet tape.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ANOMALY DETECTION
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Any individual model z-score crossing ±2σ triggers an anomaly flag. Anomaly bars are highlighted in orange on the chart. Roll and Corwin-Schultz anomalies are marked with coloured circles directly on the MSS line.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
INPUTS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
- Spread window (default 20) — lookback for Roll and Corwin-Schultz estimation
- Z-score window (default 60) — rolling window for z-scoring all models
- Impact window (default 20) — lookback for Amihud and Kyle Lambda
- MSS normalise window (default 100) — window for normalisation before scoring
- Toggle each model's z-score plot individually
- Highlight anomaly bars on/off
- Info table on/off
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
INFO TABLE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Top-right table displays live values and z-scores for all four models, the current MSS reading, and anomaly status on the last closed bar.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
NOTES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
- Works on any liquid instrument and any timeframe. Most effective on futures, forex, and equity indices where volume data is reliable.
- This indicator does not generate buy or sell signals. It is a market structure diagnostic tool.
- Powered by PickMyTradeLib — PickMyTrade's open quantitative library.
This script is published for educational and informational purposes only. It does not constitute financial advice. Use at your own risk. Past microstructure behaviour does not guarantee future price outcomes.
مؤشر

مؤشر

مؤشر

Ultimate Volume Warfare [CLEVER]Overview
Ultimate Volume Warfare is a comprehensive volume-analysis system built to study how market participation interacts with price structure, volatility, and momentum conditions across different trading environments. The indicator combines multiple layers of volume behavior into a unified analytical framework designed to help traders observe shifts in market activity with greater clarity and structure.
At its foundation, the script focuses on the relationship between price movement and trading participation rather than treating raw volume as an isolated metric. By combining pivot-based divergence analysis, adaptive volume calculations, relative volume behavior, and contextual filtering systems, the indicator attempts to highlight moments where participation characteristics begin changing beneath price action.
The system includes an advanced volume classification model inspired by participation-based market behavior. Different conditions such as climax activity, exhaustion phases, accumulation behavior, distribution pressure, absorption zones, and abnormal spike events are visually separated using dedicated color logic. This structure is designed to make changes in participation strength easier to identify during trending, ranging, and volatile market conditions.
A major component of the framework is its divergence engine, which compares confirmed swing structures in price against confirmed swing structures in volume. The script supports both regular and hidden divergence detection using pivot-based confirmation logic. Because the system relies on completed pivot structures, signals naturally appear after confirmation instead of attempting to predict unfinished market swings in real time. This confirmation-based approach is intended to reduce unstable signal behavior while preserving structural consistency.
To improve adaptability across different market conditions, the indicator uses volatility-sensitive calculations that dynamically adjust internal thresholds according to changing ATR behavior. This allows the script to react differently during low-volatility consolidation phases versus high-volatility expansion phases, helping the analytical logic remain more responsive across multiple instruments and timeframes.
The indicator also integrates relative volume analysis and spike-detection systems to identify periods where market participation exceeds normal historical behavior. Heatmap zones, spike markers, and confluence conditions are used to visually emphasize moments of unusually strong activity that may represent heightened institutional participation, aggressive momentum expansion, or temporary liquidity imbalance.
In addition to standalone volume analysis, the script supports optional confirmation filters including EMA trend alignment, ATR expansion conditions, higher timeframe participation analysis, and relative volume filtering. These layers are designed to provide broader contextual alignment before signals become visible, helping reduce weaker market conditions where participation structure may lack consistency.
The higher timeframe module introduces an additional contextual layer by comparing current higher timeframe participation against its own historical average behavior. This helps users observe whether broader participation conditions are expanding or contracting while operating on lower execution timeframes. The script uses non-lookahead calculations to reduce misleading historical behavior as much as possible within Pine Script limitations.
The interface is designed as a full analytical environment rather than a minimal signal generator. Divergence structures, classification coloring, spike visualization, confirmation ribbons, confluence markers, RVOL heatmaps, and statistical dashboards all work together to provide layered insight into changing participation behavior across the chart.
Ultimate Volume Warfare is intended for educational and analytical chart-study purposes only. The script does not predict future market direction or guarantee trading performance. All signals and classifications should be interpreted within broader market context, liquidity conditions, volatility structure, and individual risk management practices.
Core Concept
The core concept behind Ultimate Volume Warfare is the idea that market participation often provides additional context beyond price movement alone. Instead of treating volume as a simple confirmation tool, the script approaches volume as a dynamic behavioral component that can be analyzed alongside volatility, structure, momentum, and multi-timeframe conditions to study how market activity evolves during different phases of price action.
The framework is built around the relationship between price swings and participation strength. The script continuously evaluates whether volume behavior is supporting, weakening, accelerating, or diverging from underlying price movement. By comparing confirmed pivot structures in both price and volume, the system attempts to identify areas where participation characteristics begin changing relative to market structure. This divergence-based methodology is designed to study the interaction between directional movement and participation intensity rather than attempting to forecast exact future outcomes.
A major part of the system focuses on contextual volume interpretation. Instead of using a single static threshold, the indicator separates participation into multiple behavioral categories such as climax activity, exhaustion behavior, absorption conditions, accumulation pressure, distribution pressure, and abnormal spike events. Each classification attempts to represent a different form of participation environment occurring inside the market. The objective is not to label market direction with certainty, but to help visualize how trading activity changes during expansion, compression, continuation, or reaction phases.
The script also emphasizes adaptive behavior rather than rigid calculations. Market volatility changes constantly across assets and timeframes, so the indicator uses ATR-sensitive normalization logic to dynamically adjust several internal thresholds. This allows participation conditions to scale differently during high-volatility expansion phases compared to quieter consolidation environments. By adapting to changing volatility structures, the system attempts to maintain analytical consistency across multiple market conditions.
Another foundational concept within the framework is confluence analysis. Instead of relying on a single event to generate chart signals, the indicator can combine multiple contextual layers such as divergence confirmation, relative volume expansion, higher timeframe participation state, volatility filters, EMA alignment, and spike activity. The goal of this layered structure is to provide broader analytical context around participation behavior rather than reducing market analysis to isolated signals.
The indicator also incorporates relative volume analysis to compare current activity against historical participation averages. This helps highlight areas where current market engagement exceeds normal conditions, which may indicate periods of stronger liquidity, increased attention, or temporary participation imbalance. Heatmap zones, spike markers, and confluence visuals are designed to make these changes easier to identify visually during active market conditions.
Higher timeframe participation analysis adds another contextual dimension to the system. By comparing higher timeframe volume against its own average conditions, the framework attempts to provide additional insight into whether broader market participation is expanding or declining while traders operate on lower execution timeframes. This multi-timeframe structure is intended to improve contextual awareness without relying solely on local chart activity.
The overall design philosophy of Ultimate Volume Warfare is centered around structured market observation rather than predictive certainty. The script is designed to organize complex participation behavior into a visual analytical environment where users can study the interaction between volume, volatility, and structure through multiple synchronized layers of confirmation and contextual filtering.
Because the system relies on confirmed pivot structures and historical participation calculations, certain signals may naturally appear after structural confirmation has occurred. This behavior is part of the confirmation-based methodology used throughout the framework and helps reduce unstable live-candle behavior that can occur when analyzing unfinished market structures.
Key Features — Ultimate Volume Warfare
Advanced Volume Classification Engine
The indicator uses a layered volume analysis system designed to separate normal market participation from abnormal activity. Instead of displaying raw volume alone, the script classifies volume behavior into multiple conditions such as Climax Volume, Exhaustion, Accumulation, Distribution, Absorption, and Spike Events. This allows traders to visually identify changing market participation and potential momentum transitions with greater clarity. The classification system dynamically adapts to volatility conditions, helping the indicator remain responsive across different assets and market environments.
Adaptive Volume Moving Average System
A customizable volume moving average is integrated to help smooth market activity and identify shifts in participation strength. Users can choose between a traditional SMA-based approach or an adaptive ALMA smoothing method for more responsive volume tracking. This adaptive behavior helps reduce unnecessary noise while still reacting efficiently during periods of increased market activity.
Volume Divergence Detection
The script includes a pivot-based divergence engine that compares price structure against volume structure. By monitoring the relationship between swing highs/lows and underlying participation strength, the indicator highlights both regular and hidden divergence conditions. These divergence signals are confirmation-oriented and rely on completed pivot structures, which helps reduce impulsive or premature signaling behavior.
Multi-Layer Signal Filtering
To improve signal quality, the indicator supports several optional filters including EMA trend filtering, ATR-based volatility filtering, volume threshold filtering, and higher timeframe confirmation logic. These filters allow users to align signals with broader market conditions rather than relying solely on isolated volume behavior. The layered filtering approach is designed to support structured analysis workflows across multiple trading styles.
Higher Timeframe Volume Analysis
The integrated MTF (Multi-Timeframe) system evaluates higher timeframe volume conditions alongside the active chart timeframe. This helps traders observe whether participation is expanding or declining on broader market structures. By combining local chart activity with higher timeframe volume context, the indicator attempts to provide a more balanced interpretation of market participation.
Relative Volume Heatmap Zones
The indicator contains an optional RVOL heatmap system that visually highlights periods where relative volume exceeds predefined thresholds. These zones help identify areas of increased participation, heightened volatility, or potential institutional activity. The heatmap acts as an additional contextual layer rather than a standalone trading trigger.
High Confluence Signal Detection
A specialized confluence system combines divergence conditions with advanced volume classifications such as spikes, absorption, and climax activity. When multiple internal conditions align simultaneously, the script highlights stronger confluence zones for additional visual awareness. This feature is intended to assist with market structure observation rather than guarantee directional outcomes.
Dynamic Visual Structure
The script includes extensive visual customization including adaptive colors, divergence lines, spike markers, chart overlays, confirmation ribbons, signal labels, and statistical tables. The design focuses on improving readability while allowing users to personalize the visual experience according to their workflow and charting preferences.
Real-Time Statistical Monitoring
Built-in statistical tables provide ongoing tracking of daily and weekly signal activity, volume distribution, relative volume values, and higher timeframe participation states. These panels are designed to help users monitor evolving market behavior directly from the chart without requiring separate tools or calculations.
Confirmation-Based Logic Design
The overall architecture prioritizes confirmation-oriented behavior rather than predictive forecasting. Many components rely on completed pivot structures, confirmed candle states, and finalized volume conditions before generating visual outputs. Because of this structure, some delay may naturally occur in signal plotting, particularly during divergence analysis. This behavior is expected and reflects the script’s emphasis on structural confirmation instead of instant projection.
How It Works — Ultimate Volume Warfare
The indicator works as a multi-layer volume intelligence system that combines raw volume, price structure, volatility, and higher-timeframe context into a single analytical framework. Instead of treating volume as a simple histogram, it reconstructs market behavior by classifying participation, detecting structural shifts, and validating signals through confirmations.
1. Volume Foundation Layer
At the core, the script continuously reads raw market volume and compares it against a 50-period average volume baseline. From this it calculates relative volume (RVOL), which becomes the foundation for most logic decisions. This step helps the system understand whether current activity is normal, elevated, or extreme compared to recent history.
2. Adaptive Volatility Normalization
Market conditions are not fixed, so the indicator adjusts sensitivity using ATR-based volatility scaling. When volatility expands, thresholds become more relaxed; when volatility contracts, thresholds become tighter. This prevents false signals during erratic or quiet market phases and keeps behavior consistent across different market regimes.
3. Volume Behavior Classification Engine
Each candle’s volume is categorized into behavioral states rather than just numbers:
Climax → Extremely high participation (possible exhaustion zones)
Absorption → High volume but limited price movement (smart money activity)
Exhaustion → Weak follow-through after heavy participation
Accumulation / Distribution → Directional pressure with controlled flow
Spike Events → Sudden abnormal participation bursts
This layer transforms raw volume into market intent interpretation.
4. Structure-Based Divergence System
The indicator uses pivot-based swing detection (confirmed highs and lows) to compare:
Price swings (structure)
Volume swings (participation)
If price makes a new extreme but volume fails to confirm (or reverses behavior), it generates:
Regular Divergence (trend weakening signals)
Hidden Divergence (continuation signals)
Because pivots require confirmation, signals appear only after structure completes, reducing noise but introducing slight delay.
5. Multi-Factor Filtering System
Before any signal becomes valid, it passes through multiple optional filters:
EMA Trend Filter → ensures signals align with overall trend
ATR Filter → ensures sufficient volatility for valid movement
Volume Filter → avoids low participation environments
Wick Logic (Accurate Mode) → confirms rejection behavior
HTF Filter → validates higher timeframe volume direction
This creates a confluence-based confirmation model, not a single-trigger system.
6. Signal Confirmation Engine
After divergence detection, signals are not immediately printed. They are validated through:
Volume classification (spike / absorption / climax alignment)
Filter alignment (trend + volatility + structure agreement)
Multi-timeframe confirmation (optional)
Only when multiple conditions agree, the system produces Buy/Sell labels and confluence stars.
7. Higher Timeframe Context Layer
The script optionally pulls volume data from a higher timeframe (like Daily). It compares:
Current volume trend (expanding or declining)
Higher timeframe volume state
This ensures signals are not isolated to a single timeframe and helps detect broader institutional participation shifts.
8. Visual Intelligence Layer
All internal logic is translated into:
Colored volume bars (based on classification)
Spike markers on chart and pane
Divergence lines between pivots
Confluence stars for strong setups
Heatmap zones for RVOL spikes
Stats table for session tracking
This layer turns complex logic into readable visual structure.
9. Confirmation-Based Philosophy
The entire system is built on one principle:
Nothing is predicted — everything is confirmed after structure completes.
Because of pivot confirmation and multi-condition validation, signals may appear slightly delayed, but they are structurally more reliable than real-time guessing systems.
Final Idea
In simple terms, this indicator works like a market behavior decoder:
It doesn’t just show volume — it interprets who is active, how strong they are, whether they are absorbing or pushing price, and whether the trend is supported or weakening, then confirms it using structure + filters + multi-timeframe agreement.
How It Works — Deep Core Logic (House Rules Safe)
This script is basically a volume-based market behavior engine that converts raw volume + price movement into structured trading intelligence. Instead of using simple indicators, it builds a full system that reads participation, pressure, and structural confirmation together.
1. Raw Data Foundation Layer
The system starts by continuously reading:
Volume (market participation)
Price (open, high, low, close)
Range behavior (high–low movement)
ATR (volatility baseline)
From this, it builds a foundation of how active the market is and how far price is moving for that activity.
2. Relative Volume Intelligence (RVOL Core)
It calculates:
Average volume (baseline)
Relative volume (current vs average)
This allows the system to classify whether the market is:
Normal activity
High participation
Unusual/institutional level activity
RVOL becomes the main pressure meter of the script.
3. Adaptive Volatility Control System
Instead of using fixed thresholds, the script adjusts sensitivity using volatility:
High volatility → loosens strictness
Low volatility → tightens strictness
This ensures the indicator does not overreact in choppy markets or underreact in fast trends.
This is what makes the system adaptive instead of static.
4. Volume Behavior Classification Engine
Each candle is analyzed and categorized into behavioral types:
Climax → Extreme activity, possible reversal pressure
Absorption → High volume but controlled price movement (hidden buying/selling)
Exhaustion → Weak follow-through after heavy activity
Accumulation → Quiet buying under pressure
Distribution → Quiet selling under strength
Spike Events → Sudden aggressive participation bursts
This converts raw volume into market intention mapping.
5. Pivot-Based Structure Detection
The system uses pivot logic (confirmed swing highs/lows):
Detects structural market points
Builds swing relationships
Waits for confirmation (not live guessing)
This is important because it ensures signals only appear when structure is completed, not during formation.
6. Volume vs Price Divergence System
This is one of the core engines:
It compares:
Price direction (higher highs / lower lows)
Volume behavior at those points
It detects:
Regular Divergence → trend weakening
Hidden Divergence → continuation strength
If price and volume disagree → it signals imbalance.
7. Multi-Factor Signal Filtering
Before any signal is allowed, it must pass filters:
EMA trend direction (trend alignment)
ATR movement strength (volatility validation)
Volume confirmation filter (participation check)
Wick rejection logic (price rejection strength)
Optional higher timeframe filter (market context)
This creates a confluence gate system.
If conditions don’t align → no signal.
8. Confluence Engine (Final Signal Decision Layer)
After divergence + classification + filters:
The system checks for alignment like:
Spike + divergence
Absorption + reversal structure
Climax + weak follow-through
When multiple conditions agree → it produces:
Buy / Sell labels
Confluence star signals
This is the final decision layer of the system.
9. Higher Timeframe Confirmation Layer (MTF Logic)
It optionally pulls higher timeframe volume:
Checks if volume is expanding or declining on higher TF
Aligns lower TF signals with broader trend context
This helps reduce false signals against the bigger trend.
10. Visual Interpretation Layer
Everything is converted into visual structure:
Colored volume bars (behavior-based)
Spike markers (sudden activity)
Divergence lines (structure mismatch)
Signal labels (buy/sell)
Confluence stars (strong setups)
Stats table (market session tracking)
This makes complex logic readable on chart.
Final Working Principle
At its core, the system works like this:
It does not predict price. It studies how volume behaves relative to structure, confirms conditions across multiple filters, and only then highlights high-probability market pressure zones.
Settings & Customization — Ultimate Volume Warfare
This script is built like a modular trading system, meaning every major component can be tuned depending on your trading style (scalping, intraday, swing). The settings are designed to control signal speed, accuracy, sensitivity, and visual clarity.
1. Signal Sensitivity Control (Core Behavior)
Signal Intensity (sigMode)
Accurate
Strict confirmation rules
Strong filters (wick + structure quality)
Fewer signals, higher reliability
Balanced (Default)
Middle ground between speed and accuracy
Best for most traders
Aggressive
Fast signals, early entries
More noise but earlier detection
👉 This is the main brain setting of the system.
divPivot (Structure Depth)
Controlled automatically by sigMode:
Accurate → deeper pivots (5)
Balanced → medium (3)
Aggressive → shallow (2)
👉 Higher pivot = more stable but slower signals
👉 Lower pivot = faster but noisier signals
2. Volume Behavior Customization
Volume Moving Average (maLength)
Controls smoothing of volume trend
Lower value → fast reaction (scalping)
Higher value → stable trend view (swing)
ALMA Toggle (useALMA)
ON → smoother, adaptive volume curve
OFF → standard SMA (simpler structure)
Volume Spike Multiplier (spikeMult)
Defines what is considered “abnormal volume”
Low value → more spike signals
High value → only extreme spikes
👉 Recommended:
Crypto → 2.0–2.5
Forex → 2.5–3.5
Stocks → 2.0–3.0
3. Volume Classification Control
These settings control how market behavior is labeled:
Climax Volume sensitivity
Absorption detection strength
Exhaustion filtering
Accumulation / Distribution recognition
👉 You don’t manually change thresholds here; instead, they react automatically using:
Average Volume (50 SMA)
Dynamic Volatility Multiplier (dynMult)
✔ This makes the system self-adjusting across market conditions
4. Trend & Filter System (Signal Protection Layer)
EMA Filter (useEmaFilter)
ON → trades only in trend direction
OFF → allows counter-trend signals
EMA Length (emaLen)
200 = strong trend filter (safe mode)
50–100 = faster trend detection
ATR Filter (useAtrFilter)
Ensures real market movement exists
Prevents signals in low volatility zones
ATR Multiplier (atrMult)
Low → more signals (sensitive)
High → stricter entry conditions
Volume Filter (useVolFilter)
Blocks weak participation signals
Helps avoid fake breakouts
5. Higher Timeframe Control (MTF Layer)
HTF Filter (useHTFFilter)
ON → only trade with higher timeframe volume direction
OFF → independent signals
HTF Resolution (htfRes)
D (Daily) → swing confirmation
4H → intraday trend filter
1H → scalping context
👉 This is your big picture alignment tool
6. Visual Customization (Chart Control Layer)
Volume Colors
Up Volume / Down Volume / Neutral
Custom spike colors
Classification colors (climax, absorption, etc.)
👉 Used for quick visual reading of market behavior
Spike Display Settings
Show spikes on volume pane
Show spikes on main chart
Show icon markers (diamond)
👉 Helps detect sudden institutional activity
Heatmap (RVOL Zones)
ON → highlights high activity zones
Sensitivity (rvolSens):
Lower = more zones
Higher = only extreme activity zones
7. Divergence System Control
showDiv
Enables/disables full divergence engine
Strength of Divergence Logic:
Based on pivot structure
Compares price swings vs volume swings
You can tune behavior indirectly via:
sigMode (accuracy vs speed)
divPivot (structure depth)
8. Signal Display Control
showSignals
Controls:
Buy/Sell labels
Entry markers
Visual Options:
Chart overlay signals
Pane signals
Confirmation stars (confluence)
👉 Helps switch between:
Clean chart mode
Full analysis mode
9. Statistics & Table System
showTable
Displays:
Daily buy/sell activity
Weekly trend bias
RVOL strength
MTF volume state
👉 Useful for:
Session monitoring
Market behavior tracking
Strategy validation
10. Recommended Presets (Practical Use)
🔹 Scalping Setup
Aggressive mode
Low divPivot
EMA filter OFF
HTF OFF
Spike sensitivity low
🔹 Intraday Setup (Best Balanced)
Balanced mode
EMA filter ON (100–200)
ATR filter ON
HTF (4H or D)
🔹 Swing Trading Setup
Accurate mode
EMA 200 ON
HTF Daily ON
Higher spike threshold
Strict ATR filter
Final Idea
This system is not a fixed indicator — it is a customizable volume intelligence framework.
You control:
Speed (Aggressive → Accurate)
Safety (filters)
Trend alignment (EMA + HTF)
Sensitivity (spikes + pivots)
Visual depth (signals + heatmap)
👉 In simple terms:
You are not just using an indicator — you are tuning a market behavior engine according to your strategy.
Mashup Rules & Combined System Logic — Deep Explanation (House Rules Safe)
This script is not a single indicator — it is a mashup system, meaning multiple independent trading models are merged into one unified decision engine. Each module works separately, but final signals only appear when multiple layers agree.
Think of it like a multi-department trading desk where every department must approve before a signal is released.
1. Core Mashup Structure (System Architecture)
The system is built from 5 main modules:
1. Volume Intelligence Module
Classifies raw volume into behavior types:
Climax
Absorption
Exhaustion
Accumulation / Distribution
Spikes
👉 This tells what kind of pressure is in the market
2. Price Structure Module (Pivot Engine)
Detects swing highs and swing lows
Builds market structure using confirmed pivots
Identifies:
Regular divergence
Hidden divergence
👉 This tells where the market structure is changing
3. Trend Filter Module (EMA System)
Checks overall market direction using EMA
Controls whether trades align with trend or against it
👉 This tells which side is dominant
4. Volatility Filter Module (ATR System)
Measures market movement strength
Blocks low-quality or weak movement conditions
👉 This tells whether market is active enough for signals
5. Multi-Timeframe Module (HTF Logic)
Reads higher timeframe volume trend
Confirms whether lower timeframe signals match bigger structure
👉 This tells whether the move is supported by broader market flow
2. Mashup Rule System (How Everything Combines)
The system follows a strict rule chain:
STEP 1 — Detection Phase
Each module generates raw conditions:
Volume detects pressure
Price detects structure shift
Trend detects direction
Volatility detects strength
HTF detects macro alignment
STEP 2 — Filtering Phase
All signals must pass filters:
EMA alignment check
ATR movement validation
Volume participation check
Wick rejection logic (optional strict mode)
HTF confirmation (if enabled)
👉 If even one major filter fails → signal is blocked
STEP 3 — Confluence Phase (Mashup Core)
This is where systems merge.
A valid signal requires at least 2–3 conditions aligning, such as:
Divergence + Spike
Absorption + Trend alignment
Climax + Weak continuation
Structure break + Volume surge
👉 This is the decision-making engine
STEP 4 — Confirmation Phase
Even after confluence:
Signal waits for candle confirmation
Pivot must be fully formed
No mid-candle prediction allowed
👉 This ensures no premature signals
3. Combined Logic (How Mashup Actually Works)
Final decision is based on:
BUY Logic Example:
Bullish divergence detected
AND
Volume shows absorption or spike
AND
Price is above EMA trend
AND
ATR confirms movement strength
AND
HTF is not bearish
✔ THEN → Buy signal appears
SELL Logic Example:
Bearish divergence detected
AND
Volume shows distribution or spike
AND
Price is below EMA trend
AND
Volatility is sufficient
AND
HTF is not bullish
✔ THEN → Sell signal appears
4. Conflict Handling System
If modules disagree:
Volume says bullish but structure says bearish → no trade
Trend bullish but divergence bearish → wait mode
HTF opposite direction → signal weakened or blocked
👉 This prevents random or emotional signals
5. Strength Levels (Confluence Ranking)
Signals are not equal:
Weak Signal
Only divergence OR only volume spike
Medium Signal
Divergence + trend alignment
Strong Signal
Divergence + spike + absorption/climax
High Confluence Signal ⭐
Multiple modules agree simultaneously
Marked with special star confirmation
6. Why This Mashup System is Powerful
Because it does NOT rely on one idea.
It combines:
Volume behavior (who is active)
Price structure (what is happening)
Trend direction (who is in control)
Volatility state (is market ready)
Higher timeframe context (big picture bias)
👉 So the system behaves like a multi-layer institutional analysis model
Final Summary
The mashup rule system works like this:
It first detects signals independently from volume, price, trend, volatility, and higher timeframe data — then it filters them, then merges them, and finally only allows signals when multiple independent confirmations align.
This is why it is called a confluence-based volume warfare system, not a simple indicator.
Final Note — Ultimate Volume Warfare
This script is designed as a multi-layer market behavior system, not a simple indicator. Its core strength comes from combining volume, price structure, volatility, trend direction, and higher timeframe context into one unified decision framework.
At its foundation, it does not attempt to predict the market. Instead, it waits for confirmation of behavior — meaning it only reacts when multiple independent conditions align. This makes the system more focused on structure and participation rather than noise or emotional price movement.
The divergence engine ensures that price and volume relationships are continuously compared, helping identify situations where the market is losing strength or building hidden continuation pressure. However, because it relies on pivot confirmation, signals are naturally delayed until structure is fully formed. This delay is intentional and represents a shift from prediction-based systems to confirmation-based logic.
The volume classification system adds another layer of intelligence by interpreting raw volume into meaningful market states such as absorption, climax, exhaustion, accumulation, and distribution. This allows traders to understand not just how much volume exists, but what that volume represents in terms of market intent.
On top of this, filters such as EMA trend alignment, ATR volatility validation, and optional higher timeframe confirmation act as protection layers. These filters ensure that signals are only displayed when market conditions are suitable, reducing low-quality setups and improving contextual accuracy.
The mashup architecture is what makes this system unique. Instead of relying on a single signal source, it combines multiple analytical engines that must agree before any trade signal is produced. This creates a confluence-based decision model, where signals represent agreement between different aspects of market behavior rather than isolated indicators.
In practical terms, this means the system prioritizes quality over quantity. Fewer signals may appear, but each one is backed by multiple confirmations across structure, volume, and trend alignment.
Overall, the indicator behaves like a structured market intelligence framework — designed to filter noise, highlight real participation shifts, and provide visually clear confirmation zones for decision-making.
In short: it is not a prediction tool, but a confirmation system that waits for multiple layers of market agreement before showing any trading signal.
Disclaimer — Ultimate Volume Warfare
This indicator is designed strictly for educational and informational purposes only. It is a technical analysis tool that interprets market data such as volume, price structure, volatility, and higher timeframe trends. It does not guarantee results, profits, or accuracy in any market condition.
All signals generated by this script — including buy/sell labels, divergence markers, spike detection, and confluence confirmations — are based on historical and real-time data calculations. These signals are not financial advice, not investment recommendations, and should not be considered as a directive to enter or exit any trade.
Because the system relies on pivot-based structure and confirmation logic, signals may appear with a natural delay. This delay is a known and expected behavior of confirmation-based systems and does not represent prediction capability. Market conditions can change rapidly, and past performance of any signal does not guarantee future outcomes.
The script also uses multiple analytical filters such as trend alignment, volatility checks, and higher timeframe volume comparison. These filters improve contextual accuracy but cannot eliminate market risk. No system is immune to false signals, unexpected volatility, slippage, liquidity gaps, or sudden news-driven movements.
Trading in financial markets involves a high level of risk, and users are fully responsible for their own decisions. You should only use this tool as part of a broader strategy that includes proper risk management, independent analysis, and personal judgment.
The creator of this script does not take responsibility for any financial losses, missed opportunities, or incorrect interpretations resulting from the use of this indicator.
In simple terms: this is a decision-support tool, not a prediction system, and all trading decisions remain entirely the responsibility of the user.
مؤشر

مؤشر

مؤشر

Sniper Alert Engine v6.5 BIG + STRONG by @prcdSniper Alert Engine v6.5 Big + Strong Market Bias by prcd
Overview
Sniper Alert Engine v6.5 Big + Strong Market Bias by prcd is a multi-layer momentum and market-bias indicator designed to help traders identify when the market is showing strong directional conditions and when those conditions develop into higher-quality expansion opportunities.
The indicator separates market context from trade alerts:
Strong Bull / Strong Bear = directional market bias and context.
Big Bull / Big Bear = premium momentum expansion signals.
Alerts are triggered only on Fresh Big Bull and Fresh Big Bear conditions.
Version 6.5 adds an optional RSI/MFI Hybrid Momentum Filter that combines price momentum and volume-supported money flow to improve signal quality.
Purpose
The purpose of this indicator is to help traders avoid treating every momentum move as equal.
Instead of simply plotting buy/sell signals, the script first identifies whether the market has a strong directional bias. It then waits for additional confirmation from:
Momentum
Trend strength
Volatility expansion
Relative volume
RSI/MFI hybrid momentum
Higher-timeframe alignment
Breakout quality
Room-to-run conditions
Extension control
The indicator is intended as a decision-support tool, not a standalone trading system.
Key Features
1. Strong Bull / Strong Bear Market Bias
The Strong layer identifies when market conditions are directionally aligned.
A Strong Bull condition looks for bullish alignment across:
Price above VWAP
Price above EMA
Rising EMA slope
Bullish MACD structure
RSI strength
ADX trend strength
Positive directional movement
Session filter confirmation
RSI/MFI hybrid momentum confirmation
A Strong Bear condition looks for the opposite bearish alignment.
These signals are shown on the chart and dashboard even when no Big signal is present.
2. Big Bull / Big Bear Premium Momentum Signals
The Big layer is more selective.
A Big Bull or Big Bear signal requires strong market bias plus additional confirmation from:
Higher-timeframe alignment
Compression-to-expansion behaviour
ATR expansion
MACD acceleration
Breakout through recent swing levels
Breakout quality relative to ATR
Relative volume confirmation
RSI/MFI hybrid momentum confirmation
Room to run
Not-too-extended filter
This makes Big signals less frequent but more selective than Strong conditions.
3. RSI/MFI Hybrid Momentum Filter
Version 6.5 introduces an optional hybrid momentum layer inspired by the idea of combining price momentum and money-flow momentum.
The hybrid momentum value averages:
RSI: price momentum
MFI: volume-supported money flow
This helps the indicator assess whether a move has both price strength and participation behind it.
The hybrid filter is used in two ways:
Strong layer: softer confirmation for market bias.
Big layer: stricter confirmation for premium expansion signals.
This filter can be switched on or off from the settings.
Momentum Signals Explained
Strong Bull
A Strong Bull state means bullish momentum and trend conditions are aligned.
This does not automatically mean “enter now”. It means the market context is bullish and traders may choose to focus only on long setups.
Example interpretation:
Strong Bull appears on the dashboard. The trader may now look for long continuation setups, pullbacks, or fresh Big Bull signals.
Strong Bear
A Strong Bear state means bearish momentum and trend conditions are aligned.
This does not automatically mean “enter now”. It means the market context is bearish and traders may choose to focus only on short setups.
Example interpretation:
Strong Bear appears on the dashboard. The trader may now look for short continuation setups, pullbacks, or fresh Big Bear signals.
Big Bull
A Big Bull signal is a premium bullish expansion condition.
It means the script has detected bullish bias plus stronger confirmation from volatility, trend, volume, breakout quality, higher-timeframe context, and RSI/MFI hybrid momentum.
Example interpretation:
The market is already in a Strong Bull context. Price breaks above a recent swing high with expansion, relative volume, hybrid momentum confirmation, and higher-timeframe confirmation. A Fresh Big Bull alert is triggered.
Big Bear
A Big Bear signal is a premium bearish expansion condition.
It means the script has detected a bearish bias, with stronger confirmation from volatility, trend, volume, breakout quality, higher-timeframe context, and an RSI/MFI hybrid momentum.
Example interpretation:
The market is already in a Strong Bear context. Price breaks below a recent swing low with expansion, relative volume, hybrid momentum confirmation, and higher-timeframe confirmation. A Fresh Big Bear alert is triggered.
Dashboard
The dashboard displays:
Current profile
Asset mode
Strong Bull status
Strong Bear status
Big Bull status
Big Bear status
Big Bull probability score
Big Bear probability score
RSI
MFI
Hybrid momentum
ADX
Relative volume
Higher-timeframe direction
EMA slope
Latest Bull SL / TP reference levels
Latest Bear SL / TP reference levels
Current state
The dashboard helps separate directional context from alertable momentum signals.
Profiles
The indicator includes three tuning profiles:
M1
Faster and stricter tuning for 1-minute trading.
M5
Slower and more patient tuning for 5-minute trading.
Custom
Allows the user to manually control the main input parameters.
Asset Modes
DAX40 (aka GER40)
Designed to be stricter and more fakeout-aware.
Adjustments include:
Higher ADX threshold
Higher relative volume requirement
More breakout quality required
Slightly more room-to-run required
Slightly stricter hybrid momentum requirements
NASDAQ100
Designed for smoother momentum behaviour.
Adjustments include:
Slightly looser ADX threshold
Slightly lower relative volume requirement
Slightly looser breakout conditions
Slightly more flexible hybrid momentum requirements
Generic
Neutral default mode for broader use.
How to Use
A simple workflow:
Choose the correct profile: M1, M5, or Custom.
Choose the correct asset mode: DAX40, NASDAQ100, or Generic.
Use Strong Bull / Strong Bear as directional context.
Use Big Bull / Big Bear as premium expansion signals.
Use the dashboard to confirm RSI, MFI, hybrid momentum, ADX, relative volume, HTF direction, and current state.
Use plotted SL / TP levels as reference levels, not guaranteed outcomes.
Alert Setup Examples
Option 1: Static TradingView Alert Conditions
To create a standard alert:
Add the indicator to your chart.
Click Alerts.
Select this indicator as the condition.
Choose either:
Fresh Big Bull
Fresh Big Bear
Set frequency to:
Once Per Bar Close
These alerts use the built-in alertcondition() messages.
Option 2: Dynamic Alert Messages
For richer alerts containing asset mode, profile, probability, close, SL, TP1, TP2, relative volume, and hybrid momentum:
Add the indicator to your chart.
Click Alerts.
Under condition, select this script.
Choose:
Any alert() function call
Set frequency to:
Once Per Bar Close
Dynamic Big Bull and Big Bear alert messages include:
Asset mode
Profile
Probability score
Close price
Stop loss reference
Target 1 reference
Target 2 reference
Relative volume
Hybrid momentum value
Important Notes
This indicator does not predict the future and does not guarantee profitable trades.
Signals should be used with:
Risk management
Market structure analysis
Session awareness
Spread and slippage awareness
Personal trading rules
Backtesting and forward testing
The plotted SL and TP levels are reference levels only.
The indicator is intended for educational and analytical use. It should not be considered financial advice. مؤشر
