Liquidity Shift PulseIs a price-structure and liquidity-based overlay indicator designed to identify selected bullish transition and expansion conditions, then manage the resulting long-side state using protected market structure.
The indicator is built around price behavior, confirmed swing structure, volatility normalization, participation, and market-regime conditions. It does not use moving-average crossovers, RSI, MACD, or ADX as signal generators.
1. Purpose
LSP is intended to help traders visually study two different types of bullish price behavior:
Liquidity Shift Entry
Looks for a downside liquidity sweep followed by a reclaim, bullish displacement, and a break of internal price structure.
Expansion Entry
Looks for a strong bullish breakout from an established price range when candle expansion, participation, and market-regime conditions support the move.
These two engines serve different purposes. The liquidity engine focuses on transitions that begin around previously confirmed swing liquidity, while the expansion engine allows the indicator to recognize strong directional breaks even when no recent liquidity sweep is present.
2. Liquidity Shift Logic
The indicator tracks confirmed swing highs and swing lows using pivot-based structure.
For a bullish liquidity setup, price must first trade below a previously confirmed swing low by a configurable ATR-normalized amount and then reclaim that level. The candle must also show sufficient lower-wick rejection.
After the sweep, the script stores the relevant internal structure level and waits for bullish confirmation within the configured setup window.
Confirmation requires several elements:
A valid liquidity sweep and reclaim.
Bullish candle displacement.
Minimum candle range relative to ATR.
Minimum candle-body proportion.
Strong closing location within the candle.
A close above the stored internal structure level.
Optional relative-volume confirmation.
Optional market-regime confirmation.
A setup that becomes too old or moves materially below its sweep low is invalidated.
3. Expansion Entry
The Expansion Entry engine is designed for a different market condition.
Instead of requiring a prior liquidity sweep, it looks for price to close above the highest high of a configurable previous range.
The breakout candle must meet configurable requirements for:
Breakout distance.
Range expansion relative to ATR.
Candle-body proportion.
Closing strength.
Relative volume, when available and enabled.
Market-regime conditions.
The Expansion Entry can be disabled independently from the liquidity-shift engine.
4. Participation Filter
LSP can compare current volume with a previous rolling volume baseline.
The resulting relative-volume measurement can be used to prevent an entry condition from being accepted when participation is below the selected threshold.
If usable volume data is unavailable for the symbol, the script does not treat missing volume as automatic confirmation failure.
5. Market Regime Filter
The optional regime filter uses a Choppiness Index calculation to distinguish more directional conditions from highly compressed or irregular environments.
The filter can accept either:
A sufficiently directional market, or
A market whose choppiness is decreasing while remaining below the configured transition threshold.
This component is used as a contextual filter rather than as an independent trading signal.
6. Protected Structure
After a BUY condition is confirmed, LSP establishes a Protected Structure level below price.
As new confirmed higher pivot lows form after entry, this protected level can move upward.
An important design characteristic is that Protected Structure is one-directional during an active long state:
It can move higher, but it does not move lower.
This creates a visual representation of the price structure that the active bullish condition is attempting to preserve.
7. SELL / Exit Logic
The SELL label in LSP represents an exit from an active long-side state, not an independent short-entry signal.
A SELL can occur when one of the following conditions is confirmed:
Price closes below Protected Structure.
A bearish liquidity reversal develops after sufficient favorable movement.
A large established move gives back more than the configured percentage of its maximum open favorable excursion and receives bearish candle confirmation.
Because SELL conditions are evaluated only while the script is in an active long state, users should not interpret SELL labels as standalone short recommendations.
8. Large-Trend Protection
For unusually extended favorable moves, the script tracks:
Entry price.
ATR at entry.
Highest price reached since entry.
Maximum favorable movement.
Current remaining favorable movement.
Percentage of the maximum move that has been given back.
Once the move exceeds the selected ATR activation threshold, the optional profit-protection logic can react to excessive giveback accompanied by bearish price behavior.
This feature is intended as structural protection logic rather than a profit target.
9. Main Settings
The script provides controls for:
Liquidity Engine
Pivot sensitivity
ATR period
Minimum sweep penetration
Minimum rejection wick
Structure Shift
Internal structure length
Setup memory
Structure-break buffer
Displacement range
Candle-body strength
Closing strength
Setup invalidation
Expansion Entry
Enable/disable expansion entries
Breakout lookback
Breakout buffer
Expansion range
Body requirement
Closing strength
Participation
Relative-volume filter
Volume baseline
Minimum relative volume
Market Regime
Choppiness filter
Choppiness period
Directional threshold
Transition threshold
Exit Protection
Initial structure buffer
Higher-low protection buffer
Bearish reversal activation
Large-trend activation
Maximum profit giveback
Visuals
Protected Structure
Confirmed liquidity levels
Liquidity sweep markers
BUY/SELL labels
Signal distance from price
10. Alerts
Alert conditions are included for:
Bullish liquidity sweep
Liquidity-shift BUY
Expansion BUY
Combined BUY
Bearish liquidity shift
SELL
Users can create TradingView alerts from these conditions according to their own workflow.
11. Confirmation and Repainting Behavior
LSP evaluates its principal signal conditions on confirmed bars.
Swing liquidity levels are based on confirmed pivot highs and pivot lows. Because pivot confirmation requires bars to form to the right of the potential swing, these levels inherently appear with confirmation delay.
This is intentional: a swing is not treated as confirmed before the required right-side bars exist.
The script does not use future-looking data or lookahead logic to generate historical signals. Once a BUY or SELL event has been confirmed on a closed bar, the script does not intentionally relocate that historical signal.
Users should distinguish this from normal real-time chart behavior: values and conditions on the currently open candle can change until that candle closes.
12. How to Use
LSP is best interpreted as a structured market-analysis framework, rather than as a standalone mechanical trading system.
Possible uses include:
Identifying liquidity-reclaim transitions.
Identifying strong structural expansion events.
Monitoring whether a bullish structure remains intact.
Visualizing progressively higher protected structure.
Creating alerts for selected liquidity and structural events.
Combining LSP with a trader's own risk management, higher-timeframe analysis, and broader market context.
Different markets and timeframes have different volatility and liquidity characteristics, so the default parameters should not be assumed to be optimal for every instrument.
13. Design Approach
The script combines several price-action concepts for a specific workflow rather than simply stacking unrelated indicators.
Its sequence is designed around:
Liquidity interaction → reclaim → displacement → structure confirmation → protected structure management
with a separate expansion path for strong structural breakouts.
The purpose of combining these components is to distinguish initial bullish qualification from subsequent structure management and exit conditions within one consistent state model.
14. Limitations
Liquidity Shift Pulse is an analytical indicator, not a strategy or automated trading system.
It does not predict future prices and does not guarantee that a liquidity sweep, breakout, BUY, SELL, or protected-structure event will lead to a profitable outcome.
Important limitations include:
Pivot-based swing detection introduces confirmation delay.
Strong trends can produce false breakouts.
Liquidity sweeps can fail after reclaiming a level.
Choppy markets can create repeated structural transitions.
Volume quality varies between instruments and data sources.
ATR normalization adapts measurements to volatility but does not make different markets behaviorally identical.
Protected Structure is a price-structure reference, not a guaranteed stop level.
Historical observations do not establish future performance.
The indicator should therefore be used together with independent analysis and appropriate risk management. Indicador

Zebra Grid & Time VerticalsThis indicator provides dynamic price-shelf visual scaffolding and multi-timeframe session timing using non-cluttering overlays.
Dynamic Centered Horizontal Grid: Calculates a dynamic centerPrice rounded to the user-defined point step (e.g., 10 or 100 points) and tracks upper/lower boundary triggers. When price expands outside the current range boundary, the entire grid dynamically shifts to re-center around live price action.
Zebra Interval Shading: Draws alternating background filled boxes (box.new) between even step intervals alongside persistent horizontal price lines (line.new), giving immediate visual definition to price bins across the chart space.
Historical Timeframe Markers: Detects period transitions (ta.change(time(tf_input)) != 0) on a user-designated higher timeframe (e.g., 15m or 6h) and plots full-chart-height vertical lines at each interval open.
Forward (+1) Projection Line: Requests higher timeframe closing timestamps via request.security to project a future vertical line (lineFuture) using xloc.bar_time to show precisely where the next interval will start before it arrives.
Memory Management: Operates exclusively on barstate.islast using arrays (gridBoxes, gridLines) to purge and redraw horizontal elements, keeping line counts clean within standard TradingView script limits (max_lines_count=500).
How to Use It in Trading:
Intraday Execution (Left 1m Chart): Set step sizes to 10 points with 15-minute vertical lines. Use the alternating zebra bands as visual target shelves for scalping micro-swings, and monitor the 15-minute vertical lines to anticipate volatility shifts around candle opens/closes.
Macro Structure (Bottom-Right 30m Chart): Set step sizes to 100 points with 6-hour (360m) vertical lines. The 100-point bands map institutional round-number zones, while the 6-hour vertical intervals visually segregate the trading day into four distinct structural sessions (Asia, London, US Morning, US Afternoon).
Session Timing & Preparation: Use the +1 Future Vertical Line to pre-plan trade execution windows, identifying exactly how much time remains in the current higher-timeframe candle before structural resets occur.
Other Script Features
Independent Modular Toggles: Dedicated user inputs (showZebra, showVerts) allow instantaneous toggling of horizontal price grids and vertical time lines without removing the script.
Custom Styling Options: Complete user control over horizontal step sizes, grid line counts, line styles (Solid, Dashed, Dotted), line widths, and fill color transparency. Indicador

Indicador

