TDI - Goldminds / MMM Jakub Donovan RecreationTDI — Goldminds / MMM
> A Market Makers Method–style TDI combining RSI momentum, moving averages, and volatility bands to identify trend, momentum shifts, and overbought/oversold conditions.
The Traders Dynamic Index (TDI ) is a momentum and trend-following oscillator that combines RSI, moving averages, and volatility bands into a single indicator.
This version is based on the Goldminds TDI, adapted for the Market Makers Method (MMM) and reconstructed using the original parameters associated with the Jakub Donovan version.
Core Components:
RSI: 21-period RSI
Volatility Bands: 34-period SMA with a 1.6185 standard-deviation multiplier
Fast MA: 7-period SMA of RSI
Slow MA: 2-period SMA of RSI
Reference Levels: 20 / 30 / 50 / 70 / 80
The TDI can be used to identify momentum shifts, trend direction, overbought/oversold conditions, and potential reversals.
How to interpret it
Green & Red lines
The moving averages of RSI help identify changes in momentum. Crossovers can highlight potential shifts in short-term momentum.
Yellow line
The yellow line represents the RSI's broader average and acts as a useful reference for the overall momentum environment.
Blue bands
The volatility bands expand and contract based on RSI volatility, helping identify periods when momentum becomes unusually extended.
50 level
The 50 level acts as the key momentum midpoint:
* Above 50 → bullish momentum
* Below 50 → bearish momentum
30 / 70
Traditional oversold/overbought zones.
20 / 80
Extreme momentum zones that can help identify potentially exhausted moves.
> Important: The TDI should be used as a confirmation tool rather than as a standalone buy or sell signal. Combining it with price structure, support/resistance, volume, and market conditions can provide stronger trade setups.
Indicatore

Five Session by Mach0Five Session — Customizable Trading Sessions with Opening Range
Overview
Five Session highlights up to five fully customizable trading sessions directly on your chart. Each session is drawn as a box that tracks the session's high and low in real time, with an optional label, Fibonacci retracement levels, and an Opening Range with breakout alerts.
Designed for intraday traders who work with session-based concepts such as the London/New York overlap, Asian range breakouts, or opening range strategies.
Features
- 5 independent sessions — each with its own time window, label, and color. Defaults cover London, New York, Tokyo, and two custom slots, but every session can be freely reconfigured.
- Session boxes — automatically track the high/low of the session as it develops. Choose line style, line width, and background opacity, or hide historical boxes to keep the chart clean.
- Extend modes — keep session levels projected to the right after the session closes ("Extend" or "Extend + End line"), useful for trading reactions to prior-session highs and lows.
- Fibonacci levels (experimental) — plots the 0.382, 0.5, and 0.618 retracement levels of the session range inside each box.
- Opening Range — marks the high/low of the first N minutes of each session (lookback configurable, default 30 minutes) with its own color and style.
- Timezone support — set any timezone (e.g. "America/New_York", "GMT+2") so sessions stay correct regardless of the chart's exchange timezone.
Alerts
- Session started / ended — separate alert conditions for each of the five sessions.
- Opening Range breakout — fires when price closes above the opening range high (bullish) or below the opening range low (bearish) of a session.
- Optional on-chart markers ("Start"/"End" and "Bull"/"Bear") can be toggled in the settings.
Notes
- Works on intraday timeframes from 1 to 60 minutes.
- Session times use the HHMM-HHMM format and support overnight sessions (e.g. 2000-0200).
- Written in Pine Script v6.
This script is for informational and educational purposes only and does not constitute financial advice. Indicatore

