Guassian Filtered TEWMA - [JTCAPITAL]Guassian Filtered TEWMA - is a modified way to use Gaussian filtering, Weighted Moving Averages (WMA), Triple Exponential Moving Averages (TEMA), and a dual-length averaging structure for Trend-Following.
The indicator is designed to create a smoother representation of market direction by processing price through multiple layers of smoothing. Instead of relying on a single moving average, the script first applies a Gaussian filter to the selected price source, then builds two separate TEWMA calculations using different lengths, averages those two calculations together, and finally applies another Gaussian filter to the combined result.
The result is a visually smooth trend-following structure that attempts to reduce short-term price noise while retaining the underlying directional movement of the market.
The indicator does not use future price data in its calculations. The BUY and SELL labels are generated when the detected direction changes from bullish to bearish or from bearish to bullish.
The indicator works by calculating in the following steps:
Price Source Selection
The script begins with the selected price source, which is set to Close by default. TradingView's input.source allows the user to select another available price series if desired.
This selected source becomes the raw input for the first Gaussian filtering stage.
The purpose of beginning with a configurable source is to allow the smoothing process to be applied to different representations of price rather than forcing the entire calculation to use only the closing price.
First Gaussian Filter
The selected price source is passed through a custom Gaussian filter.
The Gaussian filter looks backward over a user-defined number of bars, controlled by the Length parameter. For every historical bar inside this window, the script calculates a Gaussian weight using the following mathematical relationship:
Weight = exp(-0.5 * (i / Sigma)^2)
Here, i represents how many bars back the calculation is looking, while Sigma controls how quickly the weighting decreases as the calculation moves further into the past.
The current bar receives the largest weight because i = 0 . As the script moves further backward, the Gaussian weight becomes progressively smaller.
Each historical source value is multiplied by its corresponding Gaussian weight. These weighted values are then added together and divided by the total sum of all weights.
In simplified form:
Gaussian Filter = Sum(Source × Weight) / Sum(Weight)
This produces a weighted average where more recent data has greater influence than older data.
Unlike a simple moving average, where every observation inside the window receives the same weight, the Gaussian filter gradually reduces the influence of older observations.
This makes the first filtering stage useful for reducing short-term fluctuations before the data enters the TEWMA calculations.
Defining the Primary TEWMA Length
The script defines a primary TEWMA length using the Length input.
By default, this value is 84 .
This length is used as the basis for the first TEWMA calculation and determines how much historical information is incorporated into that moving average structure.
A larger value generally produces a slower and smoother response, while a smaller value generally produces a faster and more responsive response.
Creating the Secondary TEWMA Length
The script does not simply use one TEWMA length.
Instead, it creates a second length by multiplying the primary length by the Multi parameter.
The calculation is:
Secondary Length = Primary Length × Multi
With the default settings:
84 × 1.75 = 147
The result is then rounded to the nearest whole number because moving-average lengths must be integer values.
Therefore, the default secondary length is 147 .
This creates two different trend speeds: one relatively faster TEWMA and one slower TEWMA.
Weighted Moving Average Calculation
The first TEWMA structure begins by calculating a Weighted Moving Average of the Gaussian-filtered source.
The WMA gives greater importance to more recent observations and progressively less importance to older observations inside its calculation window.
This provides another layer of directional smoothing while maintaining more responsiveness to recent price changes than a simple moving average would normally provide.
The WMA therefore forms the first stage of each TEWMA calculation.
Triple Exponential Moving Average Calculation
After calculating the WMA, the script passes that result through TradingView's TEMA function.
TEMA stands for Triple Exponential Moving Average .
TEMA is designed to reduce the lag that can occur with conventional moving averages by combining multiple exponential moving-average calculations.
Conceptually, a TEMA can be represented as:
TEMA = 3 × EMA1 - 3 × EMA2 + EMA3
where EMA1 is the first exponential moving average, EMA2 is an EMA of EMA1, and EMA3 is an EMA of EMA2.
In this script, TEMA is applied to the WMA output rather than directly to raw price.
This creates the TEWMA structure used by the indicator.
Fast TEWMA
The first complete TEWMA calculation uses the primary Length .
The calculation can therefore be represented conceptually as:
TEWMA1 = TEMA(WMA(Gaussian-filtered source, Length), Length)
With the default parameters, the Gaussian-filtered source is first processed with an 84-period WMA and that result is then processed through an 84-period TEMA.
The purpose is to combine the weighting characteristics of WMA with the lag-reduction characteristics of TEMA.
Slow TEWMA
The second TEWMA uses the calculated secondary length.
The calculation is:
TEWMA2 = TEMA(WMA(Gaussian-filtered source, Secondary Length), Secondary Length)
With the default settings, the secondary length is 147.
Because this calculation uses a longer period, TEWMA2 generally reacts more slowly to changes in price than TEWMA1.
This gives the indicator two different representations of the underlying trend.
Dual TEWMA Averaging
The two TEWMA calculations are then combined using an arithmetic average:
TEWMA = (TEWMA1 + TEWMA2) / 2
The script uses math.avg to perform this calculation.
This is an important part of the indicator's structure.
Instead of allowing the shorter TEWMA or longer TEWMA to independently determine the final trend representation, both are given equal weight.
The faster TEWMA contributes responsiveness, while the slower TEWMA contributes additional stability.
Averaging them creates an intermediate representation between the two trend speeds.
Second Gaussian Filter
After the two TEWMA calculations are averaged, the resulting TEWMA is passed through the Gaussian filter again.
This creates the final Gaussian series.
The second Gaussian filtering stage further smooths the already-smoothed TEWMA structure.
The resulting sequence is therefore:
Price Source → Gaussian Filter → WMA → TEMA → TEWMA1
and simultaneously:
Price Source → Gaussian Filter → WMA → TEMA → TEWMA2
The two TEWMAs are then averaged:
TEWMA1 + TEWMA2 → Average TEWMA
and finally:
Average TEWMA → Gaussian Filter → Final Gaussian Trend Line
This multi-stage architecture is the central concept of the indicator.
Trend Direction Detection
Once the final Gaussian-filtered TEWMA has been calculated, the script compares its current value with its previous value.
The bullish condition is:
Gaussian > Gaussian
If the current Gaussian value is higher than the previous bar's value, the indicator considers the trend to be bullish.
The bearish condition is:
Gaussian < Gaussian
If the current Gaussian value is lower than the previous bar's value, the indicator considers the trend to be bearish.
Therefore, the trend direction is determined by the slope of the final Gaussian-filtered TEWMA , rather than by a price crossing a traditional moving average.
Persistent Trend State
The script uses a persistent variable called Signal to maintain the current trend state.
A bullish condition sets:
Signal = 1
A bearish condition sets:
Signal = -1
Because the variable is declared using var , its previous value is retained until a new bullish or bearish condition updates it.
This creates a persistent binary trend state:
1 = Bullish
-1 = Bearish
This state is subsequently used to determine the colors of the plotted lines and to identify actual transitions between bullish and bearish conditions.
Trend Visualization
When the signal is bullish, the script uses the defined BullColor .
When the signal is bearish, the script uses the defined BearColor .
The same trend state is applied to the Gaussian line, both TEWMA lines, and the averaged TEWMA line.
This means the entire indicator structure changes color together when the detected trend direction changes.
The visual design therefore allows the user to identify the current directional state without having to inspect the numerical values of the individual calculations.
BUY Signal Detection
A BUY label is only created when the persistent signal changes from bearish to bullish.
The condition is:
Signal > 0 and Signal < 0
This means the indicator must have been bearish on the previous bar and bullish on the current bar.
The BUY label is therefore not printed on every bullish bar.
Instead, it is printed only at the transition from a bearish state to a bullish state.
The label is positioned using the lowest value among the four primary plotted lines:
Gaussian
TEWMA
TEWMA1
TEWMA2
This places the BUY label below the lowest part of the indicator structure for that bar.
SELL Signal Detection
The SELL condition works in the opposite direction.
A SELL label is created when:
Signal < 0 and Signal > 0
This means the previous bar was bullish while the current bar is bearish.
Like the BUY label, the SELL label is only generated at a trend-state transition.
The SELL label is positioned using the highest value among the Gaussian line, TEWMA, TEWMA1, and TEWMA2.
This places the SELL label above the highest part of the indicator structure.
Buy and Sell Conditions:
The indicator's directional logic is deliberately straightforward.
Bullish Trend
A bullish trend is detected whenever the final Gaussian-filtered TEWMA is rising compared with the previous bar.
Gaussian > Gaussian
When this condition occurs, the persistent signal state becomes 1 , and the indicator structure is displayed using the bullish color.
Bearish Trend
A bearish trend is detected whenever the final Gaussian-filtered TEWMA is falling compared with the previous bar.
Gaussian < Gaussian
When this condition occurs, the persistent signal state becomes -1 , and the indicator structure is displayed using the bearish color.
BUY Label
A BUY label is only generated when the signal changes from:
Bearish → Bullish
This prevents a BUY label from appearing on every bar during an already-established bullish trend.
SELL Label
A SELL label is only generated when the signal changes from:
Bullish → Bearish
This similarly prevents repeated SELL labels during an established bearish trend.
It is important to understand that these labels represent changes in the calculated trend direction . They are not entries generated by a backtested strategy, and the indicator does not calculate position size, stop-loss levels, take-profit levels, risk/reward ratios, or trade performance.
The script also does not contain an additional momentum, volume, volatility, or market-regime filter. The signal is determined specifically by the direction of the final Gaussian-filtered TEWMA.
Features and Parameters:
* Source - Selects the price series used as the initial input. The default source is Close.
* Gaussian Length - Determines how many historical bars are included in each Gaussian filtering calculation. The default is 30.
* Sigma - Controls the shape and decay of the Gaussian weighting function. The default is 6.0. Higher values make the weighting decay more gradually, allowing older observations to retain more influence. Lower values concentrate the weighting more strongly toward recent observations.
* TEWMA Length - Defines the primary length used by the first WMA and TEMA stages. The default is 84.
* Multi - Multiplies the primary TEWMA length to create the second TEWMA length. The default is 1.75.
* Secondary TEWMA Length - Automatically calculated as the primary length multiplied by Multi and rounded to the nearest integer. With the default settings, this produces 147.
* TEWMA1 - The faster of the two TEWMA calculations.
* TEWMA2 - The slower of the two TEWMA calculations.
* TEWMA - The arithmetic average of TEWMA1 and TEWMA2.
* Final Gaussian - A second Gaussian-filtered version of the averaged TEWMA and the primary trend line used for determining direction.
* Trend Coloring - All major plotted lines use the same bullish or bearish color according to the current Signal state.
* BUY Labels - Appear when the calculated trend state changes from bearish to bullish.
* SELL Labels - Appear when the calculated trend state changes from bullish to bearish.
* Visual Ribbon - The script uses filled areas beneath the Gaussian, TEWMA1, TEWMA2, and averaged TEWMA lines to create a layered visual representation of the trend structure.
Specifications:
Gaussian Filter
A Gaussian filter is a weighted smoothing method based on the Gaussian, or normal, distribution.
Instead of assigning identical importance to every observation in the lookback window, the Gaussian filter gives the most recent observation the greatest weight and progressively reduces the influence of observations further in the past.
In this script, the Gaussian weighting is calculated using:
Weight = exp(-0.5 × (i / Sigma)^2)
The weighted observations are then normalized by dividing their weighted sum by the total sum of the weights.
This normalization is important because it ensures that the output remains on a comparable price scale rather than simply becoming the sum of the weighted observations.
The Gaussian filter is used twice in this indicator.
The first application smooths the selected price source before it enters the TEWMA calculations.
The second application smooths the averaged TEWMA after both trend calculations have been combined.
This creates a multi-stage smoothing architecture in which the raw price is progressively transformed into a smoother representation of directional movement.
Gaussian Length
Gaussian Length determines the number of historical observations included in each Gaussian filter.
With a default value of 30, the filter examines the current observation and the preceding 29 observations.
Increasing the length expands the historical window and can produce a smoother result.
Reducing the length shortens the window and generally allows the filter to respond more quickly to changes in price.
Length therefore represents the time window over which the Gaussian smoothing is performed.
Sigma
Sigma controls the distribution of the Gaussian weights.
The weighting function is:
exp(-0.5 × (i / Sigma)^2)
When Sigma increases, the weight decreases more slowly as the calculation moves backward through history.
Consequently, older observations retain more relative influence.
When Sigma decreases, the weight falls more rapidly, concentrating more of the calculation around recent observations.
Sigma therefore controls the shape of the smoothing kernel , while Length determines the size of the historical window.
These two parameters work together rather than independently.
Weighted Moving Average (WMA)
A Weighted Moving Average assigns progressively different weights to observations within its lookback period.
Recent observations receive greater importance than older observations.
Compared with an SMA, this allows the average to react more strongly to recent changes in the underlying series.
The WMA is used here after the initial Gaussian filtering.
This means the WMA does not operate directly on raw price. It operates on an already-smoothed price series.
The combination therefore uses two different weighting mechanisms: Gaussian weighting in the first stage and WMA weighting in the TEWMA construction.
Triple Exponential Moving Average (TEMA)
TEMA stands for Triple Exponential Moving Average.
It is designed to reduce some of the lag associated with traditional moving averages by combining three levels of exponential averaging.
Conceptually:
EMA1 = EMA(Source)
EMA2 = EMA(EMA1)
EMA3 = EMA(EMA2)
and:
TEMA = 3 × EMA1 - 3 × EMA2 + EMA3
The subtraction terms help compensate for some of the lag introduced by repeated exponential smoothing.
In this indicator, the TEMA is applied to the WMA output, creating the TEWMA structure.
TEWMA
TEWMA in this script refers to the combination of a Weighted Moving Average followed by a Triple Exponential Moving Average.
The basic structure is:
Gaussian Filter → WMA → TEMA
This is not simply a conventional moving average. It is a layered smoothing process.
The Gaussian filter reduces short-term fluctuations first.
The WMA then applies recency-weighted averaging.
The TEMA subsequently processes the WMA output with a lag-reduction-oriented exponential structure.
The resulting TEWMA therefore combines several different approaches to smoothing and weighting price data.
Dual-Length TEWMA Structure
One of the defining characteristics of this indicator is that it does not rely on one TEWMA.
It calculates two.
TEWMA1 uses the primary length.
TEWMA2 uses a longer length determined by the Multi parameter.
The shorter calculation is generally more responsive to directional changes, while the longer calculation incorporates a broader historical window and therefore generally changes more slowly.
Combining these two speeds creates a balance between responsiveness and stability.
Multi
The Multi parameter controls the relationship between the two TEWMA lengths.
The calculation is:
Secondary Length = Primary Length × Multi
For example, with a primary length of 84 and Multi of 1.75:
84 × 1.75 = 147
This means the user can control the separation between the faster and slower TEWMA without manually entering two separate lengths.
A larger Multi creates a larger difference between the two smoothing speeds.
A smaller Multi brings the two TEWMA lengths closer together.
Averaged TEWMA
After TEWMA1 and TEWMA2 are calculated, the script takes their arithmetic mean:
TEWMA = (TEWMA1 + TEWMA2) / 2
This gives both TEWMA calculations equal influence.
The purpose is to prevent the final intermediate trend representation from depending exclusively on either the faster or slower calculation.
The averaged TEWMA acts as a central representation between the two trend speeds.
Second Gaussian Smoothing Stage
The averaged TEWMA is passed through another Gaussian filter.
This creates the final Gaussian series that drives the trend-state calculation.
The second Gaussian stage is particularly important because the TEWMA average has already combined two different smoothing speeds.
Applying Gaussian smoothing afterward further reduces short-term fluctuations in that combined signal.
The final result is therefore substantially more processed than the original price source.
Slope-Based Trend Detection
The indicator does not determine direction using a price crossover.
Instead, it evaluates whether the final Gaussian series is increasing or decreasing.
Rising Gaussian = Bullish
Falling Gaussian = Bearish
This makes the indicator fundamentally a slope-based trend detector .
The actual numerical distance between price and the trend line is not used for determining the signal.
The critical variable is whether the final filtered series is moving upward or downward from one bar to the next.
Persistent Signal State
The Signal variable stores either 1 or -1.
A value of 1 represents bullish direction.
A value of -1 represents bearish direction.
This persistent state is what allows the script to distinguish between an ongoing trend and an actual transition.
For example, if the indicator remains bullish for 20 consecutive bars, it does not generate 20 BUY labels.
Instead, the BUY label is generated when the state changes from -1 to 1.
Likewise, a SELL label is generated only when the state changes from 1 to -1.
Trend Colors
The script defines a bullish blue color and a bearish purple color.
The same color state is applied to the Gaussian line, TEWMA1, TEWMA2, and the averaged TEWMA.
This makes the indicator function visually as a unified trend structure rather than presenting each component as an independently colored indicator.
Indicator Ribbon
The script creates filled regions underneath each of the four main lines.
The visible upper boundary is the respective indicator line, while the lower boundary is calculated as:
Indicator Value × 0.9
This creates a visual area beneath each line.
These fills are primarily a visualization feature . The 0.9 multiplication does not participate in the trend calculation, signal generation, or Gaussian filtering.
The BUY and SELL logic is based on the actual Gaussian and TEWMA values, not on these filled areas.
Highest and Lowest Values
The script calculates:
Lowest = minimum of Gaussian, TEWMA, TEWMA1, and TEWMA2
and:
Highest = maximum of Gaussian, TEWMA, TEWMA1, and TEWMA2
These values are used only to determine the vertical placement of the BUY and SELL labels.
The lowest value is used for BUY labels so that they appear beneath the indicator structure.
The highest value is used for SELL labels so that they appear above the indicator structure.
These calculations do not influence the actual trend state.
Why Combine Gaussian Filtering, WMA, and TEMA?
The main purpose of combining these calculations is to approach the problem of trend detection from several different smoothing perspectives.
A single moving average can be relatively sensitive to price fluctuations or relatively slow depending on its length.
The Gaussian filter introduces a smooth, gradually declining weighting structure.
The WMA places greater emphasis on recent observations.
The TEMA introduces a different smoothing mechanism designed to reduce some of the lag associated with repeated exponential averaging.
By combining these methods sequentially, the indicator does not depend on one type of smoothing alone.
The first Gaussian filter reduces noise before the TEWMA calculations begin.
The WMA emphasizes more recent information.
The TEMA processes that weighted series through a multi-stage exponential structure.
Two different TEWMA lengths then provide two different trend speeds.
Averaging those two speeds creates an intermediate trend representation.
Finally, a second Gaussian filter smooths that combined result.
The overall architecture can therefore be summarized as:
Price → Gaussian Filter → Dual WMA/TEMA → Average → Gaussian Filter → Trend Direction
The objective is not to predict the future price with certainty. Instead, the design attempts to produce a smoother representation of directional movement that can make broader trend changes easier to observe.
Why Use Two TEWMA Speeds?
The use of two TEWMA lengths provides a balance between responsiveness and stability.
The shorter TEWMA reacts more quickly to changes in the filtered source.
The longer TEWMA reacts more slowly and incorporates a larger historical window.
If only the shorter calculation were used, the trend representation could react more quickly but would also be more exposed to short-term fluctuations.
If only the longer calculation were used, the resulting trend representation would generally be more stable but slower to respond to changes.
Averaging the two creates a middle ground.
This is one of the central design choices of the indicator.
Why Apply Gaussian Filtering Twice?
The first Gaussian filter operates on the source before the TEWMA calculations.
Its role is to prepare the input by reducing short-term fluctuations before the moving-average calculations are performed.
The second Gaussian filter operates after the two TEWMAs have been averaged.
Its role is different: it smooths the final combined trend representation.
Using the filter at both stages creates a layered smoothing process rather than relying on one smoothing operation.
How to Use the Indicator
The indicator can be used primarily as a visual trend-following tool.
When the plotted structure is bullish in color and the final Gaussian line is rising, the calculated trend state is bullish.
When the plotted structure is bearish in color and the final Gaussian line is falling, the calculated trend state is bearish.
The BUY label identifies the transition into a bullish state.
The SELL label identifies the transition into a bearish state.
Users can use these transitions as potential points of interest for further analysis.
However, the indicator should be interpreted within the context of the market, timeframe, and instrument being analyzed. A trend-following calculation can naturally react differently during persistent trends compared with sideways or highly volatile conditions.
Understanding the Parameters
Length controls the Gaussian lookback window.
Sigma controls the distribution of Gaussian weights.
TEWMA Length controls the primary WMA/TEMA smoothing period.
Multi controls the relative distance between the faster and slower TEWMA.
Increasing the Gaussian Length generally increases the amount of historical data included in the filtering process.
Increasing Sigma generally spreads the Gaussian weighting more broadly across the available lookback window.
Increasing the TEWMA Length generally creates a slower and smoother trend representation.
Increasing Multi increases the difference between the two TEWMA speeds.
There is no universally optimal combination of these parameters. Different markets, instruments, and timeframes can exhibit substantially different price behavior, so users should evaluate parameter choices according to their own application.
Limitations and Important Considerations
This indicator is a trend-following tool and should not be interpreted as a prediction mechanism.
Because the script uses several layers of smoothing, changes in the final trend line can occur after the underlying price movement has already begun.
This is an inherent characteristic of smoothing-based trend indicators. More smoothing can reduce short-term fluctuations, but it can also make the resulting trend representation less responsive to sudden price changes.
Conversely, reducing the smoothing parameters can make the indicator respond more quickly while potentially exposing the trend state to more short-term fluctuations.
The BUY and SELL labels should therefore not be interpreted as guaranteed trade entries or exits.
The script is an indicator , not a TradingView strategy . It does not calculate historical strategy performance, win rate, profit factor, drawdown, position sizing, commissions, slippage, stop-losses, take-profit levels, or risk/reward ratios.
No performance or accuracy claims are made by this publication.
The indicator also does not contain a volume filter, volatility filter, momentum filter, market-regime filter, or higher-timeframe confirmation mechanism. The directional state is determined specifically by the slope of the final Gaussian-filtered TEWMA.
The Gaussian filter uses historical indexing based on the selected Length . Consequently, the available historical data and Pine Script's historical-reference limitations can affect how large the Gaussian Length can practically be set on a chart.
As with any moving-average-based calculation, insufficient historical bars can also result in unavailable values during the initial portion of a chart until enough data exists to perform the required calculations.
The script does not intentionally reference future bars. Its Gaussian filter uses the current bar and historical bars only.
On a realtime, still-forming candle, however, the current source value can change as new ticks arrive. Because the final trend calculation depends on the current bar's value, the current trend state and any signal condition can change while the realtime candle is still forming. Users should therefore distinguish between an evolving realtime bar and a confirmed historical bar.
What Makes This Indicator Different?
The purpose of this script is not simply to combine unrelated indicators.
Its components are directly connected to a single objective: constructing a smoother trend representation.
The Gaussian filter is used to reduce noise.
The WMA introduces recency weighting.
The TEMA processes the weighted series through a multi-stage exponential structure.
Two TEWMA lengths provide different trend speeds.
The two TEWMAs are averaged to create a combined trend representation.
A second Gaussian filter smooths that combined representation.
Finally, the slope of that final series determines the bullish or bearish state.
The combination therefore has a specific architectural purpose rather than being a collection of unrelated indicators.
The indicator's core concept can be summarized as:
Smooth the source → build two trend speeds → combine them → smooth the combined trend → detect its direction.
In Summary
Guassian Filtered TEWMA - is a multi-stage trend-following indicator built around a combination of Gaussian filtering, Weighted Moving Averages, Triple Exponential Moving Averages, and dual-length trend calculations.
The process begins by smoothing the selected price source with a Gaussian filter.
The filtered source is then processed through two separate WMA-to-TEMA structures using different lengths.
The resulting TEWMA1 and TEWMA2 calculations are averaged together.
That average is passed through a second Gaussian filter to produce the final trend line.
The script then compares the current final Gaussian value with its previous value.
A rising final Gaussian represents a bullish trend state.
A falling final Gaussian represents a bearish trend state.
When the state changes from bearish to bullish, a BUY label is generated.
When the state changes from bullish to bearish, a SELL label is generated.
The resulting indicator is therefore designed to provide a visually smooth representation of directional market movement while retaining two different underlying trend speeds within the calculation.
As always, the indicator should be evaluated in the context of the instrument, timeframe, market conditions, and the user's broader analysis rather than being treated as a standalone guarantee of future price direction.
Enjoy!
Индикатор