Matrix Risk/RewardMatrix Risk/Reward is a visual trade-planning overlay. Click three points on the chart (entry, stop, target), then drag them. The script converts those prices into dollar risk, dollar reward, tick distance, risk/reward ratio, and live open P&L for the size you set.
It does not read your broker or prop-firm order ticket, and it does not place, modify, or cancel orders. The three points are planning levels you control.
HOW TO USE
1. Add the indicator to the chart.
2. Click Entry, then Stop, then Target.
3. Set Size to your contracts, lots, or units.
4. Click the indicator on the chart so the three points light up, then drag those points, not the dashed rays.
5. Read dollar SL/TP on the labels and in the table.
Direction is detected automatically: stop below entry = long, stop above entry = short. Stop and target must sit on opposite sides of entry for a valid R:R.
WHAT IT SHOWS
- Stop loss in dollars and ticks
- Take profit in dollars and ticks
- Open P&L in dollars
- Reward-to-risk ratio
- Dollars per tick
- Bid / ask / spread when a quote mode is active
- Colored risk and reward zones
OPEN P&L QUOTE
Last +/- spread (default, all plans): bid = last minus half spread, ask = last plus half spread. Longs mark to bid. Shorts mark to ask. Set Spread (ticks) to your market (1 is typical for MES, MNQ, ES, NQ).
Last price: uses the chart close only.
1-tick bid/ask (Ultimate): uses live 1-tick bid and ask. Requires a TradingView Ultimate plan. If those quotes are missing, it falls back to Last +/- spread.
POINT VALUE
Dollar math is price move x point value x size.
Leave Point value override at 0 to auto-detect common futures (MNQ 2, MES 5, NQ 20, ES 50, YM 5, RTY 50, GC 100, MGC 10, CL 1000, MCL 100, MYM 0.5, M2K 0.5). For other symbols the script uses the chart's built-in point value. If dollars look wrong, set the override yourself.
SETTINGS
Position: Size, point value override, open P&L quote mode, spread in ticks.
Levels: Draggable entry, stop, and target.
Display: Table, zone colors, and zone transparency.
NOTES
This is a calculator overlay, not a strategy and not a broker bridge.
If you want the dollars to match a live ticket, drag this tool onto those prices.
1-tick bid/ask is optional. Leave the default quote mode on unless you have Ultimate.
Not financial advice. Size, point value, and spread must match the instrument you are trading. Indicador

Jackson Hole Symposium [NQTrades]Jackson Hole Symposium
This indicator highlights the historical dates of the Jackson Hole Economic Policy Symposium directly on the chart.
The Jackson Hole Symposium is one of the most closely watched annual central banking events, bringing together policymakers, economists, academics, and financial market participants. Speeches and comments from Federal Reserve officials during the event can generate significant volatility across equities, bonds, currencies, and other financial markets.
Features
Highlights the full Jackson Hole Symposium period directly on the chart.
Includes historical editions from 2020 to 2026.
Differentiates the 2020 and 2021 virtual editions from regular symposiums.
Optional background highlighting.
Optional vertical lines marking the start and end of each symposium.
Optional labels identifying each edition.
Fully customizable colors.
Manual option to add a future Jackson Hole edition without modifying the code.
Alerts available for the start and end of the symposium period.
All event times are handled using New York time for consistency with U.S. financial markets.
Purpose
The indicator is designed as a market context tool, allowing traders to quickly identify how price behaved before, during, and after previous Jackson Hole Symposiums.
It can be particularly useful for studying volatility, liquidity, directional expansion, reversals, and market reactions around major Federal Reserve communication events.
The indicator does not generate buy or sell signals. It is intended to provide historical and contextual information to complement your own trading analysis.
Developed by NQTrades. Indicador

Sattam | Gann ToolsSATTAM | GANN TOOLS - a complete Gann geometry toolkit on two clicks
Four independent Gann constructions, all built from a single anchor you place
yourself: the Cycle Star, the Gann Grid, four Gann Fans, and tiling Gann
Squares. Each turns on or off without disturbing the others.
=== HOW TO PLACE IT ===
Add the indicator and it asks for two points:
1. THE ANCHOR - one click sets both the starting price and the starting date.
2. THE FIRST LEVEL DATE - one click sets the time unit.
Everything else is derived. The gap between the two clicks becomes the box's
time unit, and the starting price becomes the head of the cycle.
=== THE CORE IDEA: THE CYCLE LIVES IN SQUARE-ROOT SPACE ===
The cycle's reach is measured in the SQUARE ROOT of price, not in price:
end = ( sqrt(startPrice) +/- 2 * sqrt(Space) * totalDegrees / 360 ) ^ 2
With Space = 100 one full turn spans exactly 20 units of sqrt(price). Because
the travel is linear in the root, the price gaps compress as price falls and
open up as it rises - the Square-of-Nine behaviour Gann worked in.
Space is the only input that sets the reach:
2*sqrt(50) = 14.1421
2*sqrt(100) = 20.0000
2*sqrt(200) = 28.2843
=== CYCLE SHAPE: A POLYGON'S ANGLE SUM ===
Cycle shape decides how far around the cycle travels and in how many steps.
Each polygon is walked in 2n steps covering its interior angle sum,
(n-2)*180, so a single step is (n-2)*90/n:
SHAPE SIDES STEP STEPS TOTAL SWEEP
Triangular 3 30 6 180
Circular / Square 4 45 8 360
Pentagon 5 54 10 540
Hexagon 6 60 12 720
Heptagon 7 64.2857 14 900
Octagon 8 67.5 16 1080
Nonagon 9 70 18 1260
Decagon 10 72 20 1440
Straight line - 90 4 360
Custom - your Angle derived derived
The root-space reach scales with the total sweep, so a Decagon travels four
whole turns and reaches four times as far as a Circular cycle. Circular and
Square are the same figure - both are the four-sided case.
Custom takes its step straight from the Angle input: set 60 and you get a
Hexagon; leave it at 0 and it falls back to 45.
=== ANGLES, SECONDARY ANGLES AND TIME LEVELS ===
Two ways to distribute the levels:
Calculate Angles by Averages ON
Levels spaced EQUALLY IN PRICE. Even ladder, constant gaps.
Calculate Angles by Averages OFF
Levels spaced EQUALLY IN SQRT(PRICE). The gaps shrink steadily as the
cycle descends and grow as it rises - the truer Gann reading.
Main and secondary levels alternate by index: even-numbered levels take the
main style and colour, odd-numbered ones the secondary. Draw Secondary Angles
hides the odd ones on their own.
TIME DIVISIONS - the box is (steps / 2) units wide.
- Solid time levels on 0, 1/4, 1/2, 3/4, 1 of the width.
- Dashed levels on 1/2 +/- {1/10, 1/6, 1/4, 3/10, 1/3} - the very same five
fractions the price levels use, mirrored about the middle of time instead
of the middle of price.
=== THE STAR ===
The signature figure: the box frame, its mid vertical and mid horizontal, and
FOURTEEN diagonals - corner to opposite corner, corner to the far side's
middle, corner to the mid vertical's opposite end, and the mid vertical's ends
back to both side middles. Twenty lines that mark every internal crossing of
the range.
INTERNAL PRICE LEVELS - five pairs mirrored about the box centre at
1/10, 1/6, 1/4, 3/10 and 1/3 of the span, drawn dotted with their prices
labelled. The quarter pair lands exactly on the 90 and 270 degree levels.
=== THE GANN GRID ===
Full grid
Main channel
A 4 x 4 lattice over the box: the time quarters against the price quarters,
which are the 0/90/180/270/360 degree levels. Every cell carries both of its
diagonals - 32 lines, and nothing else; the grid draws no frame of its own.
Draw only main channel keeps the 1x1 band alone: the diagonal cells keep both
diagonals, the cells directly above and below keep the main one. Fourteen
lines instead of thirty-two.
=== THE GANN FANS ===
1st fan
2nd fan
3rd fan
4th fan
All four
Extra Angles
Extend
A fan from any of the four corners of the box, each on or off independently.
Every fan carries the nine classic Gann angles - 1x8, 1x4, 1x3, 1x2, 1x1,
2x1, 3x1, 4x1, 8x1. Each ratio is drawn as two lines: one crossing the full
width and landing on that fraction of the price span, one crossing the full
span and landing on that fraction of the width. The 1x1 belongs to both
families, so a fan is ten lines.
- Extra Angles adds 5x8, 8x5, 7x8 and 8x7 - four more lines.
- Extend turns the fan into rays that carry on past the box.
=== THE GANN SQUARE ===
One square
Tiled squares
A square of price against time, drawn as the same twenty-line figure the Star
uses, at its own size.
- Box Size is the width in CALENDAR DAYS.
- Height = Box Size x Price Unit.
- Leave Price Unit at 0 and it resolves automatically to one hundred ticks
of the symbol - 10 on a 0.1-tick future, 1 on a 0.01-tick stock.
- Boxes Left / Right / Up / Down tile the identical square in each
direction, so you can carry the grid of squares across the chart.
The square runs the way the cycle runs: down from the anchor on a falling
cycle, up on a rising one.
=== DIRECTION ===
Trend decides which way the cycle travels from the anchor.
- Bullish - up.
- Bearish - down.
- Auto - compares your anchor price with the LAST CLOSE: an anchor above the
market runs down, an anchor below it runs up.
=== EXTENDING THE CYCLE ===
- Extra whole cycle multiplies the walk. On a Circular cycle, 1 takes it
from 360 to 720 degrees and doubles the reach.
- Extra primary angle adds one primary angle - 90 degrees, so two steps. On
a Circular cycle, 1 takes it from 360 to 450 degrees.
- Time space, when set, replaces the First-Level unit with a plain span of
calendar days.
=== STYLING ===
Every family has its own style, width and colour: main angles, secondary
angles, time levels, the star, the star's time levels, the star's price
levels, the grid, the fans and the squares. Label size follows the Size input.
=== NOTES ===
- The two anchor points are interactive inputs. If you edit and recompile
the script, TradingView clears them and asks for the two clicks again.
- The drawing is placed by date, so it keeps the same calendar position
across timeframes.
- On very long sweeps (Decagon, or a large Extra whole cycle) the root can
cross zero and square back up. That is the geometry doing what it is
defined to do, not an error. Indicador