Minimal Ict killzone (musii)**Five things. One colour. Nothing else.**
This is not an all-in-one. Most ICT scripts throw 40 features and 12 colours at your chart until you can't see the candles. This draws exactly five things, in one colour if you want, as thin and quiet as possible — and it cleans up after itself so old, dead or far-away information never stays on screen.
Built for index futures (NQ / ES / MNQ / MES / YM / RTY) on 1m–1h, works on anything intraday.
---
**WHAT IT DRAWS**
**1 · Sessions (killzones)**
Asia, London, NY AM, Lunch, NY PM — each one is a small labelled header block floating just above the session's high, spanning the session's time, with two faint vertical "curtains" hanging from its edges. That's it. No giant boxes painted over your candles. Session high / low lines are available (dotted, extend until swept, then freeze at the sweep candle) but off by default.
Every session's name, time window and colour is editable inline. Times are anchored to New York regardless of your chart timezone.
**2 · True Day Open (TDO)**
The 00:00 New York open. One line, one tiny `tdo` tag at its right end.
**3 · 10AM Open (the "Powell" open)**
The 10:00 NY open is the open of the new 4-hour candle and the anchor of the 10am Power of 3 — price frequently runs one side of it (manipulation), then displaces through it and expands the other way. The script draws the 10:00 open and runs it to 14:00 (the 4H close) by default.
– Optional "body edge" mode: reads the 10:00 candle — bearish close → line at body top, bullish → body bottom.
– Optional `judas` mark: the first candle that wicks through the 10am level and closes back on the other side. One per day, alertable.
– 6pm futures open available (off by default).
**4 · Turtle Soup (liquidity sweeps)**
A wick takes out a swing high or low and the body closes back inside — that's the mark. Dotted line from the swept swing to the sweep candle, tiny `ts` tag. The same rule optionally fires on the session highs / lows above, so a London-high sweep during NY AM is marked without you drawing anything. Optional filter: only inside session windows.
**5 · SMT Divergence**
Automatic pairing: NQ↔ES, MNQ↔MES, YM/MYM→ES/MES, RTY/M2K→ES/MES — micro stays micro, and it mirrors your exact contract (NQ1! pairs with ES1!, NQZ2026 pairs with ESZ2026). Or force a pair, or type a custom symbol; inverse-correlation switch for pairs that move opposite.
Detection is done the way SMT is actually read: when your swing high confirms, it looks at the pair's highest high across that same window and compares it with the pair's high across your previous swing. You made a higher high, the pair didn't → `smt·es`. No requirement for the pair to print a pivot on the same candle (that's why most SMT scripts miss half of them). A max-distance setting keeps it to the current leg.
---
**THE PART THAT MAKES IT USABLE: IT DECLUTTERS ITSELF**
Every object on the chart has a reason to leave:
– Turtle soup and SMT marks **expire** after N bars (bars, not minutes — so it's the same screen distance on every timeframe).
– A **failed** turtle soup (candle closes back through the swept level) or a failed SMT (close through the divergence pivot) is **deleted**. If a mark is still on your chart, it's still valid.
– Swing candidates **age out** — sweeping a two-day-old pivot on the 1m isn't turtle soup.
– Past sessions and open lines **hide themselves** while price is more than N × ATR away and **reappear** when price comes back into range.
– Opens are **today-only** by default.
– Session history: 1–15 days, one slider.
---
**ONE-COLOUR MODE**
The `style` group has a single switch: *one colour for everything*. Every line, fill, curtain and label is forced to one colour of your choice. Text size, line width and fill transparency are global. If busy charts overstimulate you, this is the reason the script exists.
---
**ALERTS**
Turtle soup bull / bear · SMT bull / bear · 10am judas · 10am open printed.
---
**NOTES**
– Turtle soup and SMT confirm `swing length` bars after the pivot — that's inherent to any pivot-based logic and it does not repaint after confirmation.
– Hidden (far-away) objects are made transparent. If far lines ever squash your auto-scale, right-click the price scale → *Scale price chart only*.
– Intraday only. On daily+ the opens and sessions don't apply and stay off.
– This is a drawing tool, not a signal service. It marks time and structure; the read is yours.
Settings are grouped: style · declutter · sessions · opens · turtle soup · smt. Every input has a tooltip.
Indicatore

Indicatore

Taught to Trade - Backtest Integrity Scanner🔵 OVERVIEW
This does not read your strategy. It measures the chart your strategy is being tested on, and reports which standard backtest assumptions are unsafe here.
Most backtest failures are not logic errors. They are assumptions about the instrument: that costs are negligible, that the sample is large enough, that the data is clean, that the test window contains more than one market regime. Those are properties of the chart rather than of your code, and they can be measured directly.
The table reports ten of them and flags the ones that need attention.
🔵 HOW TO READ THE TABLE
Header shows bars available and years of history on this chart and timeframe.
Approx trades available. Bars divided by your assumed holding period. Flags CHECK below the minimum you set. Expectancy measured on a handful of trades is not measurable.
Median bar range. The middle bar's high to low as a percentage of price. This is what one bar is worth here.
Round-trip cost. Your commission plus slippage, both sides.
Cost / median bar. The number that matters most. It is the fraction of a typical bar's entire range consumed by entering and exiting once. On a 15-minute crypto chart with ordinary retail costs this routinely exceeds 50 percent. A strategy whose average win is smaller than a median bar cannot survive that, and no amount of parameter tuning changes it.
One-bar head start. The average absolute distance from one bar's close to the next bar's open, as a percentage. This is what a same-bar lookahead error is worth on this instrument.
Head start / cost. The head start expressed in round trips. Above 1.0x, a one-bar lookahead bug hands a backtest more than a full round trip of free edge per trade, which is enough to invent an edge out of nothing.
Zero-volume bars. Bars where nothing traded. A backtest will happily fill you on them.
Gaps above the ATR multiple. Bars that opened far from the previous close. Stops and limits behave very differently across these than a backtest assumes.
Volatility regime now. Current ATR percentile band, plus the share of the sample sitting in the high and low thirds. Flags CHECK when one regime dominates, because an edge measured inside a single regime is a regime bet.
🔵 SETTINGS
Cost assumptions: commission and slippage per side. Use your broker's real numbers. Zero slippage is the most common dishonest backtest setting.
Sample: window length, assumed bars held per trade, and the minimum trade count you would accept.
Data checks: ATR length, the gap threshold, and the cost share at which the warning fires.
Table: position and text size.
🔵 ALERTS
Four alert conditions are provided and none fire on their own. You configure them yourself in the alerts dialog. This script does not send buy or sell signals and never will.
🔵 WHERE IT FAILS
This tool is about limits, so it should be honest about its own.
It cannot see your strategy. It has no access to your entry logic, your fills, or your equity curve. It measures the environment, which means a table full of OK does not mean your backtest is honest. It means these particular environmental assumptions are not the thing breaking it.
The cost inputs are yours. Enter a fantasy number and you get a fantasy verdict. The script cannot verify what you actually pay.
Median bar range is a poor summary of a fat-tailed distribution. It deliberately ignores the tails, and the tails are where a lot of real outcomes live.
The one-bar head start figure is an average across the sample. On the individual bars that matter most, the violent ones, it is far larger than the average suggests.
The regime split uses ATR terciles computed inside the same window it is judging. On a short window that is close to circular, and it will call a quiet sample balanced when the market simply has not moved yet.
The trade count is an estimate from a holding period you typed in, not from a real trade list.
Data checks are limited to what TradingView provides for the symbol. Survivorship bias in your symbol universe is invisible here, and it is one of the largest backtest errors there is.
Open source, so you can read every calculation rather than take any of this on trust.
Educational tool only, not investment advice. It does not predict anything and does not generate signals. Trading involves substantial risk of loss. Indicatore

Earnings Drift RadarEarnings Drift Radar
Does a stock keep its lead after earnings?
Earnings Drift Radar follows a stock's performance relative to a market benchmark and a selected sector benchmark from an earnings reaction day. It separates the initial relative reaction from the subsequent change in that lead.
READING THE RADAR
• Green line: stock return minus sector return, in percentage points.
• Blue line: stock return minus market return, in percentage points.
• Zero line: equal performance since the same starting point.
• Blue shading and a green dot: the selected reaction day.
• Orange downward marker: a previously positive sector lead crosses to zero or below.
The dashboard describes the sector lead as growing, holding, fading, lost, or underperforming. These states describe relative price behavior; they are not buy or sell instructions.
A SIMPLE EXAMPLE
Stock A rises 6% while its sector rises 5%: its sector lead is +1 percentage point.
Stock B rises 2% while its sector falls 4%: its sector lead is +6 percentage points.
The smaller absolute gain can represent stronger relative performance.
If the initial sector lead is +4 pp and later falls to +2 pp, the radar shows 50% of the initial lead retained. This ratio is available only for sufficiently positive initial reactions. It may exceed 100% or turn negative.
HISTORICAL CONTEXT
The table summarizes sector excess returns at D+5, D+10 and D+20, where D0 is the reaction day. Each horizon includes only completed valid observations from the selected recent event window. It displays sample count, mean, median and percentage of positive excess returns. The positive percentage is not a trading win rate.
SETUP
Use a standard 1D chart of a USD stock and matching US-session USD benchmarks. SPY is the default market benchmark. XLK is a technology-sector example: choose the appropriate sector ETF yourself.
Choose Feed event bar, Next trading bar, or Manual date. TradingView earnings data does not reliably resolve every release time. Verify D0 against the actual announcement; shifting to the next bar applies to all reports. Manual mode studies one chosen event.
METHOD AND LIMITS
The reference prices are the split-adjusted regular-session closes immediately before D0. Calculations use simple price-return differences, without beta modeling, dividend returns or currency conversion. Missing or misaligned benchmark data invalidates the remainder of that event. New earnings events replace unfinished observation windows.
Updates and alert conditions use confirmed daily closes. Historical feed corrections and setting changes can change results. Relative performance does not prove that earnings caused a move. Small samples should be interpreted cautiously. This is an analytical indicator, not a validated trading strategy or a profitability claim.
ALERTS
New earnings reaction; sector lead lost; sector lead recovered; sector lead starts fading. Configure alerts separately in TradingView.
Indicatore

Adaptive Supertrend MA Crossover StrategyAdaptive Supertrend MA Crossover
Overview
This strategy trades the crossover between a Moving Average and a Supertrend line - a classic trend-following combination - but with two design choices that set it apart from the standard version of this idea already published elsewhere:
1. The Supertrend and the Moving Average each take their own independently selectable price source (Open, High, Low, Close, HL2, HLC3, OHLC4, or HLCC4), rather than both being locked to Close.
2. A new Moving Average source option: "EMA of Supertrend." Instead of feeding the MA a raw price series, this applies an EMA directly to the Supertrend line itself, and then runs your chosen MA type (SMA/EMA/HMA/WMA) on top of that smoothed line. The result is a crossover between two different "views" of the same underlying trend structure, rather than a crossover between price and trend.
Why "EMA of Supertrend" matters
A standard Supertrend line is deliberately steppy - it holds a level and jumps, rather than moving smoothly, which is what makes it useful as a stop/trend marker but also means a plain price-vs-Supertrend crossover can be noisy on choppy days (price whipsaws across a flat Supertrend step repeatedly).
Applying an EMA to the Supertrend line first produces a smoothed trend proxy that still reacts to genuine Supertrend flips, but rounds off the sharp step edges. Running your chosen Moving Average on top of that, rather than on top of price, means the crossover signal is comparing two related measures of trend, not fighting against Supertrend's inherent steppiness. This tends to produce fewer false flips in sideways conditions while still catching genuine trend changes, without adding a second unrelated indicator to the chart.
This source option is exposed directly in the settings (MA Source = "EMA of Supertrend"), with its own dedicated smoothing period, so it's a toggle away from the standard price-source approach for direct comparison on your own charts.
Caption: Chart example on GOLDPETAL, 15-min: long & short entry on the MA-Supertrend crossover.
How it works
Supertrend: calculated from your selected source (default HL2, the traditional Supertrend basis) with a configurable ATR Period and ATR Factor. Unlike TradingView's built-in Supertrend function (which is hard-coded to HL2), this version lets the basis price and the trend-flip check both use whichever source you select.
Moving Average: choose SMA, EMA, HMA (Hull), or WMA, computed on your selected source, including the "EMA of Supertrend" option described above.
Entry signal: long when the Moving Average crosses above the Supertrend line, short on the opposite cross.
Reverse Trading Mode: a single toggle that inverts the signal (useful for quickly testing whether the opposite side of a crossover performs better on a given instrument/timeframe, without rebuilding the logic).
Stop Loss / Take Profit: both optional and independently toggleable, with a shared basis switch between Percentage (of entry price) and Points, so the same settings panel works whether you're trading a low-priced or high-priced instrument.
Settings guide
(select this whole list after pasting and click the bullet-list button)
Supertrend Source - price series used for the Supertrend basis and trend-flip check
ATR Period / ATR Factor - standard Supertrend volatility inputs
MA Type - SMA / EMA / HMA / WMA
MA Source - price source, or "EMA of Supertrend"
EMA of Supertrend Period - smoothing period applied to the Supertrend line (only active when MA Source = EMA of Supertrend)
Reverse Trading Mode - inverts long/short signals
Use SL / Use TP, Basis, Values - optional exit management, Percentage or Points
Caption: Strategy Tester summary, GOLDPETAL futures, 15-min, , default settings.
Disclaimer:
This script is a technical trading tool for educational and informational purposes. It does not constitute financial advice, and past performance in backtesting does not guarantee future results. Always test thoroughly on your own instruments and timeframes, and use appropriate risk management, before considering live use. Strategia

Reversal Scanner V4 Multi-Timeframe Exhaustion & ContextReversal Scanner V4 is a multi-timeframe market-state scanner designed to identify directional moves that are becoming increasingly favorable for a potential reversal.
The core idea behind the scanner is simple:
Distance alone does not make a market overextended. How the market traveled that distance matters.
A market that moves 2 ATR over several days through slow, overlapping price action is fundamentally different from one that moves the same distance through rapid expansion, high velocity, and strong directional participation.
Rather than treating every large move as a reversal opportunity, this scanner attempts to answer three separate questions:
1. Is there actually a meaningful directional move in progress?
2. Has that move become statistically or structurally extended?
3. Is the impulse that created the move beginning to deteriorate?
The scanner uses Daily + 1H + 4H analysis to separate these functions.
The Daily timeframe provides the broader move and extension context. The 1H timeframe measures the behavior and velocity of the active impulse. The 4H timeframe evaluates the structure of the move and whether lower-timeframe price action supports the broader reversal thesis.
Understanding the Dashboard
ACTIVE MOVE
This section establishes the directional move currently being evaluated.
Move Age measures how long the active directional move has been developing.
Move / Daily ATR normalizes the total displacement of the move against the instrument's Daily ATR. This makes the scanner more comparable across markets with very different nominal prices and volatility.
A 100-point move in one market may be insignificant while the same nominal move in another could be extreme. ATR normalization helps solve that problem.
IN-PLAY SCORE
The In-Play Score measures whether the current move is sufficiently active to deserve attention.
It incorporates characteristics such as:
Current Velocity — how quickly price is currently moving relative to its normal behavior.
Move RVOL — relative volume associated with the move.
Range Regime — whether current price ranges are compressed, normal, or expanded.
High In-Play readings indicate that the scanner is evaluating a meaningful active move rather than ordinary market noise.
Importantly:
IN PLAY does not mean ENTER.
It means the move has enough activity to warrant further evaluation.
EXTENSION SCORE
Extension measures how far the market has traveled relative to its normal behavior.
The scanner evaluates factors including:
Daily Z-Score — statistical displacement relative to the instrument's recent distribution.
Directional Days — persistence of movement in the current direction.
Hard Extension — identifies particularly extreme displacement conditions.
This section answers:
"Has price traveled far enough for a reversal thesis to become reasonable?"
A market can have extremely high velocity without being sufficiently extended. Likewise, a market can be statistically extended while still possessing enough momentum to continue moving.
For that reason, extension is only one component of the scanner.
IMPULSE HISTORY
This section evaluates the strongest part of the directional move rather than looking only at current conditions.
It tracks characteristics such as:
Peak Velocity — the strongest velocity reached during the move.
Peak Acceleration — the strongest acceleration event observed during the move.
Current Acceleration — how much acceleration remains now.
Deceleration — how substantially the current impulse has deteriorated from its peak.
This is one of the most important concepts behind the scanner.
A market may currently appear slow precisely because it has already exhausted an extremely aggressive impulse.
For example:
High peak velocity → acceleration spike → substantial deceleration
is fundamentally different from:
Low velocity → low acceleration → continued slow movement.
The first represents a potentially exhausted impulse. The second may simply represent a market that was never particularly impulsive.
The scanner therefore preserves information about the history of the move, rather than allowing current conditions to erase evidence of the original expansion.
4H STRUCTURE
The 4-hour layer provides intermediate structural context between the Daily move and 1H impulse measurements.
It evaluates:
4H Legs — the number of meaningful structural legs within the move.
4H Efficiency — how efficiently price has traveled in the dominant direction.
4H Direction — whether intermediate structure remains aligned with the larger move.
Structure Quality provides an overall assessment of whether the move has developed through relatively clean directional structure or increasingly messy/choppy price action.
This is important because mature trends frequently transition from efficient directional movement into overlapping, inefficient structure before a larger reversal develops.
Final Status
The scanner combines these independent components into a final market-state classification.
Rather than producing a binary BUY or SELL signal, it progresses through different stages as the reversal thesis develops.
For example:
WAIT / DEVELOPING
A move exists, but the conditions required for a high-quality reversal thesis have not sufficiently developed.
REVERSAL WATCH
Extension, impulse history, and/or structural deterioration are becoming meaningful enough to begin monitoring the opposite direction.
PRIORITY REVERSAL
Multiple components of the model have aligned sufficiently for the market to become a higher-priority reversal candidate.
The dashboard also displays Potential LONG or Potential SHORT based on the direction opposite the active move.
A bullish active move therefore creates a potential short reversal thesis, while a bearish active move creates a potential long thesis.
How I Use It
This scanner is intended to answer where to look, not when to enter.
My workflow is:
Scan multiple futures markets for high-quality active moves.
Identify instruments progressing into Reversal Watch or Priority Reversal.
Determine whether the move shows a combination of meaningful extension, historically strong impulse, substantial deceleration, and deteriorating/appropriate 4H structure.
Move to a lower timeframe and wait for an actual reversal setup.
Use independent price-action confirmation for execution and risk management.
For example, a market showing:
Strong directional move
High historical velocity
Large acceleration spike
Significant extension
95%+ deceleration from peak impulse
Mature 4H structure
would receive substantially more attention than a market that is merely far away from its starting price.
The scanner itself is not the entry trigger.
Why Multiple Timeframes?
The scanner deliberately separates the analysis across three time horizons:
Daily = Context & Extension
Where is the market within the larger move?
1H = Impulse & Velocity
How aggressively did the move occur, and is that aggression still present?
4H = Structure
How clean or mature is the intermediate structure connecting those two perspectives?
This prevents a common problem with reversal systems: attempting to make a single timeframe simultaneously determine trend, extension, exhaustion, and execution.
What the Scanner Is Designed to Find
The ideal candidate is not simply an "overbought" or "oversold" market.
It is a market that experienced a meaningful directional impulse, traveled far enough to become relevant, and is now showing evidence that the characteristics responsible for that move are deteriorating.
Conceptually:
Impulse → Expansion → Extension → Deceleration → Structural deterioration → Reversal opportunity
The scanner attempts to quantify the first five stages.
Price action determines the sixth.
Important
This indicator is a context and market-state tool, not a standalone trading system.
IN PLAY, REVERSAL WATCH, PRIORITY REVERSAL, Potential LONG, and Potential SHORT should not be interpreted as automatic trade entries.
They identify conditions that may warrant additional analysis.
Users should independently determine entries, stops, targets, position sizing, and risk management.
Past market behavior does not guarantee future results. Indicatore

Mirror BiasSee the market from the other side.
Mirror Bias is a visual context indicator designed to challenge directional bias by displaying price action as a true vertical reflection of the underlying chart.
Instead of trying to predict whether the market is bullish or bearish, Mirror Bias asks a different question:
"Would this chart look the same to me if I couldn't rely on the usual visual direction of price?"
How it works
Mirror Bias mathematically reflects the OHLC data across a horizontal axis, i.e.,:
Mirrored Price = -Price
Because the transformation is applied to the actual OHLC values, the candles retain their original proportions, structure, gaps, wicks, and relationships. Time remains unchanged; only the vertical orientation is reversed.
This is a true geometric mirror of price action.
Why Mirror Bias is different
Some indicators described as "inverted candles" use a reciprocal transformation such as:
1 / Price
That is a nonlinear inverse-price transformation and is useful for certain comparative applications, but it is not a geometric reflection of the chart. TradingView seems to be lacking a true mirror of price action so I am adding this for public use.
Mirror Bias takes a different approach: the shape of the market is preserved while its visual orientation is reversed.
Use it as a bias-checking tool
Markets can be surprisingly difficult to evaluate objectively when our brains are conditioned to associate:
Rising charts with bullishness
Falling charts with bearishness
Green candles with opportunity
Red candles with danger
Mirror Bias provides an alternate visual perspective that can make familiar structures feel unfamiliar again.
Try analyzing the mirrored chart before looking back at the original chart. You may notice:
Trend structure you hadn't consciously recognized
Support and resistance relationships from a different perspective
Pullbacks that look different when the visual direction is reversed
How strongly candle colors influence your interpretation
Whether your market view is based on structure or simply visual habit
Optional contextual tools
Mirror Bias can remain completely clean and minimal, or additional context can be enabled when needed:
Swing Structure : Displays confirmed HH, HL, LH, and LL labels from the original price action.
Daily Open : Mirrors the current session's daily open.
Previous Day High / Low : Mirrors the prior day's key levels.
VWAP : Mirrors session VWAP on intraday charts.
20 / 50 / 200 EMA : Adds mirrored moving-average context.
Original Direction : Optionally reveals the underlying market's relationship to a selected EMA.
Candle Color Modes : Preserve the original colors, invert them, or use neutral candles.
All contextual elements are transformed into the same mirrored coordinate system so they remain consistent with the visual perspective.
A note on interpretation
The Mirror Bias script's purpose is perspective.
Use it to step outside an established narrative, question your assumptions, and compare your first impression with what you see when the same market is presented from the opposite visual direction.
Does your interpretation change simply because the chart was facing the other way?
Indicatore

Breakout Failure RadarBreakout Failure Radar
Follow the breakout. Keep the original level. Recognize when the structure fails.
Breakout Failure Radar tracks what happens after a price-channel breakout. It freezes the original breakout level and volatility reference, then monitors whether price holds a retest or closes back through the failure threshold.
READ THE COLORS
Blue B+ / B− — Breakout detected
A new upward or downward breakout enters observation.
Green R+ / R− — Retest held
Price touches the frozen retest zone and closes back on the breakout side. Monitoring continues.
Orange F+ / F− — Breakout failed
Price closes beyond the failure threshold on the opposite side of the original level.
Gray square — Window complete
The observation window ends without a defined failure. This does not indicate a profitable trade.
The + and − signs always refer to the original breakout direction. F+ identifies a failed upward breakout; F− identifies a failed downward breakout.
HOW A BREAKOUT IS DETECTED
The default channel uses the highest high and lowest low of the previous 20 completed candles. The current candle is excluded.
An upward breakout requires:
• A close more than 0.10 ATR14 above the upper channel.
• The previous close to have been at or below its own previous upper channel.
Downward breakouts use the opposite conditions.
The channel boundary and ATR are frozen when the breakout is confirmed. Later price movements do not move these reference values.
RETEST OR FAILURE?
The default observation window covers the next five candles, excluding the breakout candle.
The retest zone extends 0.25 frozen ATR on either side of the original level. A held retest requires the candle’s range to intersect this zone and its close to finish more than 0.10 frozen ATR on the original breakout side.
A failure occurs when price closes more than 0.10 frozen ATR on the opposite side of the original level.
A held retest does not end the observation. The same breakout can hold a retest and still fail later.
WORKED EXAMPLE
Hypothetical prices using the default settings.
An upward breakout freezes a level of 100 and an ATR of 4. Price closes at 102, satisfying the breakout conditions.
• Retest zone: 99 to 101.
• Held retest: The candle touches this zone and closes above 100.40.
• Failure: A subsequent candle closes below 99.60 within the observation window.
• Still unresolved: A close at 99.80 is below the original level but has not crossed the failure threshold.
The buffers distinguish a small move around the level from a confirmed condition. They do not guarantee that price will continue or reverse.
MONITORING RULES
• Only one breakout is monitored at a time. Additional breakouts during an active observation are ignored.
• A held retest is reported only once per setup.
• A gap that skips the entire retest zone does not count as a touch.
• Failure takes priority over window completion on the final observation candle.
• A first held retest and window completion can occur on the same final candle.
• A new observation can start no earlier than the candle after the previous observation ends.
• A rejected crossing is not automatically activated later; a fresh channel crossing is required.
DISPLAY AND ALERTS
The frozen level and retest zone are displayed through the observation’s final candle. Historical markers remain on the candles where their conditions were confirmed.
The status panel shows:
• Original breakout direction and latest status.
• Frozen breakout level.
• Number of candles monitored.
• Distance from the latest confirmed close to the frozen level, measured in frozen ATR. Positive values indicate the original breakout side.
• Whether a held retest occurred during the observation.
Five alert conditions are available:
1. New breakout under observation.
2. Retest held.
3. Upward breakout failed.
4. Downward breakout failed.
5. Monitoring window complete.
Choose Once Per Bar Close when creating alerts.
CONFIRMED-CANDLE BEHAVIOR
State changes and event markers are confirmed at candle close. The script does not use future candles, backdated signals or lookahead requests.
Historical data corrections, changes to chart history and different input settings can still change historical results. Use standard candles for interpreting the price-based rules.
RESEARCH AND LIMITATIONS
The default rules were examined on daily BTC, ETH, SOL, BNB and XRP USD histories from January 2021 through September 10, 2026.
The proportion of completed observations meeting the failure definition was:
• 2021–2023: 44.93% across 276 observations.
• 2024–2025: 46.63% across 178 observations.
• 2026: 55.38% across 65 observations.
These figures describe how frequently the chosen failure condition occurred. They are not prediction accuracy or trading win rates.
Average price movement after a warning changed direction between the examined periods. The study therefore did not establish a stable advantage from automatically trading against failed breakouts.
The analysis does not model portfolio exposure, execution costs, funding, stop-losses or actual fills. The five cryptocurrencies are a selected and correlated sample.
The indicator can calculate on stocks and other timeframes, but this research covers cryptocurrency daily candles with the default settings only.
WHAT MAKES THIS TOOL DISTINCT
The implementation combines a Donchian-style channel and Wilder ATR with frozen reference levels, a defined observation window and continued monitoring after a held retest. Each component serves the specific purpose of tracking how an individual breakout develops.
It operates independently of Crypto Breakout Compass and does not import that indicator’s signals.
Breakout Failure Radar is a market-structure monitoring tool. A failure warning identifies a condition that has already occurred; it is not an automatic instruction to enter the opposite trade. Indicatore

Crypto Breakout CompassCRYPTO BREAKOUT COMPASS
A clear framework for reading crypto breakouts — from market context to confirmed signals.
Crypto Breakout Compass highlights price-channel breaks that also meet trend, volatility and candle-strength conditions. Its purpose is to make breakout selection visible and explainable. It is a chart-analysis indicator, not an automated trading strategy.
THE SIGNAL PATH
Price-channel break → Trend alignment → Volatility & candle checks → Confirmed close → B+ or B−
Each filter has a specific job: the channel identifies a break, the EMAs establish direction, ATR limits volatility and extension, and candle location checks whether the move held into the close. A shared cooldown limits repeated alerts.
1. READ THE CHART
• Teal channel: highest high of the previous 20 completed candles.
• Red channel: lowest low of the previous 20 completed candles.
• Orange line: EMA50. Blue line: EMA200.
• Teal / red background: confirmed bullish / bearish trend alignment.
• B+: confirmed bullish breakout. B−: confirmed bearish breakout.
• Status panel: last confirmed trend, ATR percentage and current gate status.
The current candle is excluded from the channel calculation. A colored background alone is not a breakout signal.
2. WHAT QUALIFIES AS A SIGNAL?
Bullish — B+
The close moves above the upper channel, while the preceding close was at or below its own upper channel. Price must close above EMA50, EMA50 must be above EMA200, and EMA200 must be higher than five bars earlier. The close must finish in the top 30% of the candle.
Bearish — B−
The close moves below the lower channel, while the preceding close was at or above its own lower channel. Price must close below EMA50, EMA50 must be below EMA200, and EMA200 must be lower than five bars earlier. The close must finish in the bottom 30% of the candle.
Shared checks
• ATR14 must be positive and no more than 12% of the closing price.
• The close must extend no more than 1 ATR beyond the broken channel.
• At least 10 bars must separate signals, across both directions.
• The candle must be closed and the warmup complete.
A rejected breakout is not automatically accepted later. A fresh channel crossing is required. Zero-range candles receive a neutral close location and cannot meet the default candle-strength threshold.
3. WORKED EXAMPLES
Hypothetical prices, using the default settings. These illustrate the rules, not actual trades or forecast returns.
Example A — bullish qualification
Upper channel = 100 | ATR = 4
Candle: high 103, low 98, close 102
EMA50 = 99 | EMA200 = 95 and rising
The close is 2 points above the channel: 2 ÷ 4 = 0.5 ATR. Its location within the candle is (102 − 98) ÷ (103 − 98) = 80%, inside the top 30%. ATR is approximately 3.92% of close, below the 12% cap. If the previous-close crossing condition, warmup and cooldown are also satisfied, B+ appears at candle close.
Example B — bearish qualification
Lower channel = 100 | ATR = 4
Candle: high 102, low 97, close 98
EMA50 = 105 | EMA200 = 110 and falling
The close is 0.5 ATR below the channel and sits 20% of the way up the candle, inside the bottom 30%. ATR is approximately 4.08% of close. If the remaining conditions are satisfied, B− appears at candle close.
Example C — an extended move is rejected
Upper channel = 100 | ATR = 4 | Close = 106
The extension is 6 ÷ 4 = 1.5 ATR, exceeding the default 1 ATR limit. No B+ is printed, even if the trend is bullish. This illustrates the extension filter; it does not imply the price cannot continue higher.
4. QUICK START & ALERTS
Start with regular 1D cryptocurrency candles and the default inputs. The default warmup requires at least 205 previous bars. Separate alert conditions are available for bullish and bearish breakouts; choose “Once Per Bar Close” when creating an alert.
The research covers daily candles only. Other intervals display “Unvalidated timeframe”. Changing inputs also moves beyond the tested defaults. Bearish markers describe price direction; they do not imply that short selling is available on a spot market.
5. CONFIRMATION & DATA BEHAVIOR
Markers and saved status update only on confirmed candle closes. Channel lines and EMAs can move while a candle is open. The script uses no future bars, pivot backdating or lookahead requests. Historical data corrections, feed changes, available history and input changes can still affect historical signals.
The indicator runs entirely on TradingView chart data and requires no API key. Prices and day boundaries can differ between exchanges and USD/USDT pairs.
6. WHAT THE RESEARCH DOES — AND DOES NOT — SHOW
Fixed default rules were examined on historical daily BTC, ETH, SOL, BNB and XRP USD series from January 2021 through September 10, 2026. No parameter search was performed for this study.
The event study measures directional price change from the next daily open after a signal to the close of the tenth following candle. A simple 0.30 percentage-point round-trip cost deduction was also examined. This is not a portfolio backtest: it does not model funding, leverage, actual fills, stops or compounding.
In the 2024–2025 validation window, 67 filtered events had a mean directional change of +1.114% and a median of −1.236%. The unfiltered channel baseline, with the same cooldown, averaged +1.240% across 159 events. The worst filtered adverse excursion within an observation window was −34.744%.
The later 2026 window contained only 15 filtered events, of which 14 were bearish. This small, directionally concentrated sample does not establish a general trading edge. The five coins are also a selected, correlated sample. The evidence is mixed, and positive average event returns should not be interpreted as verified strategy profitability.
SCOPE & ORIGINALITY
This implementation combines a prior-bar Donchian-style channel, standard EMAs and Wilder ATR with directional candle location, extension limits and a shared signal cooldown. The code was written independently for this tool. Its contribution is the explicit qualification process and closed-bar status display, not a claim to have invented the underlying indicators.
Crypto Breakout Compass does not place orders or prescribe position sizes, stop-losses or exits. Use it to inspect market structure and test hypotheses; a marker is not a guarantee of follow-through. Indicatore

Indicatore

RSI + S/R + FVG + BOS + CHoCH SetupRSI + Support/Resistance + FVG + BOS + CHoCH
This indicator combines five popular technical analysis concepts into one structured market setup: RSI, Support & Resistance, Fair Value Gaps (FVG), Break of Structure (BOS), and Change of Character (CHoCH).
The goal is to identify higher-quality potential long and short setups by requiring multiple confirmations instead of relying on a single indicator.
How the Indicator Works
🟢 Long / BUY Setup
A bullish setup is generated when the following conditions align:
Support: Price is trading near a recent swing-low support area.
BOS / CHoCH: The market confirms bullish structural strength by breaking a previous swing high.
Bullish FVG: A bullish Fair Value Gap is detected or price returns into the latest bullish FVG.
RSI: RSI is above the configured bullish level, confirming bullish momentum.
When the required conditions are satisfied, the indicator displays a BUY signal.
Basic flow:
Support → Bullish BOS/CHoCH → Bullish FVG → RSI Confirmation → BUY
🔴 Short / SELL Setup
A bearish setup is generated when:
Resistance: Price is trading near a recent swing-high resistance area.
BOS / CHoCH: The market confirms bearish structural weakness by breaking a previous swing low.
Bearish FVG: A bearish Fair Value Gap is detected or price returns into the latest bearish FVG.
RSI: RSI is below the configured bearish level, confirming bearish momentum.
When the required conditions are satisfied, the indicator displays a SELL signal.
Basic flow:
Resistance → Bearish BOS/CHoCH → Bearish FVG → RSI Confirmation → SELL
Main Features
RSI Confirmation
Uses RSI to help determine whether bullish or bearish momentum is present. The RSI levels can be customized according to your trading style.
Support & Resistance
Recent swing highs and swing lows are used to identify potential resistance and support areas.
BOS — Break of Structure
Detects when price breaks an important recent swing high or swing low, helping identify continuation or structural changes.
CHoCH — Change of Character
Helps identify potential changes in market direction when price breaks structure against the previously established trend.
FVG — Fair Value Gap
Identifies three-candle price imbalances and displays bullish and bearish FVG zones directly on the chart.
Signal Window
The structure confirmation can remain valid for a configurable number of bars, allowing price time to return toward an FVG or key level.
Alerts
BUY and SELL alert conditions are included so you can create TradingView alerts when a setup is confirmed.
Recommended Usage
The indicator is designed to be used as a confluence-based confirmation tool, rather than as a standalone automatic trading system.
For example, a trader could wait for:
1. Price to approach support.
2. A liquidity reaction or market-structure shift.
3. Bullish BOS/CHoCH confirmation.
4. A bullish FVG to form or become available for a retracement.
5. RSI to confirm bullish momentum.
6. BUY signal to appear.
7. Stop-loss to be placed below the relevant swing/support.
8. Take-profit to be based on a predefined risk/reward ratio or the next major resistance/liquidity area.
The opposite process can be used for short trades.
Important Note
This indicator does not guarantee profitable trades. Market conditions, volatility, timeframe, spread, liquidity and execution can significantly affect results.
BOS, CHoCH, FVG, support/resistance and RSI are interpreted using predefined mathematical rules in the script. These definitions may differ from how individual traders manually identify them.
Always test the indicator on your preferred market and timeframe before using it with real money, and use appropriate risk management.
Best practice: combine the signals with higher-timeframe market structure, liquidity levels and disciplined risk management rather than taking every BUY or SELL signal automatically. Indicatore

FVG Precision | Exact Labels | 2R | WebhookFVG Precision | Exact Labels | 2R | Webhook is a Fair Value Gap (FVG) trading indicator designed to identify structured bullish and bearish FVG setups, wait for price to return into the imbalance, confirm rejection, and then display a complete trade setup with entry, stop loss, take profit, and trade direction.
HOW THE INDICATOR WORKS
The indicator looks for bullish and bearish Fair Value Gaps created by strong price displacement.
A bullish FVG is detected when price creates an upside imbalance between candles.
A bearish FVG is detected when price creates a downside imbalance between candles.
The script uses ATR-based filters to reduce very small or weak gaps and also checks for displacement strength before accepting an FVG.
After an FVG is identified, the indicator waits for price to return and fully fill the qualifying area.
When rejection confirmation is enabled, a trade signal is not generated simply because price touches the FVG. Price must fill the zone and then show confirmation back in the expected direction.
For bullish setups, the script looks for bullish rejection and a close back through the required portion of the FVG.
For bearish setups, the script looks for bearish rejection and a close back through the required portion of the FVG.
This helps filter out many simple touches that do not produce a confirmed reaction.
ENTRY
Once all conditions are satisfied, the indicator creates either a BUY or SELL signal.
The official entry price is based on the closing price of the candle that confirms the setup.
The indicator displays:
• BUY or SELL direction
• Exact entry price
• Signal time in Eastern Time
• Active entry FVG
• Stop Loss
• Take Profit
• Current trade status
STOP LOSS
Stops are structure-based rather than using an arbitrary fixed distance.
For BUY setups, the stop is placed below the most recently confirmed swing low, including the selected stop buffer.
For SELL setups, the stop is placed above the most recently confirmed swing high.
This allows the risk level to adapt to the current market structure.
TAKE PROFIT
The default take-profit target uses a 1:2 risk-to-reward ratio.
This means:
Risk = 1R
Target = 2R
For example:
If the distance between entry and stop loss is 5 points, the take-profit target is positioned approximately 10 points from the entry in the profitable direction.
The 2R level is automatically calculated for every qualifying setup.
ONE ACTIVE TRADE AT A TIME
The indicator is intentionally designed to manage only one active signal at a time.
While a BUY or SELL setup is active, the indicator will not issue another new trade signal.
A new setup becomes eligible after the current trade ends through:
• Take Profit
• Stop Loss
• FVG invalidation
• Weekend reset
This design helps prevent conflicting BUY and SELL signals from being active simultaneously.
ACTIVE FVG INVALIDATION
The original FVG remains part of the trade-management logic.
If price closes through the active FVG in the invalid direction before the trade completes, the indicator can classify the setup as:
FVG BROKEN
The active setup is then cancelled.
TRADING SESSION
Signals are restricted to the futures trading window used by this indicator:
Sunday 6:00 PM ET
through
Friday 4:00 PM ET
Saturday is disabled.
A weekend reset occurs Friday at 4:00 PM Eastern Time.
SUPPORTED CHART TIMEFRAMES
The indicator can visually operate on:
• 1 Minute
• 5 Minute
• 15 Minute
• 30 Minute
RECOMMENDED / PRIMARY TIMEFRAME: 15 MINUTES
The 15-minute timeframe is the primary timeframe this version is designed to be used with.
Compared with the lower timeframes, the 15-minute chart generally provides a cleaner view of market structure and reduces the amount of short-term price noise seen on very small candles.
IMPORTANT WEBHOOK RULE:
Only signals generated on the 15-minute timeframe are permitted to send trade-copier webhook events.
1 Minute:
Indicator can display setups, but website webhook transmission is OFF.
5 Minute:
Indicator can display setups, but website webhook transmission is OFF.
15 Minute:
Indicator displays setups AND webhook transmission is ON.
30 Minute:
Indicator can display setups, but website webhook transmission is OFF.
This restriction was intentionally added so an external trade copier or automation system receives only the selected 15-minute signals rather than signals from multiple chart timeframes.
WEBHOOK / AUTOMATION SUPPORT
The indicator contains machine-readable webhook functionality for integration with an external trade-management or trade-copying application.
Supported webhook lifecycle events include:
• ENTRY
• TP_HIT
• SL_HIT
• FVG_BROKEN
• WEEKEND_RESET
Every new trade receives a unique signal ID.
That same signal ID follows the trade throughout its lifecycle so an external application can associate subsequent events with the correct original signal.
ENTRY webhook data can include:
• Unique Signal ID
• Symbol
• TradingView Symbol
• BUY / SELL direction
• Timeframe
• Signal timestamp
• Entry price
• Stop Loss
• Take Profit
• Risk/Reward
This provides a structured foundation for webhook-based alerts and external automation.
BENEFITS
The purpose of FVG Precision is to make Fair Value Gap trading more structured and easier to interpret.
Key benefits include:
• Automatically identifies qualifying bullish and bearish FVGs
• Uses displacement and ATR filters to reduce weak setups
• Waits for FVG interaction instead of signaling immediately
• Optional rejection confirmation helps filter simple touches
• Automatically identifies BUY and SELL opportunities
• Displays exact entry prices
• Automatically calculates structure-based stop losses
• Automatically calculates a 2R profit target
• Displays the active FVG visually
• Prevents multiple active signals at the same time
• Provides FVG invalidation logic
• Restricts signals to the selected trading session
• Provides BUY, SELL, TP, SL and FVG Broken alerts
• Supports structured webhook integration
• Restricts automated webhook transmission to the preferred 15-minute timeframe
IMPORTANT
This indicator is a decision-support and automation tool. Signals are based on predefined technical conditions and do not guarantee profitable trades.
Historical or visually successful setups do not guarantee future results. Slippage, liquidity, market volatility, news events, execution quality, commissions, and other market conditions can materially affect actual results.
Users should test the indicator thoroughly and use appropriate risk management before using any signal for live trading. Indicatore

Previous Day Levels & BOS (v4.0.0)Indicator Overview
This custom Pine Script v6 trading indicator combines Previous Day High/Low (PDH/PDL) boundary tracking, multi-trigger Break Signals, and Break of Structure (BOS) logic into a unified, clean charting tool. Designed for precision execution, the script tracks session boundaries strictly using calendar days to prevent Sunday and Monday session combining, while enforcing structural constraints on market structure breaks.
Core Functional Components
Previous Day Levels: Plots dynamic lines representing the high and low of the previous calendar day, adapting automatically as sessions roll over.
Break Signals: Evaluates multi-trigger crosses against PDH and PDL bounds, printing designated arrows whenever price breaks these key liquidity thresholds.
Structure Breaks (BOS): Identifies swing highs and lows post-PD break, restricting BOS prints strictly within the boundaries of the Previous Day High and Low levels.
Alert System: Fully equipped with built-in native alerts for bullish, bearish, and any combined BOS events.
Complete Revision History
v1.0.0: Established initial session logic and PDH/PDL level plotting.
v1.1.0: Transitioned to strict calendar day tracking to fix Sunday and Monday session combining issues.
v1.2.0: Introduced built-in alert conditions for Bullish, Bearish, and Any BOS configurations.
v1.3.0: Enforced sequence rules requiring a PD break before evaluating BOS structures.
v1.4.0: Removed price boundary filters on post-PD break swings to capture broader structural setups.
v1.5.0: Explicitly anchored version 6 header at line 1 to resolve compiler issues.
v1.6.0: Upgraded the BOS engine to utilize array tracking, preventing swing point overwriting.
v1.7.0: Added automated removal for BOS lines and labels upon level mitigation.
v1.8.0: Resolved loop execution errors by computing crossover logic outside array loops.
v1.9.0: Reverted mitigation deletion rules so BOS elements remain visible post-PD break.
v2.0.0: Overhauled the BOS engine to active single-level tracking to minimize chart clutter.
v2.1.0: Enforced strict boundary filtering to ensure BOS markers print exclusively inside PDH and PDL channels.
v2.2.0: Enabled multi-trigger tracking so every unique cross above PDH or below PDL prints an arrow signal.
v3.1.0 - v3.2.0: Experimental Fair Value Gap (FVG) and mitigation engines introduced and tested.
v4.0.0: Cleaned and streamlined the script by completely removing experimental FVG features, finalizing the layout down to core PD levels, break arrows, and precision BOS tracking. Indicatore

ZoneKitLibrary "ZoneKit"
Generic 3-candle price-gap zone detection and drawing utilities.
Detects a gap between two candle extremes separated by one middle
candle, with an optional stricter mode requiring displacement on
both sides of the gap. Builds a box (and optional midline) to
represent the zone once detected.
scanZone(mode, h0, h2, l0, l2, c0, c1, c2, o0, o1, o2, minGap)
Scans three consecutive candles for a price-gap zone in either
direction.
Parameters:
mode (string) : "Standard" for a plain 3-candle gap; "Confirmed" for a gap
that also requires displacement (an "outside print") on both
sides of the gap, a stricter variant.
h0 (float) : Current candle's high.
h2 (float) : Two candles back's high.
l0 (float) : Current candle's low.
l2 (float) : Two candles back's low.
c0 (float) : Current candle's close.
c1 (float) : One candle back's close.
c2 (float) : Two candles back's close.
o0 (float) : Current candle's open.
o1 (float) : One candle back's open.
o2 (float) : Two candles back's open.
minGap (float) : Minimum required gap size, in price units.
Returns:
buildZone(top, bot, formTime, confTime, hourEnd, isUp, isLast, zoneColor, showMid, midColor, midStyle)
Draws a zone box (and optional midline) and returns the
populated Zone object.
Parameters:
top (float) : The zone's upper boundary.
bot (float) : The zone's lower boundary.
formTime (int) : Bar time the zone formed.
confTime (int) : Bar time the zone was confirmed.
hourEnd (int) : Caller-defined expiry time for the zone.
isUp (bool) : True if this is an upward (bullish) zone.
isLast (bool) : Caller-defined flag, passed straight through to the Zone.
zoneColor (color) : The resolved color for the box (and border).
showMid (bool) : Whether to also draw a midline through the zone's center.
midColor (color) : Color for the midline, if drawn.
midStyle (string) : Line style for the midline: "Solid", "Dotted", or "Dashed".
Returns: The newly created Zone.
Zone
Represents a detected price-gap zone and its drawn chart objects.
Fields:
mainBox (series box) : The zone's drawn box.
midLine (series line) : Optional midline through the zone's center.
boxLabel (series label) : Optional label attached to the zone.
overlayBox (series box) : Optional secondary box (e.g. for partial-fill shading).
top (series float) : The zone's upper boundary.
bot (series float) : The zone's lower boundary.
formationTime (series int) : The bar time the zone formed.
confirmTime (series int) : The bar time the zone was confirmed.
hourEnd (series int) : A caller-defined expiry time for the zone.
isFilled (series bool) : Whether the zone has been fully filled/mitigated.
wasHit (series bool) : Whether price has touched the zone at all.
isProcessed (series bool) : Internal bookkeeping flag for caller use.
isLast (series bool) : Caller-defined flag (e.g. "most recent of its kind").
isBull (series bool) : True if the zone is an upward (bullish) gap.
isFlipped (series bool) : Whether the zone has flipped direction (price closed
fillProgress (series float) : Tracks how far into the zone price has intruded. Libreria

OTT Rejection ZoneOTT Rejection Zone is a chart overlay for decision-making. Its purpose is to help you answer three questions before you take a trade:
Where are the orders? (Zones)
How proven is each level? (Touch count)
Which side is advancing right now? (Pressure lines)
What you see on the chart
1) The Boxes = "Buyer / Seller Zones"
Red zones form where sellers have repeatedly rejected price from above. Green zones form where buyers have repeatedly defended from below. A zone is only drawn after a level has been defended at least twice one-off swings don't qualify. Zone width scales with ATR, so the zones mean the same thing on any symbol and any timeframe.
How to use it
- Price approaching a red zone → expect supply; watch how price reacts, not just that it arrived.
- Price approaching a green zone → expect demand; same rule.
- A zone disappearing → price closed decisively through it; the defenders are gone. Don't expect a level to matter after it's been broken.
Simple mental model
- Zone = where orders have proven themselves
- No zone = price is in open water
2) The Number on Each Zone = "Touch Count"
Every zone shows how many separate times it has been defended for example, SELLERS x4. Touches include wick-tests: any candle that pushes into the zone and closes rejected adds to the count (with a small cooldown so one cluster of candles isn't over-counted).
How to use it
- x2 → a young level, lightly proven.
- x3–x4 → a real shelf; both sides know it's there.
- A count that keeps climbing while the zone holds → active defense, orders still there.
One caution: a heavily tested level is well-proven but also well-worn levels don't hold forever, and the break of a many-touch zone tends to travel.
3) Solid vs Faded Zones = "Hot / Cold"
Zones defended within the last 30 candles render solid that's live inventory. Zones that haven't been tested recently fade but remain valid.
How to use it
- Solid zone → participants are actively engaged there right now.
- Faded zone → still a reference level, but treat it as memory rather than presence.
4) The Dotted Lines = "Pressure Lines"
When three or more minor swing highs step down in a row, a dotted red line is drawn through them and extended forward: sellers accepting worse prices to get filled — which only happens when they're eager. The mirror in green: rising lows = buyers pressing. The line invalidates the moment price closes through it.
How to use it
- Falling red line into a red zone above → sellers are both positioned and advancing. The strongest bearish picture this tool draws.
- A pressure line breaking → the advance has paused; the side that was pressing just lost initiative.
Simple mental model
- Zone = where they sit
- Pressure line = they're walking toward you
How a beginner can use this (step-by-step)
Step 1 — Find the nearest zones. Above and below current price. That's your map.
Step 2 — Read the counts and shading. Solid, high-count zones deserve the most respect.
Step 3 — Check for a pressure line. If one side is pressing toward a zone, plan around that side keeping the initiative until the line breaks.
Step 4 — Let the reaction be your trigger. This tool tells you where the decision areas are you enter only on your own trigger at those areas (rejection candle, structure reclaim, session timing). The zones are the location, not the signal.
Settings
Swing strength (5) controls zone granularity higher gives fewer, more major levels. Minor swing strength (2) sets pressure-line sensitivity. Zone half-width (0.25 ATR) and break-through distance (0.5 ATR) are ATR-based so behavior is consistent across markets. Touches to draw (2) hides unproven swings; the 30-candle activity window separates hot from cold; the 3-bar cooldown prevents over-counting. Enable "Keep broken zones" to study break-and-retest behavior on faded boxes.
Limitations
Zones and lines appear only after a swing confirms (swing strength × bars later). This delay is deliberate nothing repaints retroactively but it means levels form with a lag rather than at the exact turn. Pressure lines are deleted and redrawn as new swings confirm. Everything here is inferred from price behavior: it shows where orders were defended, not a live order book, and a level having held before is never a guarantee it holds again.
OTT Rejection Zone is a chart overlay for decision-making. Its purpose is to help you answer three questions before you take a trade:
Where are the orders? (Zones)
How proven is each level? (Touch count)
Which side is advancing right now? (Pressure lines)
What you see on the chart
1) The Boxes = "Buyer / Seller Zones"
Red zones form where sellers have repeatedly rejected price from above. Green zones form where buyers have repeatedly defended from below. A zone is only drawn after a level has been defended at least twice one-off swings don't qualify. Zone width scales with ATR, so the zones mean the same thing on any symbol and any timeframe.
How to use it
- Price approaching a red zone → expect supply; watch how price reacts, not just that it arrived.
- Price approaching a green zone → expect demand; same rule.
- A zone disappearing → price closed decisively through it; the defenders are gone. Don't expect a level to matter after it's been broken.
Simple mental model
- Zone = where orders have proven themselves
- No zone = price is in open water
2) The Number on Each Zone = "Touch Count"
Every zone shows how many separate times it has been defended for example, SELLERS x4. Touches include wick-tests: any candle that pushes into the zone and closes rejected adds to the count (with a small cooldown so one cluster of candles isn't over-counted).
How to use it
- x2 → a young level, lightly proven.
- x3–x4 → a real shelf; both sides know it's there.
- A count that keeps climbing while the zone holds → active defense, orders still there.
One caution: a heavily tested level is well-proven but also well-worn levels don't hold forever, and the break of a many-touch zone tends to travel.
3) Solid vs Faded Zones = "Hot / Cold"
Zones defended within the last 30 candles render solid that's live inventory. Zones that haven't been tested recently fade but remain valid.
How to use it
- Solid zone → participants are actively engaged there right now.
- Faded zone → still a reference level, but treat it as memory rather than presence. Indicatore