Macro Supersector Matrix & Stock Alignment Dashboard** Overview:
The "Macro Supersector Matrix & Stock Alignment Dashboard" is an intermarket analysis tool designed for swing traders and portfolio managers looking to track institutional capital flows across major US market sectors.
Instead of monitoring 11 individual ETF charts, this dashboard groups the S&P 500 sectors into "3 Core Supersectors" and dynamically tracks whether your current charted asset is aligned with broader market health.
** Core Mechanics & Supersector Architecture:
1. Growth / Risk-On Supersector:
- Aggregates **XLK** (Technology), **XLY** (Consumer Discretionary), and **XLC** (Communications).
2. Economic Cyclicals Supersector:
- Aggregates **XLF** (Financials), **XLI** (Industrials), **XLB** (Materials), and **XLE** (Energy).
3. Defensive / Safe-Haven Supersector:
- Aggregates **XLV** (Healthcare), **XLP** (Consumer Staples), **XLU** (Utilities), and **XLRE** (Real Estate).
** Key Features:
- Institutional Volume Filter (🔥 Symbol): Highlights when sector movement is supported by above-average daily volume (SMA 20), indicating institutional participation rather than low-volume drift.
- Dynamic Stock Mapper: Automatically identifies the sector for mega-cap stocks (e.g., AAPL, NVDA, TSLA, JPM, LLY) and compares their intraday performance against macro sector flows.
- Macro Health Bias (0-100%): Weighted quantitative score determining whether current market broad-breadth conditions favor long or short swing trades.
- Pine Script v6 Codebase: Fully optimized with consolidated multi-timeframe requests to ensure fast loading times and zero repainting. Индикатор

Dealer Gamma Regime Proxy** Overview:
The "Dealer Gamma Regime Proxy" provides a quantitative estimation of Market Maker / Dealer Gamma Exposure (GEX) dynamics by evaluating structural volatility compression and expansion cycles.
In options markets, Dealer Gamma position dictates how market makers hedge their underlying Delta:
- Long Gamma (+GEX): Dealers trade *against* the trend (buying dips, selling rallies), suppressing market volatility and creating mean-reverting environments.
- Short Gamma (-GEX): Dealers trade *with* the trend (selling into drops, buying into rallies), accelerating price moves and increasing volatility.
** Key Features & Methodology:
1. Volatility Ratio Proxy:
- Compares short-term ATR (14) against its long-term baseline SMA (50).
- Long Gamma Regime (Green Overlay): ATR is below baseline. Indicates volatility suppression, tight consolidations, or steady upward grinds.
- Short Gamma Regime (Red Overlay): ATR spikes above baseline. Indicates market maker delta-hedging acceleration, breakout potential, or heightened risk of sharp liquidations.
2. Integrated VWAP Bands:
- Plots Session VWAP alongside standard deviation bands to serve as high-probability mean-reversion targets during Long Gamma regimes.
3. Institutional Real-Time Dashboard:
- Displays current regime status, volatility ratio, and tactical execution environment directly on your chart overlay.
** Practical Applications:
- Long Gamma Environments (Green): Favor mean-reversion setups, grid trading, and buying VWAP band bounces.
- Short Gamma Environments (Red): Favor trend-following breakouts, momentum trades, and wider stop-losses due to increased volatility.
- Asset Compatibility: Highly effective for options-heavy assets including S&P 500 (ES1! / SPY), Nasdaq 100 (NQ1! / QQQ), and Mega-Cap Equities (AAPL, TSLA, NVDA). Индикатор