Order Block & Breaker Block ZoneOrder Block & Breaker Block Zone
A strict Order Block detector, and the Breaker Block that a failed Order Block turns into.
Most Order Block tools mark the last opposite coloured candle before a strong move. That
description fits almost any pullback, which is why those tools cover a chart in boxes. This one
asks for four independent pieces of evidence on the same candle before it will draw anything, and then it keeps following the zone for the rest of its life instead of drawing it once and walking away.
The candle's own colour is never checked. Colour is a description of a candle, not evidence about what happened at that price.
WHAT HAS TO HAPPEN
Bullish Order Block
1 The block candle trades BELOW the previous candle's low the sweep
2 That same candle is Candle 1 of a valid three candle bullish imbalance, so Candle 3's low sits above the block candle's high the gap
3 Price does not trade back into the block's high to low range while it is still waiting the zone stays clean
4 A candle CLOSES above the last unbroken swing high the structure break
Bearish Order Block is the same read upside down: the block candle trades above the previous
candle's high, the imbalance runs the other way, and a candle closes below the last unbroken
swing low.
The zone drawn is the block candle's full high to low range.
The structure break also has to land inside a wait window, counted forward from Candle 3. A block that needs fifty candles to break structure is no longer the same story, so the wait is limited and the block is dropped when it expires.
BOS OR CHoCH - A TAG, NOT A GRADE
Market structure is tracked separately, from swing pivots. Each new swing is compared with the
one before it, which gives the familiar higher high, higher low, lower high, lower low reading,
and from that the structure is either bullish or bearish.
A break that runs WITH the structure is a Break of Structure. A break that runs AGAINST it is a
Change of Character, and that is what flips the structure the other way. Mechanically they are
the same event - a close beyond a swing level. Only the direction relative to the current
structure decides the name.
So a Bullish Order Block can arrive in two very different situations, and the label says which:
Bull OB (CHoCH) the market was bearish and this block flipped it a reversal block
Bull OB (BOS) the market was already bullish and carried on a continuation block
Neither ranks above the other. They are different stories, not different quality levels, and the
tag exists so you can tell them apart at a glance instead of reconstructing it from the chart.
THE LIFE CYCLE
A zone is not finished when it is drawn. It is followed until it resolves.
Fresh confirmed and untouched. Drawn in the bullish or bearish colour.
Mitigated price has traded back into the zone. It is no longer a fresh Order Block, so it
is repainted in grey. It is kept because it is what a Breaker grows from.
Breaker Block the zone has failed, with a candle CLOSING through its far side. It flips polarity and is redrawn in the opposite colour. A wick through does not count.
The entry and the failure can land on the same candle. One candle that trades into the zone and closes through the other side takes the block from fresh to Breaker in a single step, and that is treated exactly like a slower failure.
No reaction inside the zone is asked for before a Breaker is drawn, and that is a deliberate
departure from how this is usually done. Where an Order Block is only "the last opposite candle
before a move", a Breaker built on it needs a second proof, because the block itself proved
nothing. That weakness is not present here. A zone only becomes an Order Block after a sweep, and imbalance and a structure break, and a displacement that broke structure IS the evidence that orders were resting at that price. Asking for a reaction on top of it is asking for a second
receipt for the same purchase.
It is also worth being clear about what actually traps a trader. Limit orders fill the moment
price trades into the zone. They are trapped the moment a candle closes through the far side. A reaction candle in between never created that trap - it was only a witness to it, and the absence of a witness does not mean the event did not happen. A proven zone that is overrun without even being allowed to answer is not the weaker case. It is the more one sided one.
WHAT MAKES THIS DIFFERENT
1. Four conditions, not one.
Sweep, imbalance, clean zone and structure break each test something different: that liquidity
was taken, that the move away was violent enough to leave a gap, that nobody has been back, and that the move changed something. Any one of them on its own is common. All four on the same candle is not.
2. Colour is ignored on purpose.
The classic "last opposite candle" case still gets caught, because the candle that sweeps the
previous extreme is usually that candle anyway. It is caught as a consequence of the evidence
rather than as the rule, and the blocks that only ever qualified on colour are left out.
3. The zone is followed, not just marked.
Fresh, mitigated and breaker are three different states, and a zone moves between them as price does its work. What is on the chart is the zone's current condition, not the condition it was in on the day it formed.
4. The Breaker inherits the block's proof instead of asking for a new one.
Because the Order Block had to earn its place, a Breaker built on it does not need a reaction
close to be believed. What is asked for is the one thing that actually matters: a candle body
closing through the far side. That keeps the rule honest in both directions - it does not throw
away a violent one candle break, and it still refuses a wick.
5. Structure is measured, not assumed.
BOS and CHoCH come from confirmed swing pivots that have to be paid for with right hand candles. Nothing is read from a moving average or a fixed lookback window.
6. The evidence is on the chart, not just the claim.
Each block can show the imbalance that qualified it and the swing level whose break confirmed it. You are not asked to take the label's word for it - the gap and the broken level are drawn where they happened, so the block can be checked in a couple of seconds.
READING THE CHART
Green box, "Bull OB (BOS)" or "Bull OB (CHoCH)" fresh bullish Order Block, label below
Red box, "Bear OB (BOS)" or "Bear OB (CHoCH)" fresh bearish Order Block, label above
Grey box, "... mitigated" tapped, waiting to resolve
Green box, "Bullish Breaker" a failed bearish block, polarity flipped
Red box, "Bearish Breaker" a failed bullish block, polarity flipped
Each box spans the Order Block candle's full high to low range, and runs to the right edge while
the zone is still drawn so you can see where price sits against it now.
Two extras are drawn alongside each block:
Dotted yellow box the imbalance that qualified the block. It covers the three candles it formed on and sits directly ON TOP of a bullish zone or directly BELOW a bearish one, because the gap starts where the block candle ends.
Dashed line the swing level whose break confirmed the block. It runs from the swing itself across to the candle that closed through it, so you can see which high or low was taken and how far the move travelled to take it.
Between them these two say why the block exists: the gap is the imbalance test, the dashed line is the structure test. Both are the Order Block's credentials, so both disappear once the zone flips to a Breaker. By then its Order Block life is over and only the level still matters.
A Breaker's box can begin either at the candle that broke the zone or at the original Order Block
candle. The price levels are identical either way - only the left edge moves. Starting at the
breakout is the default, because a Breaker only becomes a Breaker when it flips, and drawing it
from its birth stretches old ones across the entire chart.
A chart can only stay readable if it is not covered in boxes, so only the most recent few zones
of each kind are drawn. Order Blocks - fresh and mitigated together - have their own limit, and
Breaker Blocks have theirs. Everything older is still tracked and can still turn into a Breaker
later, it is simply not on screen.
The corner table counts everything still being tracked: fresh Order Blocks, mitigated zones and
Breaker Blocks, split into bull and bear. It counts zones whose type is switched off and zones
sitting outside the display limits too, so the table describes the record while the chart shows
the recent part of it. If the table reads higher than what you can see, that is the display limit
doing its job.
Two more optional overlays are available for checking the structure engine directly. Swing labels put HH, HL, LH and LL on the pivots, and the structure break markers name every BOS and CHoCH on the chart rather than only the ones that confirmed a block. Both are off by default.
SETTINGS
Market Structure
- Swing Left and Swing Right: how many candles must confirm a pivot on each side. The default of 5 and 5 reads ordinary swing structure. Lower it to 3 and 3 for minor structure and many more breaks; raise it for major structure only. Swing Right is also the confirmation delay - a swing does not exist until that many candles have closed.
- Show Swing Labels (HH / HL / LH / LL): names each confirmed pivot.
- Show Every Structure Break (BOS / CHoCH): draws and names every break on the chart, not only the ones that confirmed a zone.
Order Block
- Scan Length: how many closed candles back the search for new blocks reaches. The running candle is always excluded. This bounds the search, not the structure engine - swings and the bullish or bearish structure state are read from the whole chart, so a block found right at the edge of the window is still measured against everything that came before it.
- Max Order Blocks Shown: how many of the most recent Order Blocks are drawn. Fresh and mitigated zones share this limit. This is the setting to reach for when the chart feels crowded.
- Max Breaker Blocks Shown: the same limit for Breaker Blocks, counted separately.
- Structure Break Wait: how many candles a block may wait for its structure break, counted from Candle 3 of the imbalance. The zone has to stay clean for the whole wait. If the wait runs out the block is dropped.
Zone Types
- A switch for each of the five things that can be on screen: bullish and bearish Order Blocks,
mitigated zones, and bullish and bearish Breaker Blocks.
- Show Order Block FVG: draws the imbalance that qualified each block.
- Show Confirming Swing: draws the swing level whose break confirmed each block.
Zone Style
- Bullish, bearish, mitigated and imbalance colours, fill transparency, and whether drawn zones
extend right. The imbalance is always filled a little lighter than the zone it belongs to, and
neither the imbalance nor the confirming swing is ever extended - both mark where something
happened, not where price is now.
- Breaker Zone Starts At: whether a Breaker's box begins at the Breakout Candle, where the zone actually flipped, or at the Order Block Candle it grew from. Breakout Candle is the default and keeps old Breakers from stretching across the whole chart. The price levels do not change.
Labels
- Show Labels, Label Size, and Label Distance from Zone as a percentage of the zone height.
Increase the distance on noisy charts so labels clear the candles.
Summary Table
- Show, position and size of the corner table.
ALERTS
Six alert conditions:
Bullish Order Block a bullish block has confirmed its structure break
Bearish Order Block a bearish block has confirmed its structure break
Bullish OB Mitigated price has traded back into a fresh bullish block
Bearish OB Mitigated price has traded back into a fresh bearish block
Bullish Breaker Block a failed bearish block has become a bullish Breaker
Bearish Breaker Block a failed bullish block has become a bearish Breaker
Each message carries the event, the symbol, the timeframe and the closing price. The same
messages are also sent through the alert function, so the "Any alert() function call" alert type
can deliver all six through a single alert.
Every alert is evaluated only after a candle has fully closed.
REPAINTING
This script does not repaint.
- The whole engine runs once per closed candle. Price moving inside an open candle cannot create, change or remove anything, and cannot make a signal appear and then disappear.
- Swings are only usable after their right hand candles have closed. That delay is deliberate: it
is what makes a swing a fact rather than a guess. A swing high therefore appears Swing Right candles after the candle it belongs to, and a structure break can only be measured against a
swing that already existed.
- Zones are built forward, one candle at a time, in the same order they would have been built
live. A zone that has been drawn is never moved. Its colour changes when its state changes, and
that is a record of what price did afterwards, not a revision of what it did before.
- Nothing is read from a higher timeframe, so there is no higher timeframe lookahead to get
wrong.
When you create an alert, TradingView may show a caution banner saying the indicator can repaint. That banner appears automatically for any script that uses the built in bar state variables, no matter how they are used, because the platform cannot check the intent behind them. This script uses one of them for the opposite purpose: it is what restricts the entire engine to bar close. Choosing "Once Per Bar Close" when creating the alert is still recommended.
NOTES AND LIMITATIONS
- The pattern is rare by design. Four conditions have to line up on the same candle, so long
stretches with nothing new on the chart are normal. If you want to see more, look at a faster
timeframe rather than loosening the settings.
- A block that is tapped before its structure break lands is dropped rather than confirmed. This
is strict on purpose: an Order Block that has already been traded back into was not untouched
when it confirmed, whatever happened afterwards.
- Swing Right is a real delay. On a very slow timeframe the confirmation of a swing can take a
meaningful amount of time, and a structure break cannot be recognised before the swing it breaks has been confirmed.
- Scan Length and the display limits do two different jobs. Scan Length decides how far back
blocks are looked for at all, so raising it can find older blocks. The display limits only
decide how many of what was found is drawn; raising them shows more of the same set, lowering them hides zones that are still being tracked. Nothing about how a block is detected or how it resolves depends on whether it happens to be drawn.
- An internal cap of 200 tracked zones keeps memory and the drawing count inside TradingView's limits. On a very long history the oldest tracked zones are dropped, so the table describes the recent record rather than the entire chart.
- Detection is purely structural. It reports where these sequences occurred and what state each
zone is in. It does not rank zones by quality, measure follow through, or produce entries,targets or stops.
HOW TO USE IT
A fresh Order Block marks a price where liquidity was taken, the move away left a gap, nobody has been back, and structure changed. Traders commonly watch these areas for:
- A reaction on the first return, since the zone is untouched until then
- Context from the tag, where a CHoCH block sits at a possible turn and a BOS block sits inside
an existing move
- Confirmation against a higher timeframe read, where a block that agrees with the larger picture carries more weight than one that fights it
A grey mitigated zone is a zone that has already been used once. It is worth less as an entry
area and worth more as a warning: it either holds from here, or it becomes a Breaker.
A Breaker Block is the opposite side of the same level. Traders commonly watch the far edge - the low of a broken bullish block, the high of a broken bearish block - on the first return after the flip.
These are reference areas, not entry signals on their own. Use them alongside your own structure read, your own entry method and proper risk management.
DISCLAIMER
This indicator is a pattern detection tool. It is not financial advice and it makes no claim
about profitability. Trading involves risk. Always apply your own analysis and risk management. Indicador