Sweep & Reverse | Liquidity Sweep Reversal StrategyThis strategy trades the liquidity-sweep reversal pattern: price wicks through a prior swing high or low — clearing out the stops resting there — then closes back inside the range, suggesting the move beyond that level was a stop-hunt rather than a genuine breakout.
How it works:
Confirmed swing highs and lows (via pivot detection) are stored as watched levels.
A sweep triggers when a bar wicks past a level but closes back on the other side.
Longs enter on swept lows, shorts on swept highs. The stop sits just beyond the sweeping wick (with an ATR buffer); the target is set from your chosen reward:risk ratio.
Levels expire if left untouched for too long, and new levels too close to an existing one (relative to ATR) are skipped to keep zones from cluttering.
Features:
Optional volume-spike filter — only counts sweeps backed by above-average volume
Optional rejection-wick filter — requires the sweeping wick to be meaningfully larger than the bar's body, filtering out weak/low-conviction sweeps
Optional next-bar confirmation — waits one bar past the sweep and only enters if price actually continues in the reversal direction, reducing whipsaw entries
Optional session window filter (defaults to the London/NY overlap, the highest-liquidity window)
Adjustable stop distance, minimum stop size, and reward:risk ratio
Breakeven stop management once a trade moves partway to target
Long/short can be toggled independently
Every trade's entry/SL/TP lines persist on the chart after the trade closes (auto-expiring after a configurable number of bars), so past trades stay visible for review
Styled performance dashboard: trade count, win rate, net profit, live position state
Warnings:
This is fundamentally a mean-reversion pattern. In strongly trending markets, sweeps frequently continue rather than reverse — no combination of filters here eliminates that risk.
Backtest results are sensitive to pivot length, stop distance, and which filters are enabled. A high win rate on a small number of trades is not statistically meaningful — test across multiple instruments and timeframes, and evaluate profit factor and max drawdown alongside net profit, not net profit alone.
Past performance in a backtest, including this one, does not guarantee future results. This is not financial advice. Strategia