Quantitative Monthly Seasonality Dashboard** Overview
The "Quantitative Monthly Seasonality Dashboard" is an advanced statistical overlay designed to evaluate calendar anomalies, historical performance metrics, and volatility filters for swing traders and portfolio managers.
Instead of relying solely on traditional seasonal tendencies (e.g., "Sell in May"), this indicator calculates a multi-factor **Quant Score (0-100)** by cross-referencing historical monthly win rates, profit factors, average returns, and current daily market volatility.
** How It Works
1. Historical Month Backtest: Evaluates the current calendar month across a user-defined historical lookback period (default: 20 years).
2. Key Metrics Evaluated:
- Win Rate (%): Historical percentage of positive-closing months.
- Profit Factor: Gross gains divided by gross losses for the specified month.
- Average Return (%): Expected mean return for the month.
3. Volatility Expansion Filter (Bollinger Bandwidth): Measures 20-day daily Bollinger Bandwidth to ensure the market is in an expansion/trending regime rather than a low-volatility squeeze.
4. Proprietary Quant Score (0-100): Combines and normalizes all quantitative metrics into a single rating score:
- Eligible (Long): Triggers when the asset passes win rate, profit factor, and volatility thresholds.
- Flat / No Trade: Indicates insufficient historical edge or suppressed volatility.
---
** Features & Capabilities:
- Non-Repainting Logic: Uses strict `lookahead_off` multi-timeframe requests to preserve backtest accuracy without forward bias.
- Real-Time Month Tracker: Monitors current live month returns against historical benchmarks.
- Customizable Thresholds: Fully adjustable win rate requirements, profit factor filters, and historical lookback windows.
** Best Practices:
- Top-Down Filter: Apply on Daily or Monthly charts across major indices (SPY, ES1!, QQQ), Commodities (USOIL, XAUUSD), and Mega-Cap Stocks.
- Macro Alignment: Combine this seasonal quantitative score with order flow tools or macro regime indicators to build high-probability multi-timeframe strategies. Индикатор

Institutional Breadth & Momentum Panel (ADD & TICK)** Overview
The **Institutional Breadth & Momentum Panel (ADD & TICK)** is a specialized real-time order flow and intermarket dashboard designed for intraday traders operating index futures (ES, NQ, YM, RTY) and major equities.
Rather than relying on traditional lagging momentum oscillators, this tool combines two core market internal metrics directly from the New York Stock Exchange (NYSE):
1. NYSE TICK ( USI:TICK ): Measures institutional aggression and order flow pressure in real time.
2. NYSE Advance-Decline Line ( USI:ADD ): Tracks broad-market participation and overall underlying market health.
** Key Components
1. NYSE TICK (Histogram)
The TICK measures the net difference between stocks trading on an uptick versus a downtick across the entire market.
- Institutional Buying Surge (+1000 Threshold):** Highlighted in solid green. Indicates aggressive institutional buying, short squeezes, or strong breakout momentum.
- Institutional Selling Panic (-1000 Threshold):** Highlighted in solid red. Indicates institutional liquidation, stop sweeps, or strong downward pressure.
- Neutral / Rotation Zone:** Softly colored histogram tracking intraday balance between buyers and sellers.
2. NYSE ADD (Orange Line)
The Advance-Decline Line provides top-down confirmation of market direction:
- An ascending ADD confirms that price rallies are backed by broad-market participation.
- A flat/descending ADD during price rallies signals divergence and potential exhaustion.
** Key Features:
Pine Script v6 Codebase: Clean, non-repainting execution utilizing historical closed bars (`close `) for intermarket symbol requests to guarantee backtest accuracy without lookahead bias.
- Built-In Alerts:** Integrated alert conditions triggered when the NYSE TICK crosses extreme institutional thresholds ($\pm 1000$).
- Customizable Symbols:** Allows custom data feed tickers (`USI:ADD`, `INDEX:ADD`, etc.) to fit your specific market data provider settings.
** Best Practices & Practical Application:
- Intraday Execution: Optimized for 1-minute, 5-minute, and 15-minute timeframes on E-mini S&P 500 (ES1!), Nasdaq (NQ1!), and SPY/QQQ.
- Breakout Confirmation:** Use extreme TICK readings (+1000 / -1000) to confirm key level breakouts.
- Exhaustion Trades:** Look for extreme TICK spikes occurring at key daily support/resistance levels to identify high-probability mean-reversion setups.
Индикатор

Signal Pro 6.1Signal Pro 6.1 — Trend Structure, ARSI Market State, and Volatility Breakout Engine
Signal Pro 6.1 is a fully customizable trend analysis and signal engine designed to help traders identify directional momentum, avoid non trending environments, and adapt the indicator to any instrument or timeframe. It combines moving average trend structure, ARSI based market state detection, and Bollinger volatility breakouts to produce a clear, technical view of bullish, bearish, and neutral conditions.
How the Signal Engine Works
Signal Pro 6.1 uses three independent components to validate BUY and SELL signals:
1. Trend Structure (MA1 vs MA2)
Directional bias is determined by two customizable moving averages:
• Bullish Trend: MA1 > MA2
• Bearish Trend: MA1 < MA2
This ensures signals only occur in the direction of momentum.
2. ARSI Market State (Bullish / Bearish / Neutral)
ARSI determines the underlying market condition:
• Bullish State: ARSI > Overbought threshold
• Bearish State: ARSI < Oversold threshold
• Neutral State: Between thresholds
ARSI is a hard filter:
• BUY signals require bullish ARSI background
• SELL signals require bearish ARSI background
• Neutral zones block all trades
This ARSI methodology is inspired by LuxAlgo’s adaptive momentum research.
3. Volatility Breakout (Outer Bollinger Band)
Signals require a volatility expansion:
• BUY: close > upper2
• SELL: close < lower2
This prevents signals during compression and improves trend reliability.
Signal Logic (Matches the Code Exactly)
BUY Signals
Generated only when:
• MA1 > MA2
• ARSI is bullish (background green)
• Close breaks above the outer Bollinger band (close > upper2)
• BUY labels enabled
• In session
• No active position
SELL Signals
Generated only when:
• MA1 < MA2
• ARSI is bearish (background red)
• Close breaks below the outer Bollinger band (close < lower2)
• SELL labels enabled
• In session
• No active position
EXIT Signals
Exits are based on price crossing MA1:
• Long Exit: close < MA1
• Short Exit: close > MA1
This keeps exits responsive and avoids lag.
Recommended Default Settings (Based on Author Back Testing)
These settings provide a balanced, responsive structure suitable for most markets:
ARSI Settings
• ARSI Length: 10 (acceptable range 10–14)
• ARSI Signal Length: 3 (acceptable range 3–8)
• ARSI Overbought: 60 (acceptable range 50–70)
• ARSI Oversold: 40 (acceptable range 30–50)
Moving Averages
• MA1: EMA 8
• MA2: EMA 13
• MA3: EMA 50
• MA4: EMA 200
• MA5: EMA 500
These values create a clear trend hierarchy and help visually confirm directional bias.
Trend Alignment and MA Stacking
Although the indicator generates signals automatically, traders should also pay attention to the broader trend structure. Strong trends often show:
• EMA 8 > EMA 13 > EMA 50 > EMA 200 (bullish stacking)
• EMA 8 < EMA 13 < EMA 50 < EMA 200 (bearish stacking)
When moving averages are stacked cleanly and fanning out, trend strength is high. When they compress or cross repeatedly, the market is entering a range and signals become less reliable.
Signal Pro intentionally reflects this visually: trending markets appear clean and aligned, while range bound markets become noisy. This is a built in warning system.
Customization Is Required
Signal Pro 6.1 is not intended to be used “out of the box.” It is a modular system that must be configured for the specific instrument, timeframe, and trading objective.
Users can customize:
• Moving averages (type, length, visibility)
• Bollinger Bands (inner/outer, multipliers, lengths)
• ARSI thresholds and methods
• Background shading
• Candle colors
• Trend colors
• Session windows
• BUY/SELL/EXIT label visibility
• Momentum circles
• Chart clutter level
Because of this flexibility, the indicator may not look correct until properly tuned. Once configured, it becomes a stable and reliable trend clarity tool.
Versatility Across Markets
With correct settings, Signal Pro 6.1 can be used for:
• Futures scalping
• 0DTE options
• Intraday stock trading
• Swing trading
• Crypto
• Forex
There are no restrictions on where it can be applied. The key is adjusting the session window, timeframe, and indicator parameters to match the behavior of the chosen market and back testing accordingly.
Summary
Signal Pro 6.1 combines trend direction, ARSI market state, and volatility breakout logic to highlight high probability directional moves and warn against trading in non trending environments. Every component — moving averages, bands, colors, signals, and market state filters — is fully customizable, allowing traders to adapt the indicator to any market or timeframe.
Индикатор

Macro Regime Engine - Institutional DashboardEnglish Description:
The "Macro Regime Engine" is an institutional-grade quantitative tool designed to identify market regimes using cross-asset intermarket dynamics.
Rather than relying on traditional lagging technical indicators, this dashboard evaluates the Volatility-Adjusted Momentum Score (VAMS) across six key financial pillars: Equity Markets, Crypto Assets, Energy/Commodities, the US Dollar, Volatility, and Interest Rates.
** How It Works:
The engine applies a non-repainting VAMS calculation across six major intermarket assets:
1. **S&P 500 (SPX)** - Equity Growth
2. **Bitcoin (BTCUSDT)** - High-Beta / Liquidity Appetite
3. **WTI Crude Oil (USOIL)** - Inflationary Pressures / Demand
4. **US Dollar Index (DXY)** - Global Liquidity & Dollar Strength
5. **CBOE Volatility Index (VIX)** - Market Risk Perception
6. **10-Year Treasury Yield (US10Y)** - Cost of Capital & Rates Environment
Based on a voting mechanism, the indicator classifies the market into 4 primary economic regimes:
- Goldilocks (Green): Stable growth, low volatility. Optimal environment for equities and long positions.
- Reflation (Blue): Economic expansion with moderate price increases. Bullish bias.
- Inflation (Orange): Rising commodity and yields pressure. Caution and position reduction recommended.
- Deflation (Red): Spiking volatility and broader market contraction. Risk-off regime.
** Key Features:
- Non-Repainting Logic: Uses closed-bar data (`close `) for intermarket requests to ensure historical accuracy without lookahead bias.
- **Regime Confirmation Filter:** Implements a confirmation threshold to filter out short-term market noise (whipsaws).
- **Customizable Dashboard:** Fully customizable visual table overlay and background regime highlighting.
** Best Uses:
Optimized as a top-down contextual filter for S&P 500 Futures (ES1!), SPY, NQ1!, and BTC. Use this dashboard to align your tactical short-term setups with the broader macro regime.
Индикатор

RvDiv Regular Divergence (Daily)Rv-Div — Regular Divergence (Daily)
Rv-Div marks confirmed regular divergences on the daily chart and draws the line that connects them, so you can see the structure the signal is based on instead of trusting an arrow.
**What it does**
A bullish divergence is price making a lower low while the oscillator makes a higher low: price is still falling, but with less force behind it. A bearish divergence is the mirror image — a higher high in price against a lower high in the oscillator.
Rv-Div marks the exact candle that confirms the divergence, draws the line between the two pivots it used, and can fire an alert.
**The problem it solves**
Most divergence tools compare each new pivot against the immediately previous one. That works until a small wrinkle appears between the two lows that actually matter — and then the line gets drawn between the wrinkle and the new low instead of between the two real lows. The divergence you see on screen is not the one your eye would have drawn.
Rv-Div compares each new pivot against the last N pivots, not just the previous one, and keeps the one that forms a valid divergence. That is what the eye does: connect the two lows that matter, skipping the noise in between.
It also spends each anchor. Without that, one old pivot gets reused against every new pivot that appears, and you end up with several lines fanning out from the same point — the same divergence counted three or four times, which inflates any count you make of them. Here, once an anchor is used it is discarded along with everything older.
**Quality filters**
Not every pair of pivots deserves to be called a divergence. Four filters, all adjustable:
- Minimum price difference between the two extremes, measured in ATR, so it travels across symbols and volatility regimes instead of using a fixed percentage.
- Minimum difference between the two oscillator pivots.
- Both oscillator pivots on the correct side of zero.
- Minimum and maximum bar separation between the two pivots.
**Settings**
Three oscillators to choose from — Awesome Oscillator, MACD histogram, and a linear-regression momentum. All three are public-domain formulas.
The pivot definition (bars to the left and right), the quality filters, the two EMAs, the colours, the label size and the line width are all adjustable. The default values are the ones I use on the daily chart.
**How to use it**
Daily chart only. The indicator says so on screen if you load it on any other timeframe.
Set alerts to **Once per bar close**. A forming candle keeps changing until it closes, and a divergence is not confirmed until then.
**Dropping to a lower timeframe to confirm**
The signal is a daily signal, but you do not have to take it blind on the daily close. Once the daily marks the entry, drop to 4h and wait for a break of the local high followed by a pullback — or go from 4h down to 1h and look for the same thing. You give up a little of the move in exchange for not entering into a candle that is still falling.
This is deliberately not built into the indicator. It is a judgement call, and judgement calls belong to the trader, not to a script that has to work the same way on every symbol and every market.
**What it does not do**
It does not manage exits. It marks an entry candle and nothing else — no targets, no stops, no position sizing. Those decisions are yours.
It is not a standalone system. A divergence tells you that momentum is fading, not that the trend has turned. What you do with that information is where your own judgement goes.
**About the confirmation delay**
A pivot does not exist until the required bars have closed to its right, so the signal arrives with that delay. This is deliberate. Removing it would mean signalling on unconfirmed pivots, which look excellent in hindsight and vanish in real time.
Historical signals do not repaint: once a pivot is confirmed, it stays confirmed. The forming candle is the only thing that can change, which is why alerts should be set to bar close.
---
**Español**
Rv-Div marca divergencias regulares confirmadas en gráfico diario y dibuja la línea que las une, para que veas la estructura en la que se apoya la señal en lugar de fiarte de una flecha.
Una divergencia alcista es el precio haciendo un mínimo más bajo mientras el oscilador hace un mínimo más alto: sigue cayendo, pero con menos fuerza detrás. La bajista es la imagen espejo.
La diferencia con la mayoría de detectores de divergencia está en el trazado. Casi todos comparan cada pivote nuevo con el inmediatamente anterior, y en cuanto aparece una arruga entre los dos suelos que de verdad importan, la línea sale mal dibujada. Rv-Div compara contra los últimos N pivotes y se queda con el que forma la divergencia válida — que es lo que hace el ojo. Además consume cada ancla, así que un mismo pivote antiguo no se reutiliza una y otra vez generando varias líneas en abanico desde el mismo punto.
Cuatro filtros de calidad ajustables (diferencia mínima de precio en ATR, diferencia mínima del oscilador, ambos pivotes del lado correcto del cero, y separación mínima y máxima), tres osciladores a elegir, y todo el aspecto configurable.
Solo diario. Alertas configuradas como "Una vez por barra al cerrar".
**Bajar a una temporalidad menor para confirmar.** La señal es del diario, pero no hace falta tomarla a ciegas en el cierre diario. Cuando el diario marca la entrada, se puede bajar a 4h y esperar una ruptura del máximo local con su retroceso — o de 4h bajar a 1h y buscar lo mismo. Se cede un poco del movimiento a cambio de no entrar en una vela que todavía viene cayendo. Esto no está metido en el indicador a propósito: es criterio del operador, y el criterio no se le delega a un script que tiene que funcionar igual en todos los símbolos.
No gestiona salidas ni es un sistema completo: marca la vela de entrada y nada más. Una divergencia dice que el impulso se está agotando, no que la tendencia ya giró.
El retraso de confirmación es deliberado: un pivote no existe hasta que cierran las velas que lleva a su derecha. Quitarlo significaría señalar sobre pivotes sin confirmar, que se ven perfectos en el pasado y desaparecen en vivo. Las señales históricas no repintan. Индикатор