Supply Demand AI [PickMyTrade]Supply Demand AI asks the question every supply/demand tool skips: when price returns to a zone, does this arrival look like the ones that reversed — or like the ones that ate straight through?
Every supply/demand indicator draws the zone. None of them score the arrival. This one does. Each time price re-enters a zone, nine properties of the return are frozen before the outcome is known — approach speed, prior tap count, zone age, departure strength, base tightness, base volume, trend pressure, relative volume and zone width — and the arrival is voted on by a Lorentzian nearest-neighbour search over every similar return this chart has already resolved. The result is stated in the past tense: of the arrivals that looked like this, X% produced the configured reaction move before the zone failed.
The script also scores two doctrines stated everywhere in supply/demand teaching and measured almost nowhere: whether fresh zones genuinely outperform tapped ones on this chart, and whether heavy-volume bases genuinely outperform quiet ones. The info table reports what actually happened, not what the doctrine says should have.
――――――――――――――――――――――――――――――――――――――
🔷 WHAT IT MEASURES
🔸 Zone formation — base-and-departure, not pivot clustering A zone is born from a run of compressed candles (the base) followed by an impulsive leg away of a configurable ATR multiple within a fixed window — the Rally-Base-Drop / Drop-Base-Rally shape, detected as a sequence rather than asserted from a single bar. A pivot cluster has no departure to measure; a base-and-departure zone has three properties frozen at birth that a pivot never carries: how hard the market left, how tight the base was, and which side was trading volume while it sat there.
🔸 Zone geometry The origin block (solid segment) marks the actual base candles. The projection (lighter band) carries those prices forward to where they can be tested. The departure measure (vertical bar on the departure candle) shows the full distance the move reached — readable straight off the price scale. Freshness is written as text ("fresh" / "2 taps"), not encoded in a line style that has to be decoded.
🔸 Outcome — reaction magnitude, not hold-or-break A return that drives the configured ATR multiple back away from the zone edge before closing decisively through it = REACTED. A return that closes beyond the far edge by the break buffer = FAILED. A return that does neither inside the timeout window = STALLED and discarded from training — price sitting inside a zone is not evidence either way.
🔸 Two doctrine read-outs The info table reports the freshness edge (did untouched zones react more often than tapped ones on this chart?) and the base-volume edge (did heavy-volume bases outperform quiet ones?). Either can come back negative, and the table says so when it does.
――――――――――――――――――――――――――――――――――――――
🔷 THE LORENTZIAN NEAREST-NEIGHBOUR CLASSIFIER
🔸 Why Lorentzian, not Naive Bayes A Naive Bayes model was the obvious alternative and is the wrong tool here: it assumes the features are conditionally independent given the class. Departure strength, base tightness and zone width all describe the same underlying impulse from three angles — multiplying their densities counts one piece of evidence three times. A nearest-neighbour vote makes no independence assumption at all. It asks a narrower, more honest question: of the returns already resolved on this chart, what happened to the ones that arrived most like this one?
🔸 Distance metric Distance is Lorentzian — log(1 + |a − b|) — applied per axis and summed. Against a library of this size, plain Euclidean distance lets one outlier axis dominate; the log compresses extremes, so a return that is typical on eight features and unusual on the ninth still finds its true neighbours.
🔸 Shared library — supply and demand in one pool Every feature is written relative to the direction of the test, so a fast approach into demand and a fast approach into supply are the same event described the same way. Sharing one library across both directions doubles the effective sample count without mixing unlike distributions.
🔸 Shrinkage The neighbour vote is shrunk toward the library's own base rate. Without it, k unanimous neighbours read as a certainty the sample size cannot support. The shrinkage weight is expressed in neighbour-equivalents so it is independent of k.
🔸 Honest caveat — stated here, not buried in a tooltip The classifier learns as history replays, so loading a different amount of chart history changes how many returns have trained it and therefore the percentage shown on a zone. The zones themselves, their boundaries and which bars they appear on are unaffected. This is inherent to on-chart learning.
――――――――――――――――――――――――――――――――――――――
🔷 SIGNALS AND DISPLAY
🔸 Zone appearance Full-strength blue (demand) or orange (supply) border at or above the conviction threshold. Muted at the opposite end. Neutral while price is inside — the zone is neither reacting nor failing yet. Grey once consumed. A zone born from twice the required departure draws with a heavier border — the one property worth reading before any text.
🔸 Zone label Nearest live demand, nearest live supply, and any zone with a return open right now receive a worded label: zone type · departure in ATR · evidence grade (A–D) · tap count · classifier read. Every other zone speaks through colour alone, which caps visible labels at roughly three regardless of timeframe or zoom.
🔸 Evidence grade (A–D) Measures accumulated evidence only — departure strength (35%), base tightness (25%), resolved return count (20%), age (20%). Deliberately excludes the classifier's probability so the grade and the percentage remain two different statements: the grade says how much stands behind the zone; the percentage says how similar arrivals resolved.
🔸 Return history ticks A coloured tick inside the zone at every bar where one of its own returns resolved — blue for a reaction, orange for a failure. Renders each zone's individual track record in place so the percentage can be read against the evidence behind it.
🔸 Order flow band A band above the trend EMA while cumulative volume delta is rising, below it while delta is falling. Opacity scales with how strong that pressure is against its own recent range — a faint band means the tape is undecided; a solid band means one side is leaning on it. Context, not a signal: it says which side is pressing when price arrives at a zone.
🔸 Info table Zones on chart · returns graded · overall reaction rate · freshness edge · base-volume edge · base-flow edge · live order flow direction and z-score · nearest demand and supply with ATR distance. Reads LEARNING until the warmup sample count is met.
🔸 Alerts Four alertcondition() calls: price entered a zone · return reacted · return failed · any resolved return. Worded as observations. Recommended alert setting: Once Per Bar Close.
――――――――――――――――――――――――――――――――――――――
🔷 INPUTS
🔸 Zone Detection Base Candle Max Range (ATR ×) — a candle counts as base while its range is below this multiple. Lower = cleaner zones, fewer of them. Default 0.60. Min / Max Base Candles — fewest and most candles that form a valid base. Default 1 / 6. Departure Strength (ATR ×) — how far price must travel from the base before the base qualifies as a zone. The single most important setting. Default 1.60. Departure Window (bars) — bars allowed for the departure to reach its target. Default 5. Zone Boundaries — Wick or Body extent for the base. Wick is the conservative read. Default Wick. Minimum Zone Height (ATR ×) — floor on zone thickness, expanded symmetrically about the base midpoint. Default 0.45. ATR Period — volatility yardstick for all distances. Default 14.
🔸 Return Resolution Reaction Target (ATR ×) — how far back away from the zone counts as a REACTION. Default 1.50. Break Buffer (ATR ×) — how far beyond the far edge price must CLOSE to count as a failure. Default 0.30. Return Timeout (bars) — bars a return stays open before being discarded as STALLED. Default 20. Zone Consumed On — Wick Touch / Body Touch / 50% Fill / Full Fill. Governs retirement only; returns always measure from the first wick. Default Body Touch. Max Returns Per Zone — a zone revisited this many times behaves like a range boundary. Default 4.
🔸 Probability Engine Warmup Samples — resolved returns required before the classifier replaces the running reaction rate. Default 25. Neighbours Compared — k in the nearest-neighbour vote. Smaller = more local; larger drifts toward the library rate. Default 8. Conviction Threshold — probability at or above which a zone draws at full conviction. Default 0.62. Approach Window — bars used to measure how fast price entered the zone. Default 5. Volume Baseline — averaging window for relative volume. Default 20. Trend EMA Period — reference for the trend-pressure feature. Default 50.
🔸 Order Flow Order Flow Band — show / hide. Default on. Flow Momentum Period — lookback for the rate of change of CVD. Default 14. Flow Band Width (ATR ×) — height of the band from the EMA to its outer edge. Default 1.00. Flow Normalisation Window — z-score window so the band reads the same across instruments. Default 50.
🔸 Visual Demand / Supply / In-zone / Consumed Colours · Show Zones · Zone Labels · Return History Ticks · Keep Consumed Zones · Max Live Zones (cap on live slots; consumed zones are free) · Zones Per Side (nearest N zones above and below price) · Show Zones Within ATR × (safety ceiling) · Label Every Zone · Label Size · Zone Border Width · Zone Evidence Grade.
🔸 Display Zen Mode — hides labels and info table; zones and ticks remain. Show Info Table.
――――――――――――――――――――――――――――――――――――――
🔷 REQUIREMENTS AND LIMITATIONS
🔸 The classifier reads what this chart has seen — not a pre-trained model and not a fixed statistical table. On a chart with thin history or a symbol the market has recently repriced, the library may be small and the read thin. The sample count travels with every zone label and the table header so this is never hidden. 🔸 Loading a different amount of chart history changes how many returns have trained the classifier, which changes the percentage shown on a zone. The zones themselves are unaffected — this is inherent to on-chart instance-based learning. 🔸 Zone geometry is fixed at birth and never re-centred. No request.security() call is made anywhere. Test state advances only on barstate.isconfirmed. No future data is referenced. 🔸 The departure is measured over bars that have already closed. A zone appears on the bar its departure qualifies and never moves afterwards. 🔸 Base volume and base flow are estimated from the close-position formula — a synthetic proxy, not true bid/ask data. The classifier adapts to the noise, but the quality of the read improves on instruments with genuine intrabar price travel. 🔸 The evidence grade (A–D) and the classifier percentage are two different statements by design. Do not read either alone. 🔸 Past resolved returns are hypothetical observations — no commission, no slippage — and are not a record of trading results. This script does not issue trade instructions and nothing in it is financial advice.
――――――――――――――――――――――――――――――――――――――
Built natively in Pine Script® v6. Lorentzian k-nearest-neighbour classifier trained on-chart from resolved supply/demand returns — no external libraries, no lookahead, no repainting. Zone formation uses a base-and-departure state machine; outcome is reaction magnitude, not hold-or-break. Attribution: the Rally-Base-Drop / Drop-Base-Rally construction is long-established public technical analysis, implemented independently here. The evidence grade and drawing layer are shared with the author's own Support Resistance AI — stated here plainly rather than left for a reader to find.
Open source — Mozilla Public License 2.0. Indicador