Frostman04 DOLThis is my indicator to Mark out Potential Draws on Liquidity.
When you add this indicator, it marks out several lines on the chart. Each one is a potential type of draw on liquidity.
Price likes to move towards unmitigated gaps.
Price like to take out session highs and lows.
Price likes to take out Equal Highs and Equal Lows.
Price likes to take out News Highs and News Lows.
Price likes to take out the current Daily High and Daily Low.
It is meant to be watched on the one-minute time frame.
First, it borrows the Equal Highs and Equal Lows by OutOfOptions.
Marking out any EXACT equal Highs and Lows.
If the line is swept by another candle, it is removed.
Next, it draws a horizontal line marking the Current Daily High and Current Daily Low with a label.
If a candle touches or goes beyond the line, it moves the line with the highest/lowest candle of the day.
Then, it marks out in yellow any unmitigated Fair Value Gaps on the 15m, 1hr, 4hr, and daily charts. But it has a max lookback period, so keep this in mind. If it's really far back, you may have to mark some yourself.
If an unmitigated gap line is touched, the line is removed.
Next, It marks the Session Highs and Lows for the current trading day: Asia High/Low, London High/Low, NY AM High/Low. I didn't include NY PM at this time.
If still in the session time the high and low are moved up or down.
If outside the session time, the candle that takes out the high/low is anochored to the line, otherwise, the session high/low lines are extended for the day until it is swept or a new trading day begins.
Finally, It marks out any News candles based on:
8:15, 8:30, 10am, 2pm and 2:30pm NY time. Also watching for ATR and volume spike on those times.
If a news candle line is swept, it is removed.
This has two variables of note: The first lookback is the number of days.
The second lookback is the number of candles back to check when averaging volume to check for volume spikes.
Thank you,
Frostman04 Indicatore