Multi-Factor Reversal Confluence All-in-One█ OVERVIEW
Multi-Factor Reversal Confluence is a single decision object that looks for exhaustion-and-turn REVERSALS by making five orthogonal detectors agree through one staged lifecycle — WATCH → ARMED → EXTREME → CONFIRMED — filtering every call through two gates, and then grading its own conviction against how those calls have actually resolved on THIS chart. Two things its category usually skips: gating (a trend-defense that will not fade a series with no equilibrium to revert to, and a turbulence veto that will not fade an active, intensifying volatility cascade — the two dominant ways reversal tools get run over), and honest self-calibration (conviction is mapped to a probability by a non-parametric isotonic fit of predicted→realized, and the "proven" badge uses an out-of-sample, uniqueness-weighted, multiple-testing-deflated Wilson lower bound versus a matched base rate — so a thin or edgeless sample says so plainly). Everything is computed internally from price and volume; there is no input.source wiring, no external symbol, and no request.security.
█ HOW IT WORKS
Five independent signals, each on a 0–100 signed scale (+ = bottom / − = top), each naming its method:
1. INSTABILITY (prior) — a Wasserstein-1 (earth-mover) distance between the most recent window of returns and the window before it (matched sorted order-statistics), volatility-normalized and ranked as a percentile of its own history. A rising distance = the return distribution is changing shape — variance, skew OR tail — i.e. a system losing stability and a reversal PRIOR. Shape-complete (it catches a fattening tail that a moment-by-moment read misses) and direction is set opposite the prevailing drift.
2. CHANGEPOINT (trigger) — a Student-t Bayesian Online Changepoint Detector (run-length posterior with a hazard prior) plus a CUSUM mean/variance break, resolved into a drift-turn direction. This is the TRIGGER that a regime actually broke.
3. EXHAUSTION (gate) — a real trend (efficiency ratio above a floor over the slow horizon) whose fast efficiency is now COLLAPSING while price is stretched (displacement percentile), optionally boosted by absorption (high volume, little progress) and a panic-range read. The GATE that the move is spent.
4. CLIMAX (extreme) — a volume-z (time-of-day-normalized on intraday), an expansion-range-z, a close-rejection wick and an order-flow delta from Bulk-Volume Classification (buy fraction = the normal CDF of the standardized return — a principled signed delta, not a close-location proxy). The composite must clear its own conformal online (1−α) quantile, so "extreme" means a calibrated ~α-rare event on this symbol; a secondary-test state machine then only confirms once a lower-volume retest holds the extreme.
5. STRUCTURE (confirm) — a liquidity sweep of a confirmed swing pivot followed by a displacement break back through it (≥ a × ATR), which also sets the stop. The CONFIRM.
Mean-reversion / regime gate (the trend-defense) — every fire is filtered by how mean-reverting the tape is right now, on a 0–1 scale from two orthogonal reads: the reversion-trust correlation (the rolling correlation of prior deviation-from-mean with the NEXT return — strongly negative means price is actively reverting) and a Lo-MacKinlay variance ratio (VR(q) < 1 = mean-reverting, ≈ 1 = random walk, > 1 = trending). An optional Dickey-Fuller unit-root test adds a formal stationarity requirement. The gate scales conviction and, below a floor, blocks the fire outright — so the engine does not fade a trend, the single largest source of false tops and bottoms.
Turbulence gate (the falling-knife defense) — large moves are treated as a point process and their Fano factor (variance/mean of the shock count) gives a self-exciting Hawkes branching ratio on a 0–1 scale. When that ratio is high AND still rising, the move is self-feeding — so conviction is scaled down and, below a floor, the fire is blocked. It stops the engine from fading an accelerating cascade, and it releases as the cascade rolls over. The two gates multiply into one combined guard shown on the dashboard.
Lifecycle & fusion — the engine ARMs only when at least N of the five agree on a direction, each above its own threshold, within an expiry window; climax promotes it to EXTREME, a structure break to CONFIRMED (the default actionable tier). Conviction fuses the supporting signals correlation-aware: the instability and changepoint pair is down-weighted by their measured rolling correlation (a Kish-style redundancy discount) so two views of the same thing don't double-count, then scaled by the mean-reversion gate.
Location (absorption shelf) — the five signals answer "is a turn forming?" but not "where?". A built-in occupation-time (dwell) profile answers that internally, with nothing to wire: a fixed-tick price grid accumulates how long price has dwelt at each level (a reversible ring buffer that adds the entering bar and subtracts the bar leaving the window), and the nearest bin whose dwell is a high fraction of the busiest bin — below and above price — is the support / resistance shelf. A reversal that fires AT a shelf on the correct side earns a bounded conviction boost. It is self-contained (no request.security). Optionally, set Location to "External link" instead and wire the four source inputs to a published Absorption Shelf's EXP_ outputs to use that fuller engine.
Calibration — every actionable fire is resolved a fixed horizon later against a ± target (× ATR): did price reach the target in the signalled direction? Raw conviction is mapped to a probability by a beta warm-start that hands over to a non-parametric ISOTONIC (Pool-Adjacent-Violators) fit of predicted→realized once enough outcomes resolve, and is shrunk toward 50% until the sample is sufficient — so a shown 70% actually resolves ~70% on this symbol. Bottom and top hit-rates are tracked separately, each with a Wilson lower bound, versus a direction-matched unconditional base rate. The "proven" badge is deliberately strict: it uses an out-of-sample slice, weights overlapping fires by their uniqueness (effective-N, not raw n), and raises the Wilson z (Bonferroni-style) for the several signals and two sides being tested; a Net-R after cost is shown so the edge reflects something tradeable, not gross.
█ HOW TO USE
Read the dashboard top-down: the STATE (WATCH / ARMED / EXTREME / CONFIRMED) and the direction, then the calibrated conviction (a ✓ means the edge is proven out-of-sample), then the combined gate, then the stop. The gate row (regime·turbulence) is the defense layer: "reverting" means fades are in-context, "trend/random" or "cascade!" means the engine is holding back. Pro adds a Flow · turbulence row (signed BVC order-flow delta and the branching ratio) and a Location row (shelf status). Choose your actionable tier (Armed / Extreme / Confirmed) in the inputs — the default is Confirmed, which fires only after the structure break for the fewest, highest-precision signals; Extreme and Armed are earlier and noisier. A diamond marks a confirmed fire (it brightens with conviction and dims while the sample is still learning); a small triangle marks the earlier EXTREME stage. On a confirmed fire the tool draws the Entry, Stop and two targets (TP1/TP2 at R-multiples of the stop) as labelled lines, and a tag at the arrow showing direction and calibrated conviction. A faint grey wash means the engine is standing aside (a trend/random regime or an active cascade) — that is the gates working, not a fault. A small on-chart legend explains the marks; all of these visuals are toggle-able in the Chart-visuals inputs. The calibration is the honest layer: until the sample clears the minimum it reads "learning", and it shows each side's Wilson-bounded hit-rate against its base rate rather than a bare number — a low or below-base read is information, not a malfunction. The structure signal confirms a swing-length number of bars AFTER the pivot by design, so treat it as confirmation, not a pivot-bar entry. Switch Dashboard detail to Pro for the raw conviction, the per-side hit-rate table, the out-of-sample edge with Net-R and effective-N, and the per-engine peak-strength diagnostic. Needs volume — run it on a volume-bearing symbol (index futures work well). Horizon and sizing are yours; it places no orders.
█ INPUTS
1 · Instability — returns window for the Wasserstein distributional-shift, drift lookback.
2 · Changepoint — observation window, z winsorise, hazard, Student-t d.o.f., prior pseudo-count, P(change) fire threshold, emerging-drift lookback.
3 · Exhaustion — ER fast / slow, trend floor, displacement lookback, stretch percentile, absorption + panic boost.
4 · Climax — volume/range baseline, volume-z and range-z thresholds, time-of-day normalization + rate, close-rejection threshold, CVD window, secondary-test window and retest-volume fraction, BVC order-flow delta toggle, conformal "extreme" rarity (α and adaptation rate).
5 · Structure — swing length, break displacement (× ATR), sweep→break window.
6 · Fusion & lifecycle — per-stage thresholds, minimum agreeing signals to ARM, expiry window, actionable tier (default Confirmed), the P1↔P2 redundancy factor and data-driven decorrelation window.
7 · Calibration — resolve horizon, target move (× ATR), minimum sample, beta rate, isotonic recalibration, warm-up shrink samples, in-sample fraction, proven-z (deflated), round-trip cost.
9 · Mean-reversion gate — require a mean-reverting regime, reversion-trust window, variance-ratio window and q, block-fire floor, optional Dickey-Fuller stationarity with its window and critical t.
10 · Turbulence gate — veto fades during a volatility cascade, shock threshold (× σ), shock sub-window, Fano window, cascade level to start vetoing, veto strength, block-fire floor.
11 · Location (absorption shelf) — enable; shelf source (Internal built-in dwell profile, default / External link); internal dwell lookback, bin size (× ATR) and hot-shelf fraction; the four external sources (used only in External mode); near-shelf tolerance (× ATR), absorbing-strength threshold, conviction multiplier at a confirmed shelf.
12 · Chart visuals — trade-level overlay (TP1/TP2 R-multiples, level length), signal label, conviction-graded markers, stand-aside tint, on-chart legend and position, draw linked shelf.
13 · Style — theme (Dark / Light), Bottom / Top colours, background tint, markers, dashboard show and detail (Compact default / Pro).
█ HONESTY & LIMITATIONS
This is a study, not a strategy. The conviction and hit-rates are descriptive statistics on visible history with no execution costs — not a backtest and not a probability your next trade works; the out-of-sample slice and Net-R make the "proven" badge stricter but it remains an in-sample-history read. Volume-derived signals (climax, CVD, absorption) need real volume and abstain or weaken on symbols without it. Non-repaint by construction: all five signals resolve on confirmed values, the structure signal uses swing pivots that confirm several bars late (a deliberate lag, not a repaint), the mean-reversion gate, the turbulence gate, the conformal quantile, the state machine and the calibration read only committed bars, and the isotonic map / out-of-sample statistics are built once per bar for display and never feed the fire — set alerts to "Once Per Bar Close". The optional Dickey-Fuller gate runs a windowed regression loop; leave it off (default) if you want the lightest compute. When the sample is small the calibration shrinks toward 50% and reads "learning", and a hit-rate below its base rate is shown honestly rather than hidden. No edge shown = honest, not broken.
█ ORIGINALITY
One coherent reversal object, not five indicators stacked. The original contribution is the staged lifecycle in which five DIFFERENT statistical lenses (Wasserstein distributional-shift, Bayesian changepoint, efficiency exhaustion, a conformal-rare volume/BVC climax, and liquidity-sweep structure) must agree in sequence, all filtered by two orthogonal gates — a mean-reversion regime gate so the engine refuses to fade a trend, and a Hawkes self-excitation gate so it refuses to fade an accelerating cascade — fused with an explicit redundancy discount so correlated views don't double-count, and — the part most reversal tools omit — a conviction that is isotonically calibrated to the chart's own resolved outcomes and gated by an out-of-sample, uniqueness-weighted, multiple-testing-deflated Wilson lower bound against a matched base rate. Each detector exists only to feed that single verdict and its stop; none is presented as a standalone signal. It carries a compact built-in occupation-time shelf for price-location confirmation (or can consume an external Absorption-Shelf's exports), keeping it one self-contained tool. Every block was written from scratch.
█ CREDITS
Bayesian Online Changepoint Detection — Adams & MacKay (2007); Student-t predictive. CUSUM — Page (1954). Wasserstein-1 / optimal transport (earth-mover distance) — Kantorovich. Variance ratio — Lo & MacKinlay (1988). Unit-root test — Dickey & Fuller (1979); Ornstein-Uhlenbeck. Efficiency ratio — Kaufman. Bulk-Volume Classification / VPIN order-flow — Easley, López de Prado & O'Hara. Self-exciting branching processes (Fano factor) — Hawkes (1971). Conformal / adaptive online quantiles — Vovk; Angelopoulos, Candès & Tibshirani. Cumulative Volume Delta / effort-vs-result absorption — order-flow literature. Liquidity sweep & displacement — order-flow / market-structure practice. Beta / logistic calibration — Platt (1999); Kull, Silva Filho & Flach. Isotonic regression / Pool-Adjacent-Violators — Ayer et al. (1955). Uniqueness weighting & two-barrier forward test — López de Prado. Design-effect / effective sample — Kish (1965). Wilson score interval — Wilson (1927). Code written from scratch; no external script reused.
This script is for analysis and education. It is not financial advice.
Индикатор

Price Gravity Research Engine [Effort & Displacement]Price Gravity Research Engine (PG-RE) is a market-state research indicator designed to measure how much normalized market effort is being consumed relative to the amount and efficiency of price movement that effort produces.
The core idea is simple:
Price becomes mechanically “heavy” when substantial effort produces little or inefficient displacement, and “light” when price travels efficiently with comparatively little resistance.
Rather than generating traditional buy/sell signals, PG-RE is built to describe the current movement environment .
Who it is for: PG-RE is especially suited to discretionary intraday, price-action, and market-structure traders who want a regime/context layer for distinguishing clean repricing from inefficient, effort-heavy travel.
What the engine measures
PG-RE evaluates three primary components:
1) Effort
Market activity is normalized relative to its expected baseline.
When usable volume is available, volume is used as the primary effort source.
A range-based activity proxy can be used as an alternative.
On intraday charts, PG-RE can normalize effort by time of day , helping prevent the open or close from being classified as abnormal simply because raw activity is naturally higher during those periods.
2) Displacement
Net price movement over the Gravity Window is measured using log returns and normalized against recent volatility.
This asks:
Has price actually traveled a meaningful distance relative to what volatility would normally imply?
3) Path Efficiency
PG-RE compares net displacement with the total path traveled over the same window.
A direct move has high path efficiency .
A back-and-forth move with little net progress has low path efficiency .
The Gravity model
PG-RE combines normalized effort, volatility-adjusted displacement, and path efficiency into one mechanical measure called Price Gravity .
In practical terms:
more effort with less progress tends to increase gravity
inefficient, rotational travel tends to increase gravity
strong, efficient displacement tends to reduce gravity
efficient movement achieved with relatively little effort represents lighter travel
Gravity is then interpreted relative to its own recent distribution , making PG-RE a regime tool , not a fixed-value oscillator.
It is designed to answer:
“How difficult is it for price to move right now, and is that difficulty changing?”
not:
“Should I buy or sell this bar?”
What is different about PG-RE
Rather than evaluating activity, volatility, or directional movement independently, PG-RE treats their relationship as the object of measurement.
Its primary output is therefore not momentum or volume itself, but the changing amount of normalized effort associated with efficient versus inefficient price travel.
Mechanical states
PG-RE classifies the current environment into several descriptive states:
PRESSURE
Elevated effort is producing unusually weak displacement while travel remains inefficient and gravity is building. Elevated activity is producing little clean progress.
VACUUM ↑ / ↓
Price is producing unusually strong and efficient displacement with comparatively low effort. Movement is encountering relatively little resistance.
ACTIVE REPRICING ↑ / ↓
Both effort and displacement are elevated while travel remains efficient. Price is moving materially and activity is substantial.
DRAG ↑ / ↓
A directional move remains underway, but gravity is increasing while path efficiency remains below the high-efficiency threshold. Progress is becoming mechanically heavier.
LIGHT TRAVEL ↑ / ↓
Displacement is strong and efficient while overall gravity is unusually low.
DEAD ROTATION
Effort and displacement are subdued while travel remains inefficient, producing little directional progress.
RELEASE ↑ / ↓
A recent high-gravity environment is followed by sharply easing gravity while path efficiency improves. Resistance that had previously constrained movement is dissipating.
NEUTRAL
No stronger mechanical condition currently dominates.
Reading the dashboard
PRICE GRAVITY
Current mechanical state.
WEIGHT
Whether gravity is currently HEAVY , NORMAL , or LIGHT relative to its recent distribution.
CHANGE
Whether gravity is BUILDING , STABLE , or EASING .
TRAVEL
Whether price movement is DIRECT , MIXED , or ROTATIONAL .
EFFORT
Whether normalized activity is HIGH , NORMAL , or LOW .
BALANCE
A directional asymmetry proxy combining close-location-weighted effort with cumulative upward versus downward path travel.
Important:
UPSIDE HEAVIER is not a bullish label, and DOWNSIDE HEAVIER is not a bearish label.
UPSIDE HEAVIER means the upward-side gravity proxy is relatively heavier than the downward-side proxy.
DOWNSIDE HEAVIER means the downward-side gravity proxy is relatively heavier than the upward-side proxy.
BALANCE should be interpreted as a relative resistance proxy , not as a direct measurement of buying/selling pressure or order flow.
Direction and gravity should therefore be interpreted separately.
How I use it
PG-RE works best as a market-structure context layer .
I primarily look for transitions between conditions such as:
HEAVY + BUILDING + ROTATIONAL
effort is being consumed without clean travel
LIGHT + DIRECT ↑/↓
price is traveling efficiently with relatively low gravity
PRESSURE → RELEASE
a previously constrained auction begins converting effort into cleaner movement
ACTIVE REPRICING → DRAG
a strong move remains active, but its mechanical efficiency is deteriorating
VACUUM → rising gravity
a low-resistance move begins encountering more opposition
Practical notes
PG-RE is adaptive and distribution-relative, so a “high” reading in one market or timeframe does not need to equal a “high” reading somewhere else in raw-value terms.
The current live bar can evolve as price, range, and volume develop.
The indicator contains no buy/sell labels and makes no forecast claim.
PG-RE measures model-implied movement difficulty from price, volatility, and volume/range data. It does not directly measure order-book liquidity, executed aggressor flow, or physical market resistance.
A warm-up period is required before distribution-relative states become available.
Its purpose is to structure the relationship between effort, displacement, path efficiency, and changing market resistance within one coherent framework.
Quick Use Guide
Start with PRICE GRAVITY and WEIGHT to judge whether the market is mechanically heavy, normal, or light.
Check CHANGE to see whether gravity is building, stable, or easing.
Use TRAVEL to separate direct movement from churn.
Use EFFORT to judge how much participation is present behind the move.
Use BALANCE to identify directional asymmetry in relative resistance.
Treat states as context , not trade arrows.
Индикатор