Trendline BreakoutsDraw a trendline by hand and you will always find one that fits. That is the problem, not the skill.
This script does not let you go looking for it. It builds every line from real swing highs, keeps only the ones a later high confirms, and deletes any line that price has already traded through. The same rule runs on every chart, every timeframe, every time you load it.
How a line earns its place
Two swing highs propose a line. A third high has to land on it, inside the tolerance you set. If any bar in between traded through the line, the line never existed. Nothing here is drawn by eye and nothing is fitted after the fact.
The break ⚡, and what came after it
The first bar that trades above the line closes it and gets a triangle. From there the script assumes an entry at the break level and your stop distance below it, then measures the best move that break went on to produce before the stop was lost . The figure is printed next to the break.
What you control
The touch tolerance, how much slack a line may absorb before it is invalidated, how far price must travel to confirm a break, when a quiet old line fades, and your stop. Tighten it for textbook lines. Loosen it and see how much structure survives.
📊 The panel
Lines found, how many are still unbroken right now, the risk you chose, and the average peak gain across the breaks on screen, always next to the number of breaks behind it. An average without its sample size tells you nothing.
⚠️ Read this part too
The peak gain is the best excursion after the break, not a realised return. It assumes you sold at the exact high, which you will not. Everything is recomputed on the bars you can see, so panning and zooming change the picture. This build measures on a linear price scale and reads bullish structure only.
I hope this helps you to finally draw lines properly so you can trade them confidently. Indicador

10am/10pm opensDual Time Opens (10:00 / 22:00) — 2H
This indicator marks the opening price of two specific times of day and draws each as a horizontal line that stops after a set duration. By default it plots the 10:00 AM and 10:00 PM New York opens, with each line running exactly two hours forward.
WHY TIME-LIMITED LINES
Most opening-price scripts extend their levels to the right edge of the chart or to the end of the session. That works when you only care about one level, but it clutters quickly once you're tracking multiple times per day, and it visually implies the level still matters hours after it stopped being relevant. This script draws each line for a defined window and then ends it, so what you see on the chart is the period the level was actually in play.
HOW IT WORKS
On each trading day the script identifies the first bar that reaches the configured time and records that bar's open price. It then draws a horizontal line from that bar forward by the chosen duration, measured in clock time rather than in bar counts — so the line covers the same real-world window regardless of whether you're on a 1-minute or 15-minute chart. If the exact bar is missing due to a data gap or thin liquidity, the script falls back to the first available bar within the window rather than skipping the day.
Times are evaluated in a user-selected timezone, independent of the chart's own timezone setting. The default is America/New_York, so 10:00 and 22:00 mean 10am and 10pm Eastern no matter how your chart is configured.
SETTINGS
Clock to use — timezone the times are measured in, or "Exchange" for the symbol's native time
Open #1 / Open #2 — hour and minute for each level, plus color and label tag; either can be turned off
Extend for (hours) — line duration, adjustable from 15 minutes to 24 hours
Width / Style — solid, dashed or dotted
Price tag — optional label showing the level's price at the end of each line
Keep last N days — trims older drawings to stay under Pine's 500-object limit
Alerts are available for each level being marked.
NOTES
Requires an intraday timeframe of 1 hour or lower. On symbols with restricted sessions, a level only appears if the chart's session actually covers that time — for a 22:00 level on equities, extended hours must be enabled. Indicador

Swing Volume Profile (VPVR) with POC and Value AreaSwing Volume Profile (VPVR) with POC and Value Area
What it does
This indicator builds a volume profile anchored to the last confirmed swing pivot instead of a fixed number of bars. As price makes a new confirmed swing high or low, the profile re-anchors and rebuilds over the range from that pivot to the current bar.
How it works
Swing pivots are detected with a symmetric left/right pivot strength. The price range between the last confirmed pivot and the current bar is divided into rows, and each bar's volume is spread evenly across the rows its high-low range covers.
The row with the most volume becomes the Point of Control (POC).
Starting from the POC, the script expands outward to the next-highest-volume row on either side until the chosen share of total volume is enclosed - that range is the Value Area, bounded by VAH (Value Area High) and VAL (Value Area Low).
An optional estimated buy/sell split colors each row by where price closed inside every bar's range (close near the high leans buy, close near the low leans sell). This is a derived estimate from bar data, not tick or order flow data, and is off by default.
The profile is placed beside price, never on top of it, with an adjustable offset so the most recent candles stay uncovered.
An optional faded profile of the previous completed swing can be shown alongside the current one for comparison.
How to use it
Add the script to a chart. The profile appears once the first swing pivot has confirmed.
Read the widest row as the Point of Control and the shaded band around it as the Value Area.
Turn on Split Buy/Sell to see an estimated buy/sell lean per row, or Show Previous Swing Profile to compare against the prior swing.
Watch for price crossing the POC or leaving the Value Area, and use the matching alert instead of watching the chart continuously.
Inputs
Anchor - Pivot Strength (bars required on both sides of a high/low to confirm a pivot), Anchor Mode (Last Swing High, Last Swing Low, or Last Swing Either), Max Bars In Profile (safety cap while no new pivot has confirmed).
Profile - Rows, Value Area % (50-95), Split Buy/Sell (estimated), Show Previous Swing Profile.
Placement - Profile Side (Right of Price or Left Edge of Range), Profile Width %, Offset Bars.
Style - Profile Color, Buy Color, Sell Color, POC Color, Value Area Color, Profile Opacity, Show POC Line, Show Value Area Box, Extend POC To Right, Show Level Prices, Text Size.
Signals and alerts
Price crossed POC - fires once per bar close when price closes across the swing-anchored volume profile's POC level.
Price left Value Area - fires once per bar close when price closes outside the value area after previously trading inside it.
New swing anchor set - fires once per bar close when a new confirmed swing pivot re-anchors the volume profile.
Repainting
No repainting - measured, not claimed: alert conditions are evaluated only on confirmed bar closes. The profile itself updates live while the current bar is still forming, similar to a moving average or VWAP, but no past drawing is ever redrawn or removed retroactively.
Limitations
The buy/sell split is an estimate derived from bar close position, not real order flow.
The profile only appears once a first swing pivot has confirmed on the chart.
This script works exclusively with bars of the chart's own timeframe. It does not request data from any other timeframe or resolution, so it has no plan-dependent history limit and looks the same on every account tier and every amount of chart history.
One package, one system - module from a shared engine of chart-timeframe-only indicators.
This script is a charting tool for educational purposes. It does not provide financial advice and does not predict future price movement. Trading carries risk; decisions and their outcome remain yours. Indicador