Risk Dispersion Regime IndicatorIts primary objective is to measure the real-time correlation level (the lockstep movement) of a basket of assets to generate a dynamic multiplier. This multiplier adjusts your position sizing based on the current market risk regime.
⚙️ Configuration and Inputs
Customizable Basket: The script analyzes a basket of 3 to 20 assets (the slots). By default, it is preconfigured with major US sector and index ETFs (SPY, QQQ, XLK, etc.).
Analysis Windows: The user defines the lookback period for the correlation calculation (default 120 sessions) and the historical depth to establish the ranking (default 750 sessions).
Position Sizing Governor: Allows you to configure the amplitude of the position adjustments via a minimum multiplier (0.3x), a maximum multiplier (1.7x), and a global strength modifier.
🧮 Mathematical Mechanics and Logic
Standardization (Z-Score): The indicator converts the return of each asset in the basket into a Z-score (return standardized relative to its mean and standard deviation) to put all symbols on the exact same scale.
Group Correlation (Rho): Instead of calculating asset pairs one by one (which is computationally heavy), the code uses an optimized mathematical identity: it derives the average correlation of the basket directly from the variance of the assets' average.
Walk-Forward Ranking: The script calculates the percentile of the current correlation strictly against previously observed historical values. This method guarantees zero lookahead bias, making the indicator perfectly safe and robust for algorithmic backtesting.
🖥️ Visual Outputs and Interface
Main Plots: The indicator draws three lines on a separate lower pane: the correlation rank (percentile), the raw correlation, and the resulting position size multiplier.
Color-Coded Regimes: The chart background changes color dynamically. It turns red when the market moves as a monolith (rank > 0.90, signaling high systemic risk) and green when the market is highly dispersed (rank < 0.25, a favorable environment for stock-picking).
Diagnostic Dashboard: A table is displayed in the top right corner. It indicates the real-time market state (Very Tight, Loose, etc.), the recommended multiplier, and includes built-in safeguards (e.g., warning the user if the timeframe is not daily or if specific assets lack historical quote data).
Built-in Alerts: Alert conditions (alertcondition) are programmed to notify the user whenever the market crosses extreme correlation thresholds (90th and 25th percentiles). Indicatore