Psychological Levels + PDH/PDL + PWH/PWLPsychological Levels + PDH/PDL + PWH/PWL
This professional indicator combines three of the most powerful key zone concepts in Forex trading into one clean, fully customizable tool. Instead of using multiple separate indicators, you get psychological price levels, Previous Day High/Low and Previous Week High/Low all in one place — perfectly designed for confluence-based trading strategies.
📊 What's included:
🔘 Psychological Levels (1000 / 100 / 50 / 25 / 10 pip steps)
Psychological levels are price zones where human psychology naturally causes order clustering. Banks, institutions and retail traders all monitor the same round numbers — making these levels self-fulfilling support and resistance zones. Each level type has its own color, zone width and line style settings and can be toggled on or off independently.
🔵 PDH / PDL — Previous Day High & Low
The most watched intraday reference points in professional Forex trading. The line starts exactly at the candle where the previous day's high or low was formed and extends to the current bar. Institutional traders use these levels for bias, stop placement and profit targets. On GBP/USD and other volatile pairs, PDH/PDL are frequently used as magnets for price during the London and New York sessions.
🔷 PWH / PWL — Previous Week High & Low
The strongest reference levels for weekly bias and multi-day trade planning. The line starts at the exact candle of the previous week's high or low and extends through the current week. A break and hold above PWH is a strong bullish signal. A rejection at PWH or PWL combined with a psychological level creates a very high-confluence setup.
💡 How to use this indicator:
Add the indicator to your GBP/USD or any other Forex chart
Enable the psychological levels that fit your timeframe (100 and 50 pip for day trading, 25 and 10 pip for scalping)
Mark where PDH/PDL and PWH/PWL sit relative to psychological levels
Look for confluence — when PDH aligns with a 100-pip level, that zone is significantly stronger
Wait for a price action trigger (engulfing candle, break of structure) at the confluence zone
Place your stop loss beyond the full zone, target the next key level with minimum 1:2 R:R
🎯 Best confluence combinations:
PDH/PDL + psychological level = strong intraday zone
PWH/PWL + psychological level = strong multi-day zone
PDH + PWH + psychological level = extremely high-probability setup
Any of the above + VWAP = institutional-grade confluence
⚙️ Customization:
Every element is fully adjustable. Colors, line styles (solid, dashed, dotted), line thickness and zone widths can all be set independently. Labels for PDH/PDL and PWH/PWL can be toggled on or off. The indicator automatically detects JPY pairs and adjusts pip calculations accordingly.
📋 Technical details:
Pine Script v6
Compatible with all Forex pairs (majors, minors, exotics)
Works on all timeframes from M1 to Weekly
Maximum 500 lines and 500 boxes for optimal performance
No repainting — levels are fixed once the session closes
Optimized calculation within visible price range for smooth performance
👤 Ideal for:
Day traders and scalpers who trade GBP/USD, EUR/USD or other major pairs on the 5-minute to 1-hour timeframe and want a clean, structured way to identify the most important price zones without cluttering their chart. Индикатор

Trend Signal A (v2.3) - 1D Trend + 1H CrossThis indicator combines multi-timeframe trend analysis using Heikin-Ashi candles
smoothed with a configurable moving average (EMA, HMA, ALMA, SMA, etc.).
📌 How it works:
- Calculates trend on a higher timeframe (Daily by default) using the last
CLOSED Heikin-Ashi candle only (no repainting).
- Looks for a trend cross confirmation on the chart's timeframe (designed for 1H).
- BUY signal: daily trend is bullish + bullish cross on the current timeframe.
- EXIT signal: bearish cross OR ATR-based dynamic stop loss, whichever comes first.
📊 Built-in panel:
Shows in real time the daily trend state, whether a position is currently open,
the unrealized PnL of the open trade, and the cumulative historical PnL
(simulated, no fees/slippage) since the indicator was loaded on the chart.
⚙️ Fully configurable: moving average type and length, higher-timeframe
selection, ATR multiplier for the stop loss, colors, and panel visibility.
⚠️ This script is an analysis tool, not financial advice. Past results shown
in the panel do not guarantee future performance. The PnL displayed is a
simplified simulation for educational purposes, not a full strategy backtest
(no fees, slippage, or position sizing are accounted for).
🙏 Credits: based on "Trend Indicator A" by DZIV (dzi_v_), published under
CC BY-NC-SA 4.0. This script is released under the same license. Индикатор