Lows and highs strength indicatorLows and highs strength indicator marks the two levels that matter most to the current market structure — the swing high sitting above price and the swing low sitting beneath it — and then answers the question most level-drawing tools leave open: which one of these two is going to break, and which one is going to hold?
Every level on your chart is not equal. Some are defended and will reject price. Others are simply liquidity waiting to be collected. This indicator labels each of its two levels as either strong (defended — treat it as a barrier) or weak (undefended — treat it as a target), and updates those labels automatically as market structure shifts.
Two lines, two labels, one setting. Works on any market and any timeframe.
THE CORE IDEA
A strong high is a high that price tried to reach and failed to take out. Because it was never breached, the buy-side liquidity resting above it is still sitting there untouched, and the level has proven it can push price away. It behaves like genuine resistance.
A weak high is the opposite. Structure is already trending upward into it, so rather than defending itself it is far more likely to be run through. It is not resistance — it is a magnet. Price is being drawn toward the liquidity above it.
The same logic applies in reverse to lows. A strong low has held and represents real support; a weak low is a downside liquidity target that the market is expected to reach for.
The crucial part is that the two labels are always opposite each other . You will never see a strong high and a strong low at the same time. Market structure can only lean one way:
Strong high above + weak low below → structure is bearish. The high is defended, the low is the target.
Weak high above + strong low below → structure is bullish. The low is defended, the high is the target.
That single pairing tells you the directional bias, where price is being pulled, and where it is likely to be rejected — all from two lines.
HOW TO USE IT WHEN TRADING
1. As a directional bias filter.
Before taking any setup, glance at which side is strong. If the high is strong and the low is weak, the path of least resistance is down. Longs into a strong high are fighting a defended level with an untouched pool of liquidity above it. This alone filters out a large share of low-quality counter-structure entries.
2. As a target.
The weak level is where the market is most likely headed, because that is where the unclaimed liquidity sits. In bearish structure, the weak low is a natural take-profit reference for shorts. In bullish structure, the weak high serves the same purpose for longs. Trading toward the weak side and away from the strong side is the indicator's most direct application.
3. As invalidation and stop placement.
The strong level is the structural line in the sand. If price closes decisively beyond it, the premise of your trade is gone — that break is exactly what flips the bias and relabels both levels. Placing stops beyond the strong level means you are stopped out only when the structure genuinely changes, rather than on ordinary noise.
4. As a reversal zone.
Approaches into a strong level are where rejections tend to occur. Combined with your own entry trigger — an engulfing candle, a lower-timeframe structure shift, a divergence — a strong level gives you a high-quality location to look for a turn, with clearly defined invalidation just beyond it.
5. As a liquidity sweep watch.
Pay attention when price wicks just past a strong level and immediately closes back inside. That is often a stop run rather than a real break: the level collected the liquidity above (or below) it and rejected. This indicator deliberately ignores wicks — only a decisive close through the level counts as a structural break.
Example read. On the Bitcoin daily chart, structure is bearish: the indicator shows a strong high at 82,791 and a weak low at 56,018. You know three things immediately: the bias is down, the weak low is the level price is reaching for, and the strong high is where the bearish premise would be proven wrong. A short taken on a rally into the strong high has its target, its invalidation, and its directional logic all defined by two lines.
Hover either label for a full plain-language explanation of why that level currently reads strong or weak, and exactly what would flip it to the other state.
HOW IT WORKS
The indicator runs a four-stage pipeline on every bar.
1. Swing detection.
A swing high is confirmed when a bar's high has Swing length bars with lower highs on both sides of it; a swing low is the mirror image. This symmetric test means a swing point is only recognised once enough bars have passed to prove it genuinely was the extreme — no forward-looking data is used.
2. Level anchoring.
When a new swing point is confirmed, it becomes the active swing high or swing low, and the corresponding line re-anchors to it.
3. Trailing extremes.
Between swing points, each line ratchets outward with price — the upper line tracks the highest high of the current swing, the lower line the lowest low. This keeps both levels pinned to the true extremes of the live swing rather than to a stale historical price.
4. Break of structure.
When a candle closes beyond the active swing high, structure flips bullish; a close beyond the swing low flips it bearish. This bias drives the strong/weak labelling. Each swing level is consumed the moment it breaks, so a single level can only flip the bias once. And because the test is a plain closing test rather than a crossing test, the rare case where a swing point is confirmed while price already trades beyond it is registered immediately instead of being missed.
Closes are used rather than wicks deliberately — a wick through a level is a liquidity sweep, not a structural break, and treating the two the same is what causes most false structure signals.
No repainting. Every calculation uses confirmed historical data with no lookahead. The lines extend in real time as the current candle makes new extremes, which is expected live behaviour, but past structure is never rewritten.
SETTINGS
Swing length (default 50) — how many bars are required on each side of a candidate swing point before it is confirmed. This is the one setting that meaningfully changes the indicator's character:
Lower (10–25) — faster, more reactive levels that track shorter swings. Suited to intraday and scalping, at the cost of more frequent bias flips.
Default (50) — balanced structural levels. A solid starting point on most markets and timeframes.
Higher (75–150) — only major structural turning points register. Suited to swing and position trading, where you want the levels to stay put.
High color and Low color — the two line and label colours, red and green by default.
THINGS TO BE AWARE OF
The levels lag, by design. A swing point cannot be confirmed until enough bars have passed to prove nothing exceeded it. That delay is what makes the level trustworthy rather than a guess, but it does mean this is a tool for structural context and bias, not for precise entry timing. Pair it with your own entry trigger.
On very short chart histories both levels may read weak. Until the first break of structure occurs there is no bias to judge them against, and the labels default to weak. Hovering a label will tell you when this is the case. It resolves as soon as the first structural break happens.
It is a context tool, not a complete system. It tells you which direction structure favours and where the liquidity sits. It does not tell you when to click the button. Use it to frame your bias, choose your targets, and place your invalidation — then let your own entry method handle the timing.
Indicador