Bollinger Bands Asymmetry AttributionBollinger Bands Asymmetry Attribution
Overview
Bollinger Bands Asymmetry Attribution is an open-source volatility-analysis overlay that studies how price dispersion is distributed above and below a selectable moving basis.
A conventional Bollinger Bands calculation uses one standard deviation to place symmetric upper and lower bands around a moving average. This script takes a different approach. It separates basis-relative squared deviations into upper-side and lower-side components, attributes the resulting directional dispersion to observation frequency and conditional excursion severity, and then constructs independently stabilized upper and lower wings.
The indicator is designed to answer questions such as:
- Is current dispersion concentrated above or below the basis?
- Is that asymmetry caused by price spending more observations on one side?
- Is it caused by fewer but larger excursions on one side?
- Are frequency and severity reinforcing each other or opposing each other?
- Is directional dispersion currently shifting, and which component is producing that shift?
- How stretched is the current source relative to the matching asymmetric wing?
This is a descriptive market-structure and volatility tool. It is not a trading strategy, directional forecast, reversal model, or buy/sell signal generator.
Core calculation
For each bar, the script evaluates the selected Source over the Attribution Length around the current selected basis.
For every observation in the rolling window:
Deviation = Observation - Current basis
Observations above the basis contribute to the upper squared-deviation mass.
Observations below the basis contribute to the lower squared-deviation mass.
Upper squared mass:
Sum of squared deviations where Deviation > 0
Lower squared mass:
Sum of squared deviations where Deviation < 0
The directional semivariances are then calculated across the entire observation window:
Upper semivariance = Upper squared mass / N
Lower semivariance = Lower squared mass / N
where N is the total number of valid observations in the window.
Frequency and severity attribution
Each directional semivariance can be factored exactly into two components.
For the upper side:
Upper occupancy = Upper observation count / N
Upper conditional severity =
Upper squared mass / Upper observation count
Upper semivariance =
Upper occupancy x Upper conditional severity
The same identity applies to the lower side.
In the readout:
F means observation frequency or occupancy.
S means conditional squared-excursion severity.
Frequency describes how often observations occurred on one side of the basis.
Severity describes how large the squared excursions were when observations occurred on that side.
This distinction allows two windows with similar directional semivariance to be interpreted differently.
For example:
- Frequent but relatively small upper deviations can produce upper-side dispersion.
- A small number of very large upper deviations can produce a similar amount of upper-side dispersion.
- Frequency and severity can both favor the same side.
- Frequency can favor one side while severity favors the other.
The raw mathematical identity is exact. For visual stability, the MASS, frequency, and severity diagnostics shown in the panel are smoothed independently. Therefore, the displayed smoothed values should be interpreted as stable diagnostics rather than as an algebraic identity between the visible numbers.
What makes this script different
The original contribution is not simply the use of different upper and lower band widths. Asymmetric volatility bands and directional semivariance concepts already exist.
This script extends the analysis by connecting four related layers in one coherent framework:
1. Directional dispersion mass
It measures how total basis-relative squared dispersion is divided between the upper and lower sides.
2. Level attribution
It separates each side's directional semivariance into:
- Observation frequency or occupancy
- Conditional squared-excursion severity
3. Mass Shift Attribution
It decomposes the one-bar change in directional semivariance into:
- A frequency-change contribution
- A severity-change contribution
4. Trader-facing geometry
It connects those attribution measurements to independently stabilized asymmetric wings, side-normalized stretch, wing motion, transition markers, and alerts.
The script does not combine unrelated oscillators, volume filters, trend scores, or multi-timeframe indicators. All principal outputs derive from the same basis-relative directional-dispersion framework.
Asymmetric wing construction
The primary upper and lower wings are not conventional symmetric Bollinger Bands.
The script first calculates the conditional variance for each side. When one side contains only a small number of observations, its conditional variance can become unstable or overly dependent on one data point.
To reduce this problem, the displayed geometry uses Sparse-Side Stabilization.
A side with fewer observations is partially shrunk toward the pooled variance of the full rolling window. A side with more observations retains more of its own conditional variance.
Conceptually:
Stabilized side variance =
Side weight x Side conditional variance
+
(1 - Side weight) x Pooled variance
The side weight increases with the number of observations on that side.
The stabilized upper and lower variances are converted into wing distances using their square roots, the Wing Multiplier, and optional RMA smoothing.
Upper wing = Basis + Stabilized upper distance
Lower wing = Basis - Stabilized lower distance
This stabilization affects the displayed wing geometry only. The underlying MASS, Frequency, Severity, and identity diagnostics remain based on the unshrunk directional statistics.
The optional Classic Symmetric Reference displays a conventional SMA-centered standard-deviation envelope for comparison. It is disabled by default to keep the publication chart clear.
Visual readout
The compact panel is organized into seven rows.
Header
The header shows:
- The script name
- LIVE or CLOSE execution status
- The current upper/lower dispersion-mass state
Examples:
UPPER MASS 60.2%
LOWER MASS 58.7%
MASS 51.0%/49.0%
The percentages are smoothed directional semivariance shares. They are not probabilities, expected returns, price targets, or forecasts.
MASS
MASS shows how directional semivariance is divided between the upper and lower sides.
The cyan value represents the upper share.
The magenta value represents the lower share.
The two displayed shares sum to 100%.
A larger upper share means that observations above the basis currently account for more of the smoothed basis-relative squared dispersion. A larger lower share means that observations below the basis account for more.
ATTRIB
ATTRIB describes the composition of the current asymmetry.
F = Observation frequency or occupancy
S = Conditional squared-excursion severity
The symbols have the following meanings:
F▲ = Frequency favors the upper side
F▼ = Frequency favors the lower side
F· = No material frequency bias
S▲ = Conditional severity favors the upper side
S▼ = Conditional severity favors the lower side
S· = No material severity bias
S? = Severity cannot be compared because one side has too few observations
The ATTRIB states are:
Balanced
Neither frequency nor severity exceeds the selected significance threshold.
Frequency
Observation frequency favors one side, while conditional severity is approximately balanced.
Severity
Conditional severity favors one side, while observation frequency is approximately balanced.
Reinforced
Frequency and severity favor the same side.
Offset
Frequency and severity favor opposite sides. One side may occur more often while the other side contains larger conditional excursions.
Sparse
One side does not contain enough observations for a reliable two-sided severity comparison.
No dispersion
The rolling window contains no meaningful basis-relative dispersion.
Warming
The required rolling history is not yet available.
SHIFT
SHIFT analyzes how directional dispersion changed from the previous bar to the current bar.
For either side:
Semivariance = Occupancy x Conditional severity
The one-bar product change is decomposed as:
Delta semivariance =
Delta occupancy x Average conditional severity
+
Delta conditional severity x Average occupancy
This midpoint formulation allocates the interaction between occupancy and severity equally, avoiding dependence on whether frequency or severity is applied first.
The script calculates this decomposition separately for the upper and lower sides, then evaluates the change in the upper-minus-lower directional semivariance difference.
In the SHIFT row:
F↑ means the frequency component is moving directional dispersion toward the upper side.
F↓ means the frequency component is moving directional dispersion toward the lower side.
S↑ means the severity component is moving directional dispersion toward the upper side.
S↓ means the severity component is moving directional dispersion toward the lower side.
A centered dot means the component is below the configured significance threshold.
Possible SHIFT states include:
Frequency upper or Frequency lower
The occupancy-change component is dominant.
Severity upper or Severity lower
The conditional-severity-change component is dominant.
Reinforced upper or Reinforced lower
Frequency and severity changes are both moving directional dispersion toward the same side.
Shared upper or Shared lower
Both components contribute in the same net direction without one meeting the configured dominance ratio.
Offset
Frequency and severity changes oppose each other.
Stable
The net normalized directional mass shift is below the selected threshold.
The displayed Delta value is normalized by the average total semivariance of the two compared windows. It is not a price percentage, return estimate, or directional probability.
STRETCH
STRETCH measures the current Source distance from the basis using the wing on the same side.
When Source is above the basis:
Stretch =
(Source - Basis) / Upper wing distance
When Source is below the basis:
Stretch =
-(Basis - Source) / Lower wing distance
Interpretation:
+1.00x = Source is at the upper wing
-1.00x = Source is at the lower wing
+0.50x = Source is halfway from the basis to the upper wing
-0.50x = Source is halfway from the basis to the lower wing
A value above +1.00x or below -1.00x means the selected Source is outside the corresponding asymmetric wing.
Stretch does not predict continuation or reversal. It only reports the current location relative to the side-specific dispersion geometry.
WINGS
WINGS shows the one-bar movement of the stabilized upper and lower wing distances.
U refers to the upper wing.
D refers to the lower wing.
Arrow meanings:
↗ = Expanding beyond the selected Wing Motion Threshold
↘ = Contracting beyond the selected Wing Motion Threshold
→ = Approximately stable
The ratio on the right is:
Upper wing distance / Lower wing distance
A ratio above 1.00 means the upper wing is wider.
A ratio below 1.00 means the lower wing is wider.
The ratio describes asymmetric geometry, not directional probability.
NOW
NOW reports the current side-normalized location or the most recent live transition preview.
Possible location states include:
- Upper outside
- Upper edge
- Upper half
- On basis
- Lower half
- Lower edge
- Lower outside
The C value is the realized rolling containment percentage.
Containment measures how often the selected Source was inside the displayed asymmetric wings over the configured Containment Lookback.
This is a backward-looking realized statistic. It is not a guaranteed future coverage probability.
How to use the indicator
A practical reading sequence is:
1. Read MASS
Determine whether basis-relative squared dispersion is currently concentrated more heavily above or below the basis.
2. Read ATTRIB
Determine whether the current asymmetry is associated primarily with:
- More observations on one side
- Larger excursions on one side
- Both factors reinforcing each other
- Opposing frequency and severity effects
- An insufficient side sample
3. Read SHIFT
Determine whether the directional dispersion difference is currently changing and whether frequency or severity is producing that change.
4. Read STRETCH
Locate the current Source relative to the corresponding asymmetric wing.
5. Read WINGS
Check whether the upper and lower dispersion envelopes are expanding, contracting, or remaining stable.
6. Read NOW and containment
Confirm the current location or transition and review how frequently the Source has historically remained inside the displayed wings.
Example interpretations:
UPPER MASS with Frequency attribution
Observations have occurred above the basis more often, but upper-side conditional excursion severity is not materially larger.
UPPER MASS with Severity attribution
Upper-side observations may not be more frequent, but their conditional squared excursions are larger.
UPPER MASS with Reinforced attribution
Both observation frequency and conditional severity favor the upper side.
UPPER MASS with Offset attribution
One component favors the upper side while the other favors the lower side. The total upper mass reflects the net result.
Upper mass with SHIFT moving lower
The current level remains upper-dominant, but the latest window change is moving directional dispersion back toward the lower side.
Balanced MASS with active SHIFT
The current upper/lower mass level is near balance, but the most recent change is moving that balance toward one side.
These readings provide context. They do not prescribe an entry, exit, stop, position size, or trade direction.
Markers
The script uses sparse transition markers rather than marking every bar outside a wing.
Triangle above a bar
The selected Source has moved from inside to outside the upper wing.
Triangle below a bar
The selected Source has moved from inside to outside the lower wing.
Circle on an upper or lower wing
The selected Source has returned inside after being outside that wing.
Diamond on the basis
The selected Source moved directly from outside one wing to outside the opposite wing. This is consolidated into one Cross-Wing Jump event so the same bar does not receive duplicate excursion and re-entry markers.
Optional dominance markers
These identify a confirmed transition into upper-mass or lower-mass dominance.
Markers describe transitions across the calculated geometry. They are not buy or sell signals and do not imply that price will reverse, continue, or reach a target.
Alerts
Alert conditions are available for:
- Upper asymmetric excursion started
- Lower asymmetric excursion started
- Upper asymmetric re-entry
- Lower asymmetric re-entry
- Direct cross-wing jump to the upper side
- Direct cross-wing jump to the lower side
- Upper semivariance-mass dominance started
- Lower semivariance-mass dominance started
Confirmed Events Only is enabled by default.
With this setting enabled, markers and alerts wait for the bar to close. The asymmetric wings and visual readout continue to update during the forming bar.
Main settings
Source
Selects the price or indicator series analyzed by the script.
Attribution Length
Sets the rolling observation window.
Basis Type
SMA is the conventional statistical-center setting.
EMA, RMA, and WMA are provided as basis-relative research alternatives. When one of these alternatives is selected, the directional partial moments are measured around that selected moving basis rather than around the arithmetic sample mean.
Wing Multiplier
Scales the upper and lower stabilized wing distances.
The multiplier is not a confidence level.
Sparse-Side Stabilization
Controls how strongly a side with few observations is shrunk toward pooled dispersion.
A value of zero disables shrinkage when that side contains observations.
Wing Smoothing
Applies RMA smoothing to the displayed wing distances.
Attribution Smoothing
Smooths MASS, Frequency, and Severity diagnostics to reduce one-bar flicker.
Dominance Entry and Release Thresholds
Create hysteresis around the upper-mass, balanced, and lower-mass states.
Minimum Observations Per Side
Sets the minimum sample required on both sides before Severity is compared.
Mass Shift Smoothing
Smooths the Frequency and Severity components of the one-bar SHIFT calculation.
Mass Shift Significance Threshold
Controls when a SHIFT component is displayed as materially active.
Mass Shift Driver Dominance Ratio
Controls how much larger one component must be before it is classified as the dominant SHIFT driver.
Edge Zone Starts At
Defines when STRETCH is considered near an upper or lower wing.
Containment Lookback
Sets the rolling window for realized containment.
Visual settings
Allow the user to control wing visibility, split fills, the optional state rail, dominant-wing glow, classic symmetric reference, line widths, transparency, colors, readout position, text size, and price-axis clearance.
Live-bar behavior
The script does not request higher-timeframe data, use lookahead logic, or intentionally access future bars.
Historical calculations use the chart's available data and the selected settings.
During the current forming bar:
- Wings can change
- MASS can change
- ATTRIB can change
- SHIFT can change
- STRETCH can change
- WINGS can change
- NOW can change
This is normal real-time indicator behavior.
When Confirmed Events Only is enabled, transition markers and alerts are recorded only after bar close. Disabling that setting allows intrabar events, which can appear and disappear before the bar closes.
Data Window outputs
The script provides research values in the Data Window, including:
- Semivariance Mass Bias
- Observation Frequency Bias
- Conditional Severity Bias
- Upper Semivariance Share
- Lower Semivariance Share
- Asymmetric Side-Normalized Stretch
- Upper Stabilized Wing Distance
- Lower Stabilized Wing Distance
- Realized Envelope Containment
- Side Sample Adequacy
- Smoothed Directional Mass Shift
- Flow Bridge Identity Residual
The Flow Bridge Identity Residual allows users to inspect the numerical consistency of the raw one-bar frequency/severity decomposition. Small non-zero values can occur because of floating-point arithmetic.
Limitations
This indicator is backward-looking and descriptive. It does not estimate the probability of future price direction, reversals, breakouts, continuation, or profitability.
The primary wings are not conventional Bollinger Bands and are not confidence intervals.
The Wing Multiplier does not imply a 68%, 95%, or 99% probability range.
Realized containment is calculated from past rolling observations and does not guarantee future containment.
The rolling statistics compare historical observations with the current selected basis for each calculation window. They do not compare every historical observation with the basis value that existed on that historical bar.
SMA provides the conventional arithmetic-center interpretation. EMA, RMA, and WMA create basis-relative research variants whose partial moments should not be interpreted as conventional sample semivariance around the arithmetic mean.
Conditional Severity requires observations on both sides. When one side does not meet the configured minimum sample, the script displays Sparse and S? instead of treating the missing comparison as neutral evidence.
Sparse-Side Stabilization intentionally modifies displayed wing geometry when a side has few observations. It does not modify the raw attribution statistics.
Smoothing reduces visual noise but introduces lag.
Results depend on the selected Source, length, basis, multiplier, thresholds, market, timeframe, and available data.
For conventional interpretation, use standard time-based charts. Synthetic chart types can change the input price series and therefore change calculations and alerts.
A movement outside a wing does not necessarily indicate overbought, oversold, exhaustion, breakout confirmation, reversal, or continuation.
This indicator should be used as an analytical context tool alongside the user's own market structure, execution, and risk-management process.
Open-source transparency
The script is published open-source so users can inspect the calculations, verify the attribution identities, review the stabilization logic, study the Data Window outputs, and modify the available research settings.
The indicator provides measurements and alerts only. It does not place orders, simulate performance, report a win rate, or guarantee trading results. Indicatore