Stockbee Anticipation SetupSTOCKBEE ANTICIPATION SETUP
Finds stocks that have already run, then gone quiet — tight range, drying volume, holding near the highs of a small base. It marks the coil BEFORE the breakout, while the stop is still small.
THE IDEA
Pradeep Bonde (Stockbee) trades short, violent moves: a stock breaks out and delivers most of its gain in three to five days. His Momentum Burst entry takes that breakout on the day it happens, typically a 4% up-day on expanding volume.
Anticipation is the same trade entered earlier. Instead of paying for the breakout day, you buy during the dull consolidation that precedes it, while the range is tight and volume has dried up. You give up confirmation; in exchange your stop sits just underneath a very tight base, so the position risks a fraction of what a breakout-day entry risks.
That trade-off only works if the base is genuinely tight. A wide, sloppy consolidation forces a distant stop, and then anticipating buys you nothing over simply waiting. The indicator is built around that constraint.
The pattern in one line: a real prior advance, then a short narrow base, volume drying up, price holding in the upper half of that base, and a stop you can place within a few percent.
HOW IT DECIDES
Nine conditions are evaluated on every bar. ALL must pass. There is no partial credit — one failure and the bar is not a setup, no matter how good the rest look.
1. Prior advance >= 15% over 40 bars
Anticipation continues a move. Without a prior thrust you are just buying a quiet stock.
2. Base width <= 10%
High to low of the last 10 bars. The best single proxy for whether the coil is real.
3. Average daily range <= 5%
Individual bars must be small, not just the envelope. Catches wide bars inside a narrow box.
4. Volume dry-up <= 0.85 x baseline
Base volume against the 50-day average. Supply exhausting is the tell.
5. Close location >= 50% of base
Price holding the upper half. A tight base sagging to its lows is a failed base.
6. Risk to stop <= 5%
The whole premise. If the stop cannot be placed tight, the setup is rejected outright.
7. Trend close > MA20 and MA50
Keeps you on the right side. Optional, can be switched off.
8. Not already fired day gain < 4%
A 4% day IS the Momentum Burst trigger. Past that you are no longer anticipating.
9. Liquidity >= $5 and 100k shares
Standard floor. Tight stops are unusable in illiquid names.
Why the risk gate is a rejection and not a penalty: every other quality can be traded off against the rest through the score. Stop distance cannot. A 12% stop on an anticipation entry is a different trade with a different expectancy, not a slightly worse version of the same one.
THE SCORE
Bars that clear all nine gates are graded 0-100. The score ranks candidates against each other; it never overrides a gate.
20 Base tightness — narrower than the cap scores higher
15 Close location within the base
15 Volume dry-up depth
15 Size of the prior advance
15 Risk distance — tighter stop, more points
10 Range contraction — last 3 bars vs the base
10 Trend alignment above both MAs
Grades:
85-100 A Everything lines up. Chart-review candidate.
75-84 A- Strong, usually one soft component.
65-74 B Playable smaller, or watch for improvement.
55-64 Watch Valid but unremarkable. Watchlist only.
under 55 — Not flagged. Nothing is drawn.
The 55 floor is an input, so you can raise it to see only the best coils.
READING THE CHART
Nothing is drawn unless a bar clears every gate and meets the score floor. A clean chart means no setup — that is the normal state.
Triangle below bar First bar of a new setup. Marks the transition into the
state, so one coil produces one triangle, not a cluster.
Shaded zone Every bar where the setup remains valid. Its width shows
how long the coil has held.
Solid teal line Base high — where the Momentum Burst would trigger.
Anchored to the base that produced the signal and
spanning its full length.
Dotted line Base low. Reference only, this is NOT the stop.
Solid red line The actual stop, from the selected stop mode. Usually
well inside the base low.
Metrics table (values are for the most recent bar; each gate metric turns red when it fails, so a glance tells you what is blocking the setup):
Anticipation Rating and score. Grey header means no setup on this bar.
Base width % High to low of the base, as a percentage of the low.
Avg range % Mean daily high-low range across the base.
Vol ratio Base volume / 50-day baseline. Below 1.0 means drying up.
Prior advance % Rise from the pre-base low up to the base high.
Close loc % Where the close sits in the base. 100 = at the high.
Entry (close) The anticipation entry — you buy inside the base.
Stop Stop price per the selected mode.
Risk % Entry to stop. Red above the max-risk input.
Breakout lvl Base high plus one tick — the Momentum Burst trigger.
R to breakout Distance from entry to that trigger, in units of risk.
R to breakout is the number that justifies the trade. It answers: how much do I make, in R, just getting to the point where a breakout trader would enter? At 1.5R or more, anticipating is genuinely paying you for the earlier entry. Below 0.5R you are taking extra uncertainty for very little head start, and waiting for the breakout is the better trade.
INPUTS
BASE / CONSOLIDATION
Base lookback (bars) 10 Length of the consolidation window. 10 is about two
weeks. Bonde's bases run one to three weeks, so 5-15
is the useful band.
Max base width % 10.0 Rejects bases wider than this. The main tightness
control — lower finds fewer, better coils.
Max avg daily range % in base 5.0 Rejects bases built from wide individual bars. Raise
for high-ADR small caps, lower for large caps.
Min close location in base % 50.0 How high in the base price must close. 70+ demands
price pinned near the highs.
PRIOR ADVANCE
Prior-advance lookback (bars) 40 Window searched for the pre-base low. Longer accepts
older, slower advances.
Min prior advance % 15.0 Required thrust into the base. Raise to demand real
momentum; set to 0 to disable.
VOLUME
Volume baseline length 50 Averaging period the base volume is compared against.
Max base/baseline vol ratio 0.85 Dry-up threshold. 0.85 is mild; 0.6 demands a
pronounced volume collapse.
RISK / STOP
Stop reference Recent low Recent low = under the last N bars, the tight
Stockbee-style stop. Base low = under the whole base,
safest but widest. ATR multiple = volatility-scaled.
Fixed % = a flat percentage.
Recent-low lookback 3 Bars used by Recent low mode. 2-3 is tight, 5+
approaches the base low.
ATR length / ATR multiple 14/1.5 Used only in ATR mode.
Fixed stop % 4.0 Used only in Fixed % mode.
Max risk to stop % 5.0 HARD REJECTION. Setups needing a wider stop are
discarded. The most consequential input here.
FILTERS
Min price 5.0 Excludes low-priced names.
Min avg volume 100000 Liquidity floor on the volume baseline.
Require close above 20 & 50MA on Trend filter. Turn off to find bases forming under
the averages — a different, lower-probability trade.
Exclude if today gain % >= 4.0 Keeps anticipation separate from the breakout it
precedes.
OUTPUT
Min score to flag 55 Score floor. Raise to 70+ for high-grade coils only.
Show base high / low lines on Base boundary lines.
Show stop line on The red stop level.
Shade anticipation zone on Background tint over valid bars.
Extend levels right (bars) 0 Projects the lines forward N bars. Useful when
planning an entry.
TABLE
Show metrics table on Toggles the table.
Position Top right Any of the nine chart corners and edges.
Text size Normal Tiny through Huge. Raise it on large monitors.
TUNING
The defaults are a starting point, not settled numbers. Bonde does not publish exact thresholds, so these were chosen to match the described behaviour and should be adjusted to your universe.
Too few setups:
- Raise Max base width % to 12-14. This is the most common blocker.
- Raise Max risk to stop % to 6-7, accepting looser trades knowingly.
- Lower Min prior advance % to 10 for slower, larger names.
- Lower Min score to flag to 45 to see marginal coils.
Too many setups:
- Lower Max base width % to 7-8.
- Lower Max base/baseline vol ratio to 0.65 for real volume collapse.
- Raise Min close location % to 65-70.
- Raise Min score to flag to 70.
Volatility: high-ADR small caps need Max avg daily range % around 7-8 and a wider Max risk to stop %, or nothing will ever qualify. Large caps can run tighter than the defaults on both. Switching Stop reference to ATR multiple makes stop distance self-adjusting across a mixed watchlist.
These thresholds have not been backtested. Changing them changes which trades you take, and the only way to know whether a change helps is to test it against outcomes over a meaningful sample.
ALERTS
One alert condition is exposed, "Stockbee Anticipation", firing on the first bar of a new setup rather than on every bar it stays valid.
Right-click the chart, Add alert, choose Stockbee Anticipation Setup as the condition, and set it to Once Per Bar Close. On daily bars you are notified after the close, which is when the signal is final. Firing intrabar produces alerts that vanish by the close.
WHAT IT CANNOT DO
- It is not a signal service. It flags a chart state. Every candidate still
needs a look at the chart before it becomes a trade.
- It has no view on news or fundamentals. A tight base ahead of an earnings
date is a very different proposition and the script cannot see the date.
- It does not size positions or track exposure. It gives you entry, stop and
risk %; converting that into share count is your job.
- It does not know the market regime. Anticipation setups fail in bulk when
the broad market is under distribution. Check the market first.
- It has not been backtested. The thresholds are reasoned from the method as
described, not fitted to outcomes.
- One symbol at a time. Pine indicators evaluate the chart's symbol only.
Scanning a universe requires a screener.
Implements the Anticipation setup as taught by Pradeep Bonde (Stockbee). Not affiliated with or endorsed by him. Nothing here is financial advice — the indicator describes chart geometry, and decisions about risk remain entirely yours. Индикатор

Capital Breakdown: MIF SniperCapital Breakdown: MIF Sniper is a macro-to-micro decision framework built for traders who want more than a sector heatmap — it tells you who's actually leading inside that sector.
The system runs as a two-desk architecture:
TRADE DESK — pivot-based support/resistance, supertrend + DEMA trend confirmation, and RSI-based reversal signals, with a live signal HUD and built-in alerts.
MACRO DESK — an 11-sector SPDR rotation heatmap ranking all sectors by relative strength vs SPY, plus regime classification (Trend / Transition / Shock), a Dynamic Conviction Index, and active macro driver detection (USD, rates, energy, risk sentiment, growth, industrial).
NAME-LEVEL DRILL-DOWN — the newest layer. Pick any sector from the settings dropdown, and the HUD ranks the top 5 strongest names inside that sector using relative strength versus the sector's own ETF (not just the broad market). A live LEADER/WATCH indicator tells you instantly whether the sector you're drilled into is the one actually leading right now, or one you're simply watching. Every candidate list is fully editable in settings — no coding required.
This turns sector rotation from a top-down observation into a tradeable single-name idea: see which sector is winning, then see which stock inside it is winning hardest.
Built for traders working across US equities, sector ETFs, and single names who want an institutional-style read on where capital is actually flowing — not just where the index is pointing. Индикатор

Индикатор

The Deceit SignatureThe Deceit Signature
WHAT IT IS
The Deceit Signature is a pattern-recognition tool built around a recurring market behavior: a tight range breaks sharply in one direction, only to reverse just as sharply moments later, sweeping the liquidity resting near a prior swing point before the market shows its real direction. This is the same mechanic behind concepts like the ICT "Judas Swing" or Wyckoff's spring/upthrust: a false move designed to trap traders on the wrong side before the actual move develops.
This indicator automates the detection of that sequence and marks it directly on the chart, so it can be studied and monitored without having to spot it manually candle by candle.
WHAT IT DOES
On every closed bar, the indicator looks for the following sequence:
- A range: price consolidates within a band narrow enough relative to the ATR to qualify as a tight range.
- A first sharp break: a strong candle (measured against the ATR) closes beyond one edge of the range. This is the fakeout, the move designed to trap traders positioning in that direction.
- A second sharp break, in the opposite direction, within a configurable number of bars. This is the move that confirms the first one was a trap, and it is the move that goes looking for liquidity.
- A liquidity box: once the second break is confirmed, the script looks back for the two most recent swing pivots on the side opposite to the first break (below the range for a bullish fakeout, above it for a bearish one) and draws a box between them. This is the zone where price is expected to sweep resting liquidity before reversing back in the direction of the original fakeout.
- A touch marker: once price trades back into that liquidity box, a small triangle marks the candle that touched it, and the box is automatically removed a configurable number of bars later, keeping the chart clean while still leaving the range and both breaks visible for reference.
Breaks caused by a price gap (no overlap with the previous candle) are ignored. The pattern only counts when the move happens through actual trading, not through a jump in price with nothing traded in between.
HOW TO USE IT
Add the indicator to any chart, on any timeframe. When the full sequence is detected, it draws the range box, labels both breaks ("Break 1 (fakeout)" and "Break 2 (liquidity grab)"), and plots the liquidity box for that setup. An alert condition is available to notify you as soon as a first break occurs, so you can start watching for the confirming second break, and a general alert fires when the full pattern is confirmed.
This is a visual and analytical tool for identifying the pattern, not an automated entry system. What you do once the liquidity box is drawn, and once price reacts inside it, is a separate decision that requires its own judgment and risk management.
HOW TO CONFIGURE IT
Range group: "Bars to measure the range" sets how many bars are checked for tightness, and "Maximum range width (x ATR)" sets how narrow that range must be relative to the ATR to qualify as a valid consolidation.
Sharp Breaks group: "ATR period" sets the ATR length used throughout the script. "Minimum strength of the breakout candle (x ATR)" sets how large a candle's range must be, relative to the ATR, to count as a sharp break. "Max bars between 1st and 2nd break" sets the window in which the second break must appear for the pattern to be confirmed; if it doesn't arrive in time, the setup is discarded.
Pivots / Liquidity Box group: "Left bars" and "Right bars for pivot" control the swing pivot detection used to build the liquidity box. "Minimum distance from pivot to range edge (x ATR)" filters out minor pivots sitting too close to the range itself, forcing the script to look further back for a pivot that represents an actual separate swing.
Visual group: toggles for the range box and the liquidity box, colors for bullish and bearish setups, and how many bars to wait after the liquidity box is touched before it gets deleted from the chart.
A NOTE ON THE ATR STRENGTH SETTING
"Minimum strength of the breakout candle (x ATR)" is the single most important setting to calibrate for each asset and timeframe. Set it too low and the script will treat ordinary, unremarkable candles as "sharp" breaks, which produces false detections: the pattern will appear far more often than the actual deception behavior occurs, and most of those detections will be noise rather than the real setup. Start around 1.2-1.6x ATR, watch how it performs on the specific instrument and timeframe you trade, and raise it if you see the indicator firing on candles that don't visually stand out from the surrounding price action. There is no universal value: a setting that works well on a 1-hour crypto chart will not necessarily work on a daily stock chart or a weekly bond chart.
DISCLAIMER
This script is provided for educational and analytical purposes only. It identifies a recurring price pattern; it does not predict future price movement, and past instances of the pattern are not a guarantee that price will react the same way again. This is not financial advice, and any trading decision based on what this indicator shows remains the sole responsibility of the person making it. Индикатор