NASDAQ Pre-Market Range Sweep [josseliani]NASDAQ Pre-Market Range Sweep is an intraday trading assistant built around a familiar pre-market range sweep-and-reclaim setup. It automatically maps the NASDAQ range formed between 08:00 and 09:00 New York time, then monitors price behavior as activity increases ahead of the 09:30 cash-session open. The main idea is simple: after price sweeps liquidity beyond one side of the pre-market range, it may either continue moving away or return inside the range and move toward its midpoint or opposite boundary. Instead of requiring users to draw these levels manually and monitor every candle, the indicator plots the range, qualifies the sweep, waits for one of two entry confirmations, marks Entry and TP1, and collects historical statistics for the same setup.
This is an indicator, not a TradingView strategy. It does not place orders or manage positions.
WHY THIS RANGE
By default, the range is built from M1 candles between 08:00 and 09:00 in the America/New_York time zone.
This hour captures a defined part of the NASDAQ pre-market before the transition into the more active New York morning and the 09:30 cash-session open. Once this period is complete, the indicator fixes: → Range High → Range Low → the 50% midpoint
With the default one-minute delay, sweep monitoring begins at 09:01 New York time.
The range levels can remain visible for a fixed number of minutes or extend until the next daily range begins.
QUALIFIED LIQUIDITY SWEEP
A small wick through Range High or Range Low is not enough to qualify as a sweep.
The entire M1 candle must be outside the range: → for an upper sweep, the candle’s low must be above Range High → for a lower sweep, the candle’s high must be below Range Low
By default, the outside candle must also take the nearest previously confirmed pivot on the same side. This optional structural filter helps distinguish a more substantial liquidity event from a minor extension beyond the range.
A qualified sweep is not an immediate entry. The indicator then waits for one of two confirmations: Range Reclaim or Pivot Entry.
RANGE RECLAIM
Range Reclaim is used when price returns inside the pre-market range after the sweep.
For a BUY after a lower sweep, the indicator waits for a closed M1 candle that: → closes inside the range → has at least 70% of its body inside the range under the default settings
Once that candle has closed, its high becomes the confirmation level. BUY is displayed when price subsequently breaks that high.
For a SELL after an upper sweep, the logic is reversed: the acceptance candle closes inside the range, and SELL is confirmed when price subsequently breaks its low.
For Range Reclaim: → Entry is the high or low whose break confirmed the signal → TP1 · Partial close is placed at the 50% midpoint of the range
The midpoint is used as the first structural objective because price has returned inside the range but is not guaranteed to reach the opposite boundary.
PIVOT ENTRY
Pivot Entry is designed for cases where price continues significantly beyond the swept range boundary.
The search for this entry is activated only after price has moved at least one complete range width beyond that boundary.
The indicator then waits for a new confirmed pivot to form outside the range: → after a lower sweep, it looks for a confirmed pivot high below Range Low and a subsequent break above it → after an upper sweep, it looks for a confirmed pivot low above Range High and a subsequent break below it
For Pivot Entry: → Entry is placed at the broken pivot level → TP1 · Partial close is placed at the nearest boundary of the original range
If Range Reclaim and Pivot Entry are confirmed on the same M1 candle, only one signal is recorded.
SIGNAL CONTROL
The same acceptance candle or confirmed pivot cannot generate repeated signals.
After a BUY, another BUY requires a genuinely new low beyond the extreme of the previous outside movement. After a SELL, another SELL requires a genuinely new high. The number of signals per range is also limited by the Maximum signals per range setting.
Once price reaches the opposite boundary of the range, the current range cycle is considered complete, and no additional signals are generated until the next range.
CHART DISPLAY
The indicator can display: → Range High and Range Low → the 50% midpoint → confirmed BUY and SELL arrows → Entry → TP1 · Partial close → the statistics table
BUY and SELL arrows show that one of the two confirmation models has been completed. Entry marks the level whose break confirmed the setup. TP1 · Partial close marks the first structural reference: → the range midpoint for Range Reclaim → the nearest range boundary for Pivot Entry
The trade markup is an analytical reference. It does not represent an automatically executed order or a guaranteed target.
TIMEFRAMES
All signal calculations are performed using M1 data.
On M1, the indicator displays the original signals together with the Entry and TP1 markup. On M5 and M15, it displays markers cloned from the original M1 events. It does not recalculate the setup using M5 or M15 candles. This allows the same M1 signals to be viewed within a wider market context.
Timeframes above M15 are not supported.
STATISTICS TABLE
The statistics table provides a historical view of how price behaved after a qualified sweep. For each completed range, the table evaluates the first qualified sweep found within the observation window.
Return depth is normalized according to the width of each individual range: → 0% = the swept boundary → 50% = the range midpoint → 100% = the opposite boundary
OVERVIEW
Completed ranges — the number of completed observations. An observation ends when price reaches the opposite boundary or when the statistics look-forward window expires.
Qualified sweeps — the number of completed ranges in which a qualified sweep occurred. The percentage is calculated from all completed ranges.
Returned into range — the number and percentage of qualified sweeps followed by at least some movement back inside the range.
Full opposite edge — the number and percentage of qualified sweeps that eventually reached the opposite range boundary.
RETURN DEPTH
Average return (>0) — the average maximum return depth among sweeps that produced a positive return. A complete return is capped at 100%.
Minimum return (>0) — the smallest positive return recorded in the sample.
0–25%, 25–50%, 50–75%, 75–90%, and 90–99% — the distribution of incomplete returns that did not reach the opposite boundary.
These rows show how far price most often returned. They are useful because waiting for the opposite boundary in every case may not be realistic.
RISK & TIME
Average adverse excursion — the average maximum distance that price continued moving away from the range after the qualified sweep. It is expressed as a percentage of that range’s width.
Maximum adverse excursion — the largest such movement recorded in the available sample.
For example, a maximum adverse excursion of 600% means that, in the most extreme historical case, price continued approximately six range widths farther away before the observation ended.
Average time to 20% — the average number of minutes from the sweep until price completed a 20% return.
Average time to 50% — the average number of minutes from the sweep until price reached the range midpoint.
Average time to full — the average number of minutes from the sweep until price reached the opposite boundary.
These values help estimate how long the historical return process usually took rather than assuming that it should happen immediately.
BREAK-EVEN SIMULATION
BE armed / stopped / later full is a statistical simulation only.
It shows: → how many events reached the selected return depth and activated the hypothetical protection level → how many subsequently returned to that simulated protection level → how many of those stopped cases later reached the opposite boundary anyway
The simulation does not move a real stop, alter the signals, or manage a trade.
EXAMPLE OF READING THE TABLE
The table shown in this example contains:
→ Completed ranges: 18
→ Qualified sweeps: 18 | 100%
→ Returned into range: 16 | 88.89%
→ Full opposite edge: 5 | 27.78%
Completed ranges: 18
The indicator completed 18 statistical observations on the available chart history.
An observation is considered complete when either:
→ price reaches the opposite boundary of the range
→ the Statistics look-forward window expires
This number does not represent 18 trades. It represents 18 completed range observations.
Qualified sweeps: 18 | 100%
A qualified sweep was found in all 18 completed observations.
The 100% is calculated as:
→ 18 qualified sweeps ÷ 18 completed ranges
For the statistics, only the first qualified sweep found within each range observation is evaluated.
Returned into range: 16 | 88.89%
After 16 of the 18 qualified sweeps, price made at least some positive movement back inside the range.
The percentage is calculated as:
→ 16 returns ÷ 18 qualified sweeps = 88.89%
This does not mean that all 16 events reached the midpoint or the opposite boundary. It means only that price moved back inside the range by more than 0%.
Full opposite edge: 5 | 27.78%
In 5 of the 18 qualified sweep events, price moved through the entire range and reached its opposite boundary.
The percentage is calculated as:
→ 5 full returns ÷ 18 qualified sweeps = 27.78%
This is an important distinction. In this sample, price returned inside the range in 88.89% of the events, but it completed the full journey to the opposite boundary in only 27.78%.
The table therefore helps avoid the assumption that every successful return should be held all the way to the other side of the range.
RETURN DEPTH
The same example shows:
→ Average return (>0): 66.2%
→ Minimum return (>0): 3.33%
Average return (>0): 66.2%
Among the 16 events that produced a positive return, the average maximum return depth was 66.2% of the corresponding range width.
The calculation includes partial returns and full returns. A return that reaches the opposite boundary is capped at 100%.
This does not mean that every event returned 66.2%. It means that 66.2% was the average maximum depth across the positive-return sample.
Minimum return (>0): 3.33%
The smallest positive return in the sample was only 3.33% of the range width.
Events with no positive return are not included in this minimum calculation. This row shows the weakest recorded return that was still greater than zero.
INCOMPLETE RETURN DISTRIBUTION
The example contains:
→ 0–25%: 4 | 30.77%
→ 25–50%: 2 | 15.38%
→ 50–75%: 5 | 38.46%
→ 75–90%: 2 | 15.38%
→ 90–99%: 0 | 0%
Five events reached the full opposite boundary and are therefore excluded from these incomplete-return groups.
That leaves:
→ 18 qualified sweeps − 5 full returns = 13 incomplete returns
The percentages in this section are calculated from these 13 incomplete events, not from all 18 qualified sweeps.
0–25%: 4 | 30.77%
Four of the 13 incomplete observations returned by less than 25% of the range width.
This group also includes events with a 0% return. Therefore, not every event in the 0–25% group necessarily moved back inside the range.
25–50%: 2 | 15.38%
Two incomplete observations returned through at least 25% of the range but did not reach its midpoint.
50–75%: 5 | 38.46%
Five incomplete observations reached the midpoint and continued beyond it, but did not reach 75% of the range.
This was the largest incomplete-return group in the example.
75–90%: 2 | 15.38%
Two observations returned through at least 75% of the range but stopped before reaching 90%.
90–99%: 0 | 0%
None of the incomplete observations stopped between 90% and 99%.
Events that reached 100% are counted separately under Full opposite edge.
ADVERSE EXCURSION
The example shows:
→ Average adverse excursion: 189.34%
→ Maximum adverse excursion: 665.07%
Adverse excursion measures how far price continued moving away from the swept boundary after the qualified sweep.
It is also normalized according to the width of the corresponding range.
Average adverse excursion: 189.34%
On average, price traveled approximately 1.89 range widths farther away from the swept boundary during the observed events.
This number shows why a liquidity sweep should not automatically be treated as an immediate reversal or as an entry without confirmation.
Maximum adverse excursion: 665.07%
In the most extreme observation, price continued approximately 6.65 range widths beyond the swept boundary.
This does not mean that every setup requires such a large stop. It shows the largest historical extension found in the available sample and demonstrates that price can continue significantly farther after a sweep.
TIME STATISTICS
The example shows:
→ Average time to 20%: 14.86 min
→ Average time to 50%: 23.75 min
→ Average time to full: 30 min
These values are measured from the qualified sweep.
Average time to 20%: 14.86 min
Among the observations that reached a 20% return, the average time required was 14.86 minutes.
Events that never reached 20% are not included in this average.
Average time to 50%: 23.75 min
Among the observations that reached the range midpoint, the average time required was 23.75 minutes.
Events that never reached 50% are not included.
Average time to full: 30 min
Among the five observations that reached the opposite boundary, the average time required to complete the full return was 30 minutes.
This does not mean that a full return should always occur within 30 minutes. It describes only the average of the completed full-return cases in this sample.
BREAK-EVEN SIMULATION
The example shows:
→ BE armed / stopped / later full: 14 / 10 / 4
With the default 20% activation setting, this means:
→ 14 events reached at least a 20% return and activated the hypothetical protection level
→ 10 of those events subsequently returned to the simulated protection level
→ 4 of those 10 events later reached the opposite boundary anyway
This row helps examine whether protecting a position after the first part of the return might remove exposure from some events that would later continue to the full target.
It is a statistical simulation only. It does not place a stop, move a stop, change the signals, or manage a real position.
WHAT THE TABLE TELLS ME
In this particular sample, the table shows that a return inside the range occurred much more frequently than a complete move to the opposite boundary.
It also shows:
→ how deep the average return was
→ how shallow the weakest positive return was
→ where incomplete returns most often stopped
→ how long different stages of the return usually took
→ how far price sometimes continued away from the range before returning or before the observation ended
The purpose of the table is not to prove that the setup will work in the future. It provides a structured statistical view of the price behavior visible on the current chart, symbol, data feed, and settings.
HOW I USE IT
I use the indicator on a NASDAQ M1 chart and first wait for the pre-market range to be completed.
After 09:00 New York time, I watch for a qualified sweep of one of the boundaries. The sweep itself is not my entry.
I then wait for either: → a confirmed return inside the range through Range Reclaim → a confirmed pivot break after a deeper movement outside the range
The arrow shows that one of these confirmation conditions has been completed. Entry marks the confirmation level and the potential trade-entry level. TP1 · Partial close marks the first structural area where a partial exit or closer observation of the price reaction may be considered.
The default settings and presets are built for the NASDAQ sweep-and-reclaim strategy around the New York pre-market open. The same logic can also be used on other instruments, including FX pairs and gold. On gold, you can keep the same New York pre-market range; the market will simply produce its own statistics. On EURUSD, for example, you can build a London session window by adjusting Range start hour / minute and Range length (still entered in New York time).
Use the statistics table to judge how clean the setup looks on that symbol and those settings, and build the variation that fits you: → try different instruments and currency pairs → try different chart timeframes → choose your own pre-market hour and range length → decide from the table whether the setup is worth trading there
MAIN SETTINGS
Range start hour / minute — sets the beginning of the range in New York time.
Range length — sets the duration of the range.
Start watching after range end — sets the delay before sweep monitoring begins. The default value of one minute starts monitoring at 09:01.
Statistics look-forward window — sets how long each sweep is observed for the statistics table.
Signal window mode — limits signal generation to a fixed period or allows it to continue until the next range.
Signal window — sets the duration of the fixed signal-search period.
Maximum signals per range — limits the number of confirmed signals for one range.
Minimum reclaim body inside range — sets how much of the closed acceptance candle’s body must be inside the range.
Require nearest confirmed pivot sweep — requires the outside candle to take the nearest confirmed pivot.
Pivot strength — controls the size and confirmation delay of local pivots.
Level extension — extends the range levels for a fixed period or until the next range.
Trade markup length — controls the length of the Entry and TP1 lines.
ORIGINALITY
Pre-market ranges, liquidity sweeps, and confirmed pivots are established market concepts. The originality of this implementation lies in how these elements are combined and managed as one complete process.
The script: → requires the entire M1 candle to move outside the range → can require the nearest confirmed pivot to be swept → separates the liquidity event from the entry confirmation → provides two distinct confirmation models: Range Reclaim and Pivot Entry → activates Pivot Entry only after a one-range-width excursion → prevents the same candle or pivot from producing repeated signals → requires a new external extreme before another same-direction signal can occur → terminates the cycle after price reaches the opposite boundary → includes a normalized statistics table designed specifically to evaluate this range-sweep setup
The table is not intended to present a strategy win rate. It provides a statistical view of the underlying idea: how often qualified sweeps occurred, how often price returned inside the range, how frequently it reached the opposite boundary, the average and minimum return depth, the time required for different stages of the return, and the adverse distance price sometimes traveled before returning or before the observation ended.
This helps users evaluate the historical behavior of the setup instead of assuming that every sweep must produce a complete return or that every return should take the same amount of time.
The indicator is published free and open-source so that users can inspect the calculations and verify how the signals and statistics are produced.
LIMITATIONS
Results can differ between NASDAQ symbols, exchanges, and data feeds because the calculations depend on M1 OHLC data.
Confirmed pivots require bars on their right side and therefore become available only after a structural confirmation delay.
M5 and M15 display cloned M1 events, not independently calculated higher-timeframe signals.
The statistics describe only the available historical sample under the current settings. They are not a strategy report and do not guarantee future results.
The indicator does not account for commissions, slippage, position size, or individual stop-loss placement. Entry, TP1, and the break-even simulation are analytical references, not automated trade-management instructions. Indicador