TIS_SwingOVERVIEW
TIS_Swing detects swing highs and swing lows and, unlike most pivot tools, publishes the last confirmed level as a continuous value that other scripts can read.
Standard pivot indicators return a number only on the bar where the pivot is confirmed and nothing on every other bar. That is fine for drawing a dot on the chart, but it makes the level unusable for comparison: on any given bar you cannot ask whether the current price is above the last confirmed swing high, because on that bar the pivot series holds no value. TIS_Swing keeps the level alive between pivots, so that question can be answered on every bar, by you visually or by another script through the source dropdown.
HOW IT WORKS
A bar qualifies as a swing high when its high is greater than or equal to the highs of the bars that follow it, and strictly greater than the highs of the bars that precede it. The number of bars checked on each side is set by Strength Left and Strength Right. Swing lows use the mirrored rule. The comparison on the right side is inclusive, so a candidate that ties with a later bar still qualifies; this produces slightly more pivots than a strictly greater definition, and is intentional.
A pivot can only be confirmed once the bars to its right exist, so a pivot is always confirmed Strength Right bars after it forms. It is never confirmed earlier and it is never revised afterwards, so nothing repaints.
Once a pivot is confirmed, its price becomes the current level for that side and stays there until the next pivot on the same side replaces it. When the series trades through the level, the level is marked as broken. What happens next depends on Remove Broken Pivot Lines:
- ON, the default: the visible level is dropped and no level is shown until a new pivot forms. This is the familiar behaviour of most pivot tools.
- OFF: the visible level stays where it was until a new pivot replaces it, so a broken level remains on screen as a reference.
Either way, a second pair of values keeps the last level regardless of the setting. Those are the plots marked (persistent), and they exist so that comparisons are always possible.
WHAT YOU CAN DO WITH IT
Market structure on price. With the level available on every bar, a higher high is simply the current price trading above the last confirmed swing high, and a lower low is the mirror. You can read it off the chart or compute it in your own script by selecting Last Swing High (persistent) as a source and comparing it against the close.
Divergence on an oscillator. Turn on Use Other Source, point it at a stochastic, an RSI or any other plotted series, and move the script to its own pane. The pivots are then detected on the oscillator instead of on price. A higher swing low on the oscillator while price is still making lower lows is a classic divergence, and here it is visible as a stepped level moving up while price moves down.
Breakout timing. With Remove Broken Pivot Lines on, the moment the level disappears is the moment the last swing was taken out. That transition is also available as an alert.
PARAMETERS
Parameters
- Strength Left: bars to the left of the candidate that must be lower for a high, or higher for a low. Default 5.
- Strength Right: bars to the right required to confirm the pivot. Also the confirmation delay, in bars. Default 2.
- Remove Broken Pivot Lines: drop the visible level once it is broken. Default on. Does not affect the (persistent) plots.
- Use Other Source: detect pivots on another plotted series instead of the bar highs and lows. Both sides then use the selected series.
- Source: the series used when Use Other Source is on.
Visual Settings
- Show Levels: opacity of the stepped level lines.
- Show Persistent Levels: opacity of the thin lines that always keep the last level. Off by default to keep the chart clean.
- Show Pivot Markers: diamonds drawn on the confirmed pivot bars.
- Extend to the Right: horizontal line projected forward from the last pivot on each side.
- Swing High Color, Swing Low Color, Line Width, Extension Line Style.
The Show options change opacity only. The four series are always published, so another script can read them even when they are not visible on the chart.
OUTPUTS
Four values are available in the source dropdown of any other indicator or strategy:
- Last Swing High and Last Swing Low: the level as shown, honouring Remove Broken Pivot Lines.
- Last Swing High (persistent) and Last Swing Low (persistent): the last confirmed level, kept regardless of that setting.
Four alerts are available: New Swing High, New Swing Low, Swing High Broken, Swing Low Broken.
LIMITATIONS
- A pivot is confirmed Strength Right bars after the bar that forms it. On the chart this looks like a delay, and it is one. It is inherent to any pivot definition that requires confirmation from the right, and it is the price of not repainting.
- These levels are reference points, not entry signals. Nothing here tells you which way to trade.
- With Remove Broken Pivot Lines on, the level is dropped on the same bar as the break. A comparison such as close above Last Swing High will therefore never be true, because the value is already gone by the time it would be. Use the (persistent) plots for that comparison, or detect the break as the transition of the visible plot to no value.
- Before the first pivot on a side is confirmed, that side publishes no value.
- Pine fixes the pane at compile time, so with a non-price source the script has to be moved to its own pane manually.
- Larger Strength values give fewer and more significant levels but a longer confirmation delay. There is no setting that avoids that trade-off. Indicatore