QQE Trend Confluence [MarkitTick]💡 A dual-engine QQE (Quantitative Qualitative Estimation) confluence oscillator that layers eight selectable pre-smoothing algorithms, a secondary confirmation QQE pair, ADX and higher-timeframe bias gating, and a fully automated ATR-based trade planner with webhook-ready alert payloads on top of the classic Wilder RSI-trailing-stop concept.
✨ Originality and Utility
This script does not simply reproduce the stock QQE oscillator. It restructures the calculation into a layered decision pipeline where a signal only qualifies after passing through several independent, user-toggleable filters, turning a single momentum flip into a multi-factor confluence check.
The source price is first routed through a selectable pre-smoothing stage offering eight distinct algorithms, ranging from classic moving averages to a proprietary slope-projection method and a recursive Kalman estimator, before it ever reaches the QQE math. This changes the responsiveness and noise profile of every signal generated downstream.
A second, independently parameterized QQE instance runs in parallel purely as a confirmation gate, meaning a raw crossover on the primary pair is discarded unless a slower QQE pair already agrees with its direction.
An ADX/DMI strength filter and a non-repainting higher-timeframe bias filter can each independently veto a signal, so traders can require trend strength and multi-timeframe agreement without writing their own confluence logic.
The script goes beyond signal generation into trade management: a built-in ATR trade planner converts a qualifying cross into a full stop-loss and three-tiered take-profit plan, drawn directly on the chart and tracked bar by bar.
A structured JSON alert payload system is built into every signal and trade-management event, making the tool usable as the signal engine for an external automation or webhook pipeline without any manual message formatting.
The combination of these components is deliberate rather than incidental: the pre-smoothing stage shapes what "signal" means, the dual-QQE and filter stack decides which of those signals are trustworthy, and the trade planner and alert system decide what to do once a signal is accepted. Removing any one layer would leave a materially different and less complete tool, which is why they are published together as a single confluence system rather than as separate scripts.
🔬 Methodology and Concepts
• Adaptive Pre-Smoothing Engine
Before the source price reaches the QQE engine, it can optionally be passed through one of eight smoothing or prediction methods, selectable from a dropdown. This determines how "clean" or "responsive" the underlying momentum reading is.
Simple, Exponential and Wilder (RMA) moving averages behave as their standard definitions.
A double weighted moving average applies a WMA to the result of a first WMA pass, compounding the weighting effect for extra lag reduction.
A triple volume-weighted moving average chains three successive VWMA passes, folding volume into the trend estimate at each stage.
The Hull Moving Average uses the standard weighted-difference technique to reduce lag relative to a simple weighted average.
The proprietary LLAMA method computes a simple moving average baseline over the lookback window, then measures the linear slope of price across that same window (the difference between the current source and the value from "length" bars back, divided by length). That slope is then projected forward by half the lookback length and added to the SMA baseline. The practical effect is a moving average that leans ahead of price during a steady trend and collapses back toward a standard SMA when price is flat or choppy.
The Kalman Filter option treats the source price as a noisy observation of an underlying "true" trend state. It maintains an internal estimate and error variance, computes a Kalman gain each bar from a length-derived process-noise assumption and a fixed measurement-noise assumption, and blends the new price observation into the estimate proportionally to that gain, producing a smoothing curve that adapts its own responsiveness over time.
• Dual QQE Core
The QQE concept itself works by smoothing an RSI reading with an EMA, then measuring the average magnitude of bar-to-bar changes in that smoothed RSI (a Wilder-style double-smoothed "ATR of RSI"), and multiplying it by a factor to build a trailing envelope around the smoothed RSI line. This trailing level only moves in the direction the RSI is already travelling and locks in place, ratchet-style, whenever RSI reverses, similar in spirit to a classic ATR trailing stop but applied in RSI space rather than price space. A cross of the smoothed RSI over or under this trailing level marks a momentum shift. This script runs two such QQE instances simultaneously: a faster primary pair that generates the raw crossover, and an optional slower secondary pair whose sole purpose is confirmation, a signal from the primary pair is only accepted if the secondary pair's RSI-to-trail relationship already agrees with the same direction.
• Confirmation Filters
An optional ADX/DMI filter, built on Wilder's Average Directional Index, requires trend strength to be above a user-defined threshold before a signal is allowed through, filtering out crosses that occur during flat, directionless conditions.
An optional higher-timeframe bias filter pulls the same QQE relationship (smoothed RSI versus trailing level) from a user-selected higher timeframe and requires it to agree with the direction of the current-timeframe signal. This request is built using the previous, already-confirmed value on the higher timeframe combined with lookahead-on merging, which is the standard non-repainting pattern for higher-timeframe data: the value shown on any historical bar is the same value that would have been available to a trader watching in real time.
• ATR-Based Trade Planner
Once a signal clears every enabled filter, the script computes a stop-loss using the 14-period Average True Range multiplied by a user-defined multiple, anchored to the prior bar's close. Three take-profit levels are then derived from that risk distance using independently configurable risk:reward ratios. These levels are drawn as extending price lines with labels and shaded risk/reward zone fills, and the script continuously checks, bar by bar, whether price has touched each take-profit or the stop-loss, retiring the plan once the final target or the stop is hit. A lock control can freeze the currently displayed plan so it does not get replaced by a new signal while a trade is being managed.
• Signal Confirmation Behavior
The crossover state that drives every signal is always evaluated using the prior, already-completed bar's smoothed RSI and trailing-level relationship rather than the still-forming current bar. In practical terms, this means a BULL or BEAR marker only ever prints once the underlying cross is confirmed, and it does not shift position or disappear on subsequent price updates within the same bar.
• Automation-Ready Alerts
Every entry, exit, and trade-management event (long entry, short entry, close-long, close-short, and each of the three take-profit levels plus stop-loss) is wrapped in its own alert condition and also emits a structured JSON message through a single dynamic alert call, gated to fire only once per confirmed bar close for entries. Each JSON message includes the instrument, timeframe, and an editable action keyword, allowing the same signal engine to be wired directly into an external automation or webhook workflow.
🎨 Visual Guide
In the indicator's own pane: the blue RSI MA line is the primary smoothed-RSI reading, the yellow Smoothed Trail line is its dynamic trailing envelope, and the histogram plotted around the zero line reflects the distance between the two, colored teal on the bullish side and red on the bearish side.
Dashed reference lines at 70 and 30 mark overbought and oversold RSI zones with a light shaded fill between each level and the 50 midline when enabled.
On the price chart itself: candles can be recolored using a four-tone scheme, strong bullish teal and weak bullish dark teal, or strong bearish red and weak bearish dark red, with a neutral gray used whenever the current QQE distance is smaller than its own running average, giving an at-a-glance read on momentum strength as well as direction.
BULL and BEAR labeled arrows print just below or above the triggering candle whenever a fully confirmed signal fires.
When trade levels are enabled, dashed lines and small labels for the stop-loss, entry, and three take-profit levels extend to the right from the signal bar, with the area between entry and stop shaded as a risk zone and the area between entry and the furthest target shaded as a reward zone.
An optional multi-row dashboard panel, placeable in any chart corner, summarizes the instrument and timeframe, lock status, current bias, the raw RSI MA and Trail Level values, an ASCII progress-bar style RSI strength meter, the secondary confluence state, the higher-timeframe bias, the ADX reading and pass/fail color, the currently active pre-smoothing method, the ATR value, the DI+/DI- readings, a momentum strength bar, and the active trade's direction and price levels.
📖 How to Use
Treat a BULL or BEAR arrow as the point where every enabled filter, the primary cross, the secondary QQE confirmation, the ADX gate, and the higher-timeframe bias, has already agreed on a direction.
Use candle color intensity and histogram height as a secondary read on how strong the current momentum reading is relative to its own recent average, rather than as a standalone signal.
Scan the dashboard's Bias, Confluence, and HTF Bias rows for a fast multi-factor summary without needing to inspect the oscillator pane directly.
Enable the trade levels option to have the script draw a stop-loss and three take-profit targets automatically on each qualifying signal, and use the lock control to freeze that plan in place while managing an open position.
Adjust the ATR stop multiple and the three risk:reward ratios to match your own risk tolerance before relying on the drawn levels.
For automation, create a TradingView alert using the "Any alert() function call" option to receive the full JSON payload stream, or use the individual named alert conditions if only a single event type is needed.
This tool is a momentum and confluence framework, not a complete trading system on its own. Combine it with your own market structure, support/resistance, or volatility context before acting on any signal.
⚙️ Inputs and Settings
Core Settings: RSI Length and RSI EMA Smoothing control the primary QQE's momentum lookback and responsiveness; QQE Factor scales how wide the trailing envelope sits from the smoothed RSI; Source selects the price series feeding the whole calculation; the secondary QQE toggle, along with its own EMA smoothing and factor, controls the confirmation pair.
Filters: the ADX toggle, length, and threshold control the trend-strength gate; the Adaptive Filter dropdown and length select which of the eight pre-smoothing methods (including LLAMA and the Kalman Filter) is applied to price before the QQE math runs; the HTF filter toggle and timeframe control the higher-timeframe bias confirmation.
Trade Tools: toggles for showing trade levels and locking the current signal, an ATR multiple for stop-loss distance, and three independent risk:reward ratios for the three take-profit targets.
Visuals: independent toggles for the overbought/oversold zone fill, the histogram, the crossover arrows, and the color-matched candles.
Dashboard: a toggle to show or hide the panel and a dropdown to choose which chart corner it docks to.
Alerts: editable text fields defining the action keyword sent in the JSON payload for each of the eight tracked events, letting the output match whatever automation platform is receiving it.
Colors: a full set of color pickers covering the oscillator lines, histogram, zones, arrows, candle tones, trade-planning lines and fills, and dashboard styling, purely cosmetic and with no effect on calculations.
🔍 Deconstruction of the Underlying Scientific and Academic Framework
The foundation of the oscillator is J. Welles Wilder Jr.'s Relative Strength Index and his broader family of smoothed volatility and trend-strength tools, including the Average True Range concept and the Average Directional Index used here as an optional filter.
The QQE structure itself extends Wilder's trailing-stop logic, normally applied to price, into RSI space: an ATR-style measure of RSI's own volatility is used to build a ratcheting trailing envelope around the smoothed RSI line, conceptually related to other ATR-trailing-stop tools such as Chandelier Exit or SuperTrend but operating on a momentum oscillator rather than raw price.
The Hull Moving Average option is built on Alan Hull's weighted-difference technique for reducing the inherent lag of weighted moving averages.
The LLAMA pre-smoothing option applies a basic linear extrapolation principle, projecting a simple moving average forward using the measured slope of price across the same lookback window, a lightweight analogue of trend-extrapolation methods used in linear regression forecasting.
The Kalman Filter option is a direct application of Rudolf Kálmán's recursive estimation framework, treating price as a noisy observation of an unobserved underlying trend state and updating that estimate bar by bar using a dynamically computed gain, a technique widely used in modern adaptive filtering and signal processing.
The ATR trade planner applies standard volatility-based position planning, using a multiple of Average True Range to size a stop distance and deriving profit targets from fixed risk:reward multiples of that same distance.
⚠️ Disclaimer
All provided scripts and indicators are strictly for educational exploration and must not be interpreted as financial advice or a recommendation to execute trades. We expressly disclaim all liability for any financial losses or damages that may result, directly or indirectly, from the reliance on or application of these tools. Market participation carries inherent risk where past performance never guarantees future returns, leaving all investment decisions and due diligence solely at your own discretion. Индикатор

Confluence Engine+Confluence Engine+
Maps the PD arrays taught by ICT. Instead of plotting a dozen isolated objects and leaving you to weigh them by eye, it reads the confluences present at price — a liquidity raid into a discount PD array, confirmed by a breaker, with SMT, inside a killzone — into the ICT directional bias, the current draw on liquidity, and a corner dashboard. It reports context and leaves the trade to you. It is not a signal generator: it does not fire buy or sell orders and it does not place entries or exits.
What it does
Six modules, each toggleable, built so later stages read the state the earlier ones capture.
1 · Killzones & Sessions. Time-gates the London, NY AM and NY PM killzones and marks the Asia, London and New York session highs and lows as unmitigated levels, plus the 00:00 New York Midnight Open — a core daily reference (below it leans the day bullish, above it bearish). Every time window here — the killzones included — is resolved on the session source timeframe rather than the chart's. A killzone is ninety minutes to three hours, narrower than a single higher-timeframe candle, so judged off the chart a candle merely overlapping one would report as fully inside it. The killzone is read at the candle's close, and the Midnight Open the same way, so it still resolves on charts whose own candles never open at 00:00.
2 · Structure & Dealing Range. Pivot highs and lows define the swing structure the arrays build on. The dealing range — the window whose midpoint separates premium from discount — is taken from a fixed higher-timeframe period: the weekly range on 1-hour-and-up charts, the daily range on anything intraday below that.
3 · Liquidity. Session highs and lows (Asia, London, New York) plus prior day and prior week highs and lows are drawn as reference liquidity, each anchored to the candle that formed it. Session extremes are measured on a lower timeframe rather than the chart's: a three-hour London window is shorter than a single 4-hour candle, so read off the chart it would collapse to the high of whichever candle happened to contain it. Sourcing them lower keeps session levels correct on any chart, and charts already at or below that timeframe track natively.
A level tracks the right edge while it rests; the instant price touches it, it is mitigated — the line stops extending at that candle, turns dotted and dims — so taken liquidity stays readable as history and can never be mistaken for a live level. Where levels land close together only the most significant is drawn, a weekly level outranking a prior-day level, which outranks a session level, so near-duplicates never stack. Each level then retires once it ages past its lookback window: the "back" settings are a window in days and weeks, so nothing lingers long after the session or period that formed it.
4 · PD Arrays. Fair Value Gaps (BISI / SIBI), Volume Imbalances, Order Blocks (the candle body before a displacement) and the Order-Block-to-Breaker lifecycle. A FVG registers only when the gap clears a height floor and its middle candle is a genuine displacement candle, so routine three-bar gaps are filtered out. A Volume Imbalance is the FVG's thinner cousin — a two-candle gap between the bodies that a wick still trades through, so the only volume in the gap changed hands in wicks; it carries its own sensitivity floor and lives under the same lifecycle as the FVGs. A new gap also removes any stale opposite-direction gap it overlaps: that range has since been delivered through the other way, so the old one-sided imbalance cannot stand.
An Order Block must earn its place with the full ICT sequence: the close that breaks the prior swing — a structure break grants that credit exactly once, so blocks sit at real breaks rather than printing mid-trend — and the leg must leave a Fair Value Gap behind it. The gap is the displacement evidence: a leg that never gaps did not really displace, and its block never registers. Only the order blocks that matter make the chart. A live block is the body of its origin candle, open to close. When price closes through it the block fails and flips into a Breaker — and a breaker takes the full candle, wick to wick: the displacement behind it is already proven, so the whole candle becomes the array. A percentage-fill mitigation decider governs each array: once price trades a chosen depth into it from the side it is approached from (default 50%, consequent encroachment), the array is mitigated — either faded and kept (dotted, faint, check mark) or removed, whichever you set. A largest-array-wins declutter keeps overlapping zones from stacking.
5 · SMT Divergence. A liquidity-sweep read against a correlated symbol — auto-paired (NQ to ES, ES to NQ, YM to ES, GC to SI, and their micros) or a symbol you set. When your chart takes a swing level but the peer holds its aligned level and refuses to follow, the move lacks participation: a SMT is drawn from the swept level to the sweep. Pooled swings age out after a set number of bars, so a divergence is only ever drawn between swings that were still contemporaries — never between two that are days apart.
6 · Dashboard. A pure confluence read-out of the state each module captures — the ICT bias, and the current draw on liquidity : the nearest unmitigated high above (the resting buyside) and the nearest unmitigated low below (the resting sellside), each named with its distance — where price is being drawn to, read straight from the level engine. When liquidity is taken, the sweep row names the level that was raided — PDH, PDL, a session high or low — rather than a generic flag. Below that, whichever confluences are live (a OB or Breaker tap, a SMT), the killzone, the Midnight Open and the dealing-range position — every row a decision input, nothing that is merely inventory. It reports context; the trade is left to you, and nothing fires.
Visual grammar
Order blocks and breakers draw as levels by default, the way a block is actually read: the proximal edge — the price that gets traded — a solid line in the direction colour, the distal edge dotted, the consequent encroachment dotted grey between them, and a small tag at the right end that renames itself from OB to Breaker when the block flips. Prefer the block as a region instead and one setting draws it as a see-through zone with a hard border. A live gap zone is solid with its label travelling at the live edge; once a zone is mitigated to the chosen fill depth it turns dotted, fades, and its name folds into the zone itself — a faint "✓ name" carried inside the frozen box, quiet by design, so worked zones read as history at a glance. A liquidity level extends while it rests and freezes into a dotted line the moment it is taken — full-strength black by default, with an optional dim. Purple marks bullish arrays, magenta bearish; liquidity and levels are neutral. Nearby level labels merge so the chart stays readable, and objects project a few bars past the last candle so labels sit in clear space, never on price.
Method & repainting
Every detection path — liquidity capture, PD-array formation, mitigation and SMT — evaluates only on closed bars, so nothing is drawn, moved or removed on the strength of an unfinished candle. Once a level, zone or SMT line is on the chart it stays where it was placed. Completed period levels fix at the rollover, and session extremes are read from the closed intrabars of the session source timeframe.
Two things update live, by design. The dashboard reads current price, so the bias and draw rows move during the forming candle and settle at its close; and the right-edge labels re-merge as levels are added or taken. Neither creates or moves a drawn object.
Swing-based features — the order-block structure break and SMT — depend on pivots, which confirm a set number of bars after the swing itself forms. That is a fixed delay, not a revision: a pivot never moves once printed. Session levels also rely on lower-timeframe data, which is available for a limited span of recent history, so they thin out far back on the chart.
Settings
Session timezone, session windows and the session source timeframe, per-array sensitivities and the mitigation decider, block drawing mode (levels or zone), the SMT peer and liquidity memory, and full dashboard controls are all exposed as inputs.
Disclaimer
This is a decision-support tool for discretionary ICT trading. It is not financial advice, and no market's past behaviour is indicative of future results. Индикатор