Indicador

Inside Bar [scriptedge]Overview
Inside Bar looks for a higher timeframe candle that trades entirely within the range of the one before it. Throughout this description the larger candle is called the mother candle , the contained one is the inside bar , and the one that follows is the trading candle .
The indicator is designed so that the whole setup can be visualised from the lower timeframe you intend to trade. The higher timeframe is read in the background and its structure is drawn onto your chart, so there is no need to switch timeframes to see where the range sits or how the trading candle is developing.
The tool draws structure and context. It does not generate buy or sell signals, and it does not manage entries, exits, stops, or position size. Those decisions are left to the trader.
The Higher Timeframe Pattern
An inside bar is a two candle pattern. The second candle's high is at or below the first candle's high, and its low is at or above the first candle's low — the whole candle sits within the range of the one before it. That is compression. Range has contracted, and unlike most patterns it carries no direction of its own. Both boundaries of the mother candle are live, and the market decides which one matters.
What Gets Drawn
Once the inside bar closes, the mother candle's high and low are drawn as solid lines. These are the levels a break has to clear, and they are what almost every published treatment of this pattern uses for entries and stops.
A shaded box spans the compression itself: from the mother candle through every inside bar, ending where the trading candle opens. The box shows the coil, the lines carry the levels forward through the trading candle.
Two target lines are projected at one times the mother candle's range, one above the high and one below the low. This is the measured move, the conventional objective for a range break. They are drawn from the trading candle's open, since that is when a target first becomes relevant. Every line stops when price trades through it, or when the trading candle ends, whichever comes first.
Nested Inside Bars
Inside bars often arrive in runs. When the trading candle turns out to be another inside bar — still entirely within the mother's range — the coil has not resolved, so nothing is reset. The mother candle's levels stay exactly where they are, the box extends, and the next candle takes over as the trading candle. A label on the box counts the inside bars whenever there is more than one, so a deep coil is visible at a glance.
Higher Timeframe Panel
The mother candle, every inside bar and the trading candle are redrawn to the right of the live chart, with the mother's levels marked across them. The trading candle updates live. On a long coil the mother candle is often well off the left of your screen. The panel is what lets you see the whole pattern without scrolling or switching timeframes.
Stats Dashboard
The table counts how past breaks on the selected higher timeframe resolved. A break is recorded the moment price trades outside the mother candle's range during the trading candle.
Breakout — after breaking, price reached the target before reaching the opposite boundary.
Failed breakout — after breaking, price reached the opposite boundary first.
Those two levels sit exactly one mother range either side of the break, so this is a symmetrical test rather than an arbitrary pairing.
A trading candle can break both boundaries, in which case both breaks are counted separately with their own outcomes. Breaks that have not yet resolved are excluded until they do, and setups still coiling are not counted at all, so the two percentages always sum to one hundred.
There is deliberately no win rate here. A failed breakout is a losing outcome to one trader and the entire premise to another, and it is not the indicator's place to decide which.
Please read this table for what it is. It is a count of what price did on the bars loaded in your chart. It is not a backtest and not a strategy report. No entry price, exit price, stop, commission, or slippage is assumed, because the indicator does not place trades. Past behaviour of a market does not indicate future behaviour.
Settings
Chart Theme — light or dark colour palette.
Stats Dashboard — show or hide the table.
Higher Timeframe — 15m, 1h, 4h, D, W or M.
HTF Candle Separators — vertical line at each higher timeframe open.
Show Target Lines — the measured move projections.
Alerts
An alert fires the first time price trades outside the mother candle's range in each direction, with a message naming the timeframe and the side, for example 1h inside bar broken up . A trading candle that breaks both boundaries produces two alerts. To use them, create an alert on the indicator and choose Any alert() function call as the condition.
Repainting
Historical bars are never restated. Specifically:
Higher timeframe candles are built by aggregating completed chart bars, so the pattern is only known once the inside bar has closed. request.security() with lookahead is not used anywhere in the script.
Levels come from candles that have already closed. Nothing is drawn at a price that could still change.
A break occurs once price trades through a level, which cannot be undone within a bar — once price has traded outside the range it has traded outside the range.
The box and the lines extend to the right as the trading candle progresses. That is a drawing being lengthened, not a value being changed.
Limitations
The mother candle defines the levels . Some traders use the inside bar's own high and low instead, for a tighter trigger and smaller risk. This tool does not draw those.
A break is any trade outside the range, wick or close . A candle that pokes through and closes back inside counts as a break. If you think of a break as requiring a close, the counts here will run higher than you expect.
On the higher timeframe itself , target lines, the inside bar count and the stats table are not shown. There the trading candle is a single bar, which cannot say whether a break or its outcome came first. The pattern, its levels and the box are still drawn.
Above the higher timeframe , nothing is drawn. Select a chart timeframe lower than the higher timeframe setting.
The panel is capped at twelve candles . A coil deeper than that still tracks correctly, but the panel shows the mother candle and the most recent inside bars rather than all of them.
Drawing objects are capped by the platform . On very long histories the oldest drawings will drop off the chart.
The stats table depends on how much history your plan loads , so the counts will differ between account types on the same instrument.
This is an indicator, not a strategy . It offers no entries, exits, stop levels, position sizing, or risk management, and makes no claim about profitability.
Disclaimer
This script is for informational and educational purposes only. It is not financial advice and not a recommendation to buy or sell anything. Trading involves substantial risk of loss. Test any tool thoroughly and make your own decisions. Indicador

Volume Profile Fixed/Range [1CG]Fixed Range Volume Profile (Open Source)
This open-source indicator serves a dual purpose: it is a highly customizable, high-performance volume profile tool for traders, and it acts as the official implementation guide for developers looking to integrate the Volume Profile Library into their own indicators and strategies.
Leveraging intrabar arrays for volume accuracy, this tool provides precise Point of Control (POC) and Value Area calculations alongside box and polyline visuals.
Why This Indicator Is Necessary
The volume profile in Pine Script is not accessible programmatically. By reviewing the source code of this indicator, developers can see exactly how to integrate the library engine into their own projets:
Setup the `VolumeProfileLibrary` engine state using `var`.
Fetch 1-minute intrabar data efficiently using `request.security_lower_tf()`.
Safely pass data into the engine for accurate volume distribution.
Extract the calculated POC and Value Area levels for external logic.
Traditional vs. Polyline Rendering
This indicator breaks away from the limitations of standard histograms by offering multiple rendering modes:
Traditional (Boxes) : The classic stacked volume row display, with options to split each row into estimated buy/sell volumes and dim areas outside the Value Area.
Modern (Polylines) : Render the profile as Polylines or Curved Polylines. This modern aesthetic connects row endpoints with sleek lines and fills the internal regions with stunning spatial color gradients.
Use As An External Input Source
You do not need to fork this code to use its data! This indicator plots the most recent POC, Value Area High, and Value Area Low invisibly to the chart.
Because these plots are exposed to the Data Window, you can use this script as a direct "Source" input for other indicators and strategies in your workflow. This allows you to trigger alerts or build strategies based on exact Volume Profile levels without writing a single line of code.
Additional Features
Flexible Range Anchoring : Select between absolute ranges ('From Time', 'Between Times') or recurring windows ('Daily Anchor', 'Daily Session') that automatically reset every day.
Intrabar Accuracy : Dives into 1-minute intrabar data to distribute volume accurately within the chart's bars.
Session History : Keep historical sessions alive on the chart, allowing you to instantly visually backtest how the volume profile evolved day over day.
How to Use
Add the indicator to your chart.
Open the settings menu and configure your preferred Timezone . All fixed time pickers and session windows respect this timezone automatically.
Select your Range Mode (e.g. 'Daily Session' for the RTH open).
Customize your resolution (`Rows`), rendering styles, and gradients.
Indicador