SW_WickSize═════════════════════════════════════════════════════════════
// SW_UPPER/LOWER WICKSIZE — USER GUIDE
// ═════════════════════════════════════════════════════════════
//
// WHAT IT DOES
// Draws ONE box per bar, colored to match that bar's own candle color
// (green candle -> green box, red candle -> red box). Each box crosses
// a zero baseline: the part above zero is the rolling average of that
// color's upper wick, the part below is the rolling average of that
// color's lower wick.
//
// A bar where close == open (neither green nor red) draws no box.
//
// WICK DEFINITIONS
// Green upper wick = high - close Green lower wick = open - low
// Red upper wick = high - open Red lower wick = close - low
//
// AVERAGING
// Both colors' wick values are computed on every bar (0 on bars that
// don't match that color), then smoothed with a simple moving average
// over the last `x` bars. This means the average reflects both how
// large the wicks are AND how often that color occurs in the lookback
// window — fewer bars of a color in the window pulls its average down
// even if the bars that did occur had large wicks.
//
// BOX SIZE — REAL PRICE UNITS, NOT A PERCENTAGE
// Box height is the actual averaged wick length on the same price
// scale as the candles above, not a percentage or fraction of the bar.
//
// HOW THE BOX IS DRAWN (plotcandle, not box.new)
// The box is drawn using plotcandle() — Pine's native candle-shape
// plot — rather than box.new(). plotcandle(open, high, low, close)
// normally draws OHLC; here open=high=top value and close=low=bottom
// value, which collapses the "wick" to nothing and makes the "body"
// span exactly , giving a solid rectangle crossing zero.
// Using plotcandle guarantees the box aligns exactly under its own
// candle at every zoom level, since it shares the same native
// rendering pipeline as real candles (manual box.new() coordinates,
// whether time-based or index-based, cannot achieve this reliably).
//
// PLOTCANDLE STYLE-TAB NOTE
// plotcandle always exposes Body/Wick/Border as separate color pairs
// in the Style tab — this is a fixed platform behavior. We only use the
// Body color setting. Wick and Border color settings can be ignored.
//
// DOJI MARKER
// A yellow diamond is drawn exactly on the zero line whenever a
// candle's body is small relative to its full high-low range (default
// 5%). This is a visual flag only — it never affects bar
// classification or the wick averages. Drawn last so it renders above
// both the boxes and the zero line.
//
// LAYERING
// Draw order is: plotcandle (boxes) -> hline (zero line) -> plotshape
// (doji marker). Pine renders later plot-family calls on top of
// earlier ones, so the zero line sits above the boxes, and the doji
// diamond sits above everything.
//
// INPUTS
// x — lookback length for the averages (default 5)
// showGreenBox/showRedBox — per-color visibility toggle
// greenColor/redColor — box colors
// scaleHeadroomPts — additive invisible scale padding: adds a fixed
// number of points above the tallest recent bar
// to push the zero line further down in the
// pane. 0 = off.
// dojiBodyPct — doji threshold, as % of that bar's high-low
// range (default 5%)
// ════════════════════════════════════════════════════════════ Indicatore