Fibonacci Path Profile [MantisAlgo]Fibonacci Path Profile is a historical swing-path analysis tool that compares the active market structure with similar Fibonacci swing patterns from the past and visualizes the historical distribution of the next D and E swing points.
The indicator combines the current A→B impulse, B→C retracement or extension, and live C→Now progress to continuously refine the historical sample.
🟢 ABC STRUCTURE
The indicator automatically detects alternating swing highs and swing lows and organizes them into an A-B-C structure.
Bullish ABC
A→B = upward impulse
B→C = downward retracement
The next D swing develops upward from C
Bearish ABC
A→B = downward impulse
B→C = upward retracement
The next D swing develops downward from C
A→B is used as the base swing for all subsequent Fibonacci measurements.
🟢 FIBONACCI MATCHING
The B→C movement is measured relative to the A→B impulse:
B→C Ratio = |B − C| / |A − B|
Historical cases are matched using:
Bullish or Bearish ABC direction
B→C Fibonacci range
Live C→Now progress
The B→C ranges are:
0–23.6%
23.6–38.2%
38.2–50%
50–61.8%
61.8–78.6%
78.6–100%
100–127.2%
127.2–161.8%
161.8%+
Up to 100% is classified as a Retrace, while values above 100% are classified as an Extension.
* To preserve a usable historical sample, all B→C values above 161.8% are grouped into a single 161.8%+ matching range rather than being divided into additional extension classes.
🟢 LIVE C→NOW MATCHING
The indicator also measures how far the active move has progressed from C relative to the B→C range.
C→Now = current progress from C relative to |B − C|
As price develops, this progress is used to filter historical cases that remained valid through a similar stage of the move.
🟢 D & E PATH
The profiles show the historical locations of the next two swing points:
D PathDistribution of the next swing point after C.
E PathDistribution of the following swing point after D.
Both D and E locations are normalized relative to the B→C range, allowing historical structures of different absolute sizes to be compared on the same basis.
The E Path is also separated into three structural outcomes:
🟥 B Break — E moves beyond the B level
🟨 No Break — E remains between B and C
🟦 C Break — E moves beyond the C level
The displayed percentages represent the weighted share of each outcome among the currently matched historical cases.
* For the D and E profiles, values beyond the displayed ±161.8% range are grouped into the outermost top or bottom bin rather than split into additional bins.
🟢 REAL-TIME PROFILE
The active profile is continuously recalculated as price develops.
This can update:
C→Now progress
matched historical cases
D Path distribution
E Path distribution
B Break / No Break / C Break probabilities
Because D and E represent the active forward path, both profile boxes are always displayed to the right of the current candle.
🟢 DYNAMIC C
Before a new D swing is confirmed, the B→C retracement may continue to a new extreme.
In that case, the active C point is updated:
Bullish ABC → C moves to a new lower low
Bearish ABC → C moves to a new higher high
This prevents an unfinished B→C leg from being treated as a completed swing.
🟢 WEIGHT
Two weighting methods are available:
Recent
More recent historical cases receive greater weight.
Weight = 1 / (1 + Age / 1500)
where Age is measured in bars.
Equal
Every matched historical case receives the same weight.
Use Recent to emphasize newer market behavior or Equal to view the unweighted historical distribution.
🟢 HOW TO USE
Use the indicator to evaluate how similar historical structures developed from the current setup.
D Path highlights where the next swing historically tended to form.
E Path shows how price developed after that D swing.
B Break / No Break / C Break summarizes the historical structural outcome.
C→Now continuously refines the sample as the active move progresses.
The profiles represent historical swing distributions, not traded volume.
They are designed to provide a probabilistic view of the active structure rather than a fixed Fibonacci price target.
🟢 DISCLAIMER
This indicator is provided for informational and educational purposes only and does not constitute financial or investment advice.
Historical patterns and probabilities do not guarantee future results. All trading and investment decisions remain the sole responsibility of the user. Индикатор

Reballo Hindenburg Omen - Breadth GateWhat it is
The classic four-condition Hindenburg Omen, computed live from NYSE internals, held active for a set number of bars after it fires, plus a weekly breadth-oversold override. The output is a simple three-state risk gate :
Red — Omen active. Internals are split and weakening under a still-rising index. Freeze new risk.
Green — Breadth washed out. Fewer than 30% of S&P 500 stocks above their 200-day. Historically a bad time to be cutting risk.
Nothing — Clear. Most of the time.
This is not a crash predictor. The Omen's track record as a standalone signal is genuinely mixed, and anyone who tells you otherwise is selling something. What it is good at: catching the specific moment when a market is making new highs while a growing number of stocks are quietly breaking down. That's worth knowing, and worth being able to verify line by line.
The four conditions
All computed daily from NYSE data, all shown in the table so you can see which ones are holding:
1. Split market: new 52-week highs AND new 52-week lows both >= 2.2% of issues traded. The core of the Omen. A healthy market doesn't do both at once.
2. Still in an uptrend: NYSE Composite higher than 50 bars ago. The Omen is about divergence, so it only fires while the index is still up.
3. Internals weakening: McClellan Oscillator below zero (19/39 EMA on ratio-adjusted net advances).
4. Highs not dominating: new highs / new lows < 2.
When all four hit on the same day, a triangle prints and the gate turns red for 30 bars. Consecutive fires just extend the window.
The override
A weekly read of S5TH (percent of S&P 500 stocks above their 200-day MA). Below 30, the gate flips green and beats the Omen. The logic: once breadth is that washed out, the "split market" story is over and you're in a different regime where adding risk into weakness has worked far more often than not.
The table
Top right. One row per condition with the live value, green if met, red if not. When the Omen isn't active you can still see how close it is, which is most of the value.
How I use it
As a gate on position sizing, not as an entry or exit. Red = don't add. Green = the floor is probably in, don't panic-cut. It sits alongside a slow Ehlers CG and a regime score; when two or three of them agree the picture is usually right. On its own, treat it as one opinion.
Three alerts: Omen fires, Omen expires, breadth goes oversold.
Data requirements (read this)
Pulls USI:ADV, USI:DECL, USI:UNCH.NY, INDEX:MAHN, INDEX:MALN, NYA and S5TH. Some of these are not visible on every plan. If the table shows n/a, that's a data access issue, not a script bug.
All inputs come from index data, so it runs on any chart symbol. Put it on SPY, BTC, whatever you trade. It's telling you about the US market either way.
US stocks only. It has nothing to say about EFA or EEM beyond the fact that US internals tend to lead.
Settings
New Highs AND New Lows >= — 2.2% — the split-market threshold
Index higher than N bars ago — 50 — the uptrend check
Highs / Lows < — 2.0 — condition 4
Keep Omen active for N bars — 30 — the hold window
Breadth Symbol / Oversold Below — S5TH / 30 — the override
Open source. Fork it, break it, tell me what you find. Индикатор

Reballo Ehlers CG - Two-SpeedWhat it is
John Ehlers' Center of Gravity oscillator, normalised to a ±1 range and run at two very different speeds at once. Most CG scripts run one length around 10-20 bars and use it for swing entries. This one runs 128 and 256 bars and averages them. That turns it from an entry tool into a "how deep in the hole are we" gauge .
How it's built
Center of Gravity = the weighted mean position of price inside the window. Price sitting near the recent highs pulls the CG one way, price near the lows pulls it the other.
The CG is rescaled against its own highest / lowest over the same window, so it lives in regardless of the instrument.
A short 4-bar FIR smooth (4, 3, 2, 1 weights) takes out the jitter, then it's mapped to .
Run that twice (fast and slow), then average. The white line is the average. The grey lines are the two inputs.
Reading it
Below -0.8 (red zone): both the medium and slow view agree that price is pinned to the bottom of its range. "Washed out."
Above +0.8 (green zone): the opposite. "Stretched."
In between: nothing to see. That's most of the time on purpose.
Because the two speeds have to agree , the zones fire rarely. On SPY daily you'll typically see a handful of red episodes per decade: 2008, Mar 2020, Oct 2022 and the like.
How I use it
Not for entries. As a risk gate : when the average is washed out and other breadth / internals are also ugly, that's a "stop adding risk" flag, not a "buy the Индикатор

Reballo Regime Detector - ER + RelVol + AutocorrelationWhat it measures
Most indicators try to tell you which way price is going. This one asks a different question: is the market in a mood where trend-following works, or one where fading works?
You get one number, the Regime Score, from 0 (ranging / choppy) to 1 (trending). Under the hood it blends three different ways of looking at price, each measured at three speeds (16 / 32 / 64 bars by default).
The three components
1. Efficiency Ratio (Kaufman)
How straight is the path? Net distance ÷ total distance travelled. Move 10 points in 10 points of wiggle: score 1.0. Wander 50 points to end up 10 higher: score 0.2. High = directional, low = chop.
2. Relative Volatility
Short-window vol ÷ long-window vol (4× the short window). Quiet, compressing vol usually goes with clean trends. Expanding vol usually means transitions and churn. Capped at 2 and flipped so that "quiet" scores high.
3. Lag-1 Autocorrelation
Does today's move tend to follow yesterday's? Positive = follow-through (momentum-friendly). Negative = snap-back (mean-reversion-friendly).
Components 2 and 3 get averaged into one "RelVol+AC" number. Then both that and the ER get percentile-ranked over the last year , so a 0.8 on BTC means the same thing as a 0.8 on a sleepy utility stock, and 4H reads the same as daily.
Putting it together
Default mix is 40% Efficiency Ratio / 60% RelVol+AC, smoothed with a 16-bar EMA so it doesn't flip on every bar. Above 0.60 = trending (green). Below 0.40 = ranging (red). The middle is left grey on purpose: that's the "don't know, don't force it" zone.
What's hiding in the Data Window
Each component's rank on its own, so you can see what is actually moving the score.
Two derived weights, Divergence Multiplier and Convergence Multiplier (range 1 ± strength). If you run trend and mean-reversion signals side by side, these are meant to tilt between them: scale trend signals by Divergence, counter-trend signals by Convergence. At strength 0.5, a fully trending regime gives trend signals 1.5× weight and counter-trend signals 0.5×.
Ways to use it
As a filter: only take breakouts / momentum entries when it's green, only fade when it's red.
As a sizing knob: use the multipliers to lean in or out instead of switching strategies on and off.
As a sanity check: when it flips, peek at the Data Window to see whether vol, path efficiency or autocorrelation moved first.
Two alerts built in: regime → Trending and regime → Ranging.
Honest limitations
Needs about a year of bars (252 by default) before the ranking means anything.
It tells you what the regime is , not when it's going to change.
It doesn't care about direction. A clean crash scores as "trending" too.
Settings
Fast / Medium / Slow — 16 / 32 / 64 — speeds for all three measures
Weight: ER / RelVol+AC — 0.4 / 0.6 — how much each side counts
Percentile Rank Lookback — 252 — the "last year" window
Score Smoothing — 16 — EMA on the final score
Trending Above / Ranging Below — 0.60 / 0.40 — where the shading kicks in
Multiplier Strength — 0.5 — only touches the hidden multipliers
Open source. Fork it, break it, tell me what you find. Индикатор

Индикатор
