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. 指標

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. 指標

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. 指標

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. 指標

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. 指標

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.
指標

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. 指標

指標

Custom Key LevelsCustom Key Levels
Simple tool for plotting your own price levels — support/resistance, liquidity zones, order blocks, whatever you're tracking. Set up to 10 levels, name them yourself, get alerted when price hits them. No auto-detection, no fancy calculations — just your levels, on your chart, the way you want them to look.
What it does
10 level slots, each with its own on/off switch, name, price, and color
Pick short tags near the current price or full lines across the whole chart
Solid/dashed/dotted, adjust width and label size
Turn labels off if you just want clean lines with no text
Crossing alerts built in — get pinged when price crosses a level, and the alert message tells you which one
指標

CRT TCTCRT TCT — Market Structure & Liquidity Toolkit
CRT TCT is a complete price action and market structure indicator designed to help traders identify key liquidity areas, structural shifts, session ranges, and potential liquidity sweeps directly on the chart.
The indicator combines multiple concepts into one clean and customizable trading toolkit, allowing traders to analyze market structure and liquidity without overcrowding their charts.
Key Features
• BOS & CHoCH Detection
Automatically identifies Break of Structure (BOS) and Change of Character (CHoCH) to help visualize bullish and bearish market structure.
• Liquidity Levels
Automatically detects and tracks relevant swing highs and swing lows as potential liquidity areas. Levels remain visible until price trades through them.
• Liquidity Sweeps
Identifies potential bullish and bearish liquidity sweeps where price takes a previous high or low and rejects the level.
• Multi-Timeframe Key Levels
Displays important previous highs and lows from:
H4
Daily
8:00 AM New York H1
9:00 AM New York H1
• Trading Sessions / Kill Zones
Visualizes the main institutional trading sessions:
Asian Session
London Session
New York Session
Session highs and lows can also be extended forward as potential liquidity targets until they are reached.
• Custom Market Structure Timeframe
BOS and CHoCH analysis can use the current chart timeframe or a fixed timeframe such as 5m, 15m, 30m, 1H, 4H, or Daily.
• Market Structure Dashboard
A compact dashboard provides a quick overview of:
Current structural bias
Selected structure timeframe
Active liquidity above price
Active liquidity below price
• Fully Customizable
Traders can independently enable or disable market structure, liquidity, sweeps, higher-timeframe levels, sessions, and other visual elements.
How It Can Be Used
CRT TCT is designed as a confluence and market-reading tool rather than a standalone buy/sell signal system.
It can help traders identify:
Where liquidity may be resting
When liquidity has been swept
Changes in market structure
Continuation through BOS
Important higher-timeframe levels
Session highs and lows
Potential areas of interest during key trading sessions
The indicator can be used across different markets and timeframes depending on the trader's methodology.
Important: This indicator is intended for educational and analytical purposes only. It does not provide financial advice or guarantee profitable trades. Always use proper risk management and combine the information provided by the indicator with your own trading plan and analysis. 指標

Dynamic Range Tool [vault]Dynamic Range Tool is a complete session range framework. Instead of stacking five separate tools every morning you get one: the session range with its quarters and projections, average range targets from the daily, weekly and monthly timeframes, daily and weekly opens, center mass of the previous daily and weekly candle, and automatic order blocks. One script, one chart, alerts on every level.
THE SESSION RANGE
The engine is a time window defined in EST. The default is 19:00 to 02:45, which is the asian session plus the london open lead in. The script tracks the highest high and lowest low inside that window and builds three lines from it: range high, range low, range mid. Those lines are then extended to whatever hour you set in "Extend To Hour", 19:00 the next evening by default, so the levels sit in front of you for the entire trading day.
On top of that you get the range quarters at 25% and 75%, drawn dashed in the theme accent color. Those are the levels price tends to react to on the way back into the middle.
Two vertical markers show the range gate and the moment the window closes, so you never lose track of where the measurement ends.
RANGE PROJECTIONS
Turn on "Show Range Projection" and you get the range mirrored above and below the midpoint at 1x, 1.5x, 2x and 2.5x. Classic range expansion logic. If the asian session printed 40 points you already know where 1x and 2x sit before london even starts. Upper levels use the theme top color, lower levels the bottom color.
ADR / AWR / AMR TARGETS
This is the part that does the heavy lifting. The script computes an average candle range (14 periods by default) separately on the daily, weekly, monthly and a custom intraday timeframe (60 or 240 minutes), then projects:
- Daily projected high = day low + ADR
- Daily projected low = day high - ADR
- The same for the week and the month, with progressively thicker lines
- The same for your custom timeframe
- Top hash and bottom hash, the range midpoint plus and minus half an ADR
- A second pair at the midpoint plus and minus a full ADR
Every level is labelled on the right and fires its own alert. Once the day has already delivered its average range the projected high and low cross over each other, and the script deletes both lines and their labels automatically so you are not left staring at levels that no longer mean anything.
Underneath, semi transparent zones are shaded between the range midpoint and the ADR projection. They show how much room is left before the average day is fully used up.
OPENS AND CENTER MASS
- Daily open and weekly open, colored dynamically: bottom color when price trades above the open, top color when below. One glance tells you which side of the open you are on.
- Center mass daily and weekly, the midpoint of the previous daily and weekly candle body. Thick neutral line, one of the better mean reversion magnets on intraday charts.
ORDER BLOCKS
A separate module. The script measures momentum as the percentage change of open against the open four bars back. When that change crosses the sensitivity threshold (25 by default, meaning 0.25%) it walks back 4 to 15 bars, finds the last candle opposite to the impulse, and turns it into a block. Mitigation is your choice of wick or close. Blocks are removed automatically once mitigated, and price entering an active block triggers an alert.
A minimum spacing of 5 bars between signals keeps the chart clean in chop.
STATS PANEL
Top right corner: last session range, ADR, AWR and the custom range value. Displayed in pips or in ticks depending on the toggle.
THEMES
The build ships with a full theme engine:
- Vault Red (default) - red upside, blue downside, white structure
- Vault Classic - the original orange and blue palette
- Ice - cold blues
- Neon - magenta and green
- Gold - gold and purple
- Mono - white and greys for dark charts
- Custom - unlocks every manual color picker
Switching a theme repaints the range lines, targets, zones, labels, order blocks and panel text in one move. The range center line is white now instead of black, so it is finally visible on a dark chart.
ALERTS
Weekly, monthly, daily and custom projected high and low, top hash, bottom hash, price inside bullish block, price inside bearish block. All fire once per bar.
HOW TO USE IT
1. Intraday chart. Minute based timeframes are read directly from the chart resolution.
2. Set the session window in EST for your market. For index futures leave it at 19:00 to 02:45.
3. Start the day with three questions: which side of the range am i on, which side of the daily open am i on, how much of the average range is still unused.
4. Treat the upper and lower ADR targets as places to take risk off, not places to enter.
5. The range mid and the center mass lines are return levels, not continuation levels.
TECHNICAL NOTES
Higher timeframe data (daily, weekly, monthly, custom) is requested with lookahead enabled. That keeps the levels anchored on historical bars, but it also means this script is not suitable for bar by bar backtesting or for driving an automated strategy. It is a context drawing tool, not a simulation.
All drawing is anchored to bar time rather than bar index, so levels stay locked to the clock.
The "ADR Days" input is a leftover from the original and does not affect any calculation. The averaging length lives in "ADR period".
Nothing here is financial advice. The tool draws context, the decisions are yours.
Based on Dynamic Range Tool V1 by Black Box Trading. 指標

Market Profile TPO [vault]TPO is a market profile tool that shows where the market actually spent its time, not just where price printed a candle. It builds a time price opportunity profile for every day, week or month and marks the levels that keep mattering after the period closes.
How it works
The script splits each period's range into a configurable number of rows and counts how many bars traded inside every row. That count is the TPO score. The widest row is the Point of Control, the fairest price of the period and the level price keeps rotating back to. Around it the script expands the Value Area using the standard two row algorithm until it holds a chosen percentage of total TPO count, giving you the accepted range and its two edges.
Everything is calculated in a single pass over the period's bars instead of scanning every row separately, so the developing profile updates in real time without dragging the chart down, even on 100 rows and low timeframes.
Green area below, red above, no. This is not a signal tool. Value area high and low are the edges of accepted price, and trades that open outside value and reject back inside tend to rotate to the opposite edge. The POC is a magnet. Untouched POCs from previous periods are stronger magnets.
What it draws
- Full TPO profile per period, D, W or M, with adjustable row size and profile width
- Point of Control line, ties resolved toward the middle of the range so the POC never sticks to an extreme
- Value Area high and low with optional shaded background
- Initial Balance, the range of the first balance window of the session, with optional extension across the whole period
- Single prints, the thin one row areas left by one sided moves, top and bottom tails excluded by design
- Naked POC, previous POCs price never traded back into, extended right until they get hit and then removed automatically
Reading it
Value area edges are where acceptance starts and ends. Initial Balance tells you the shape of the day early: price holding inside IB all session is a rotation day, a break of IB high or low with follow through is the classic trend day tell. Single prints mark unfinished auction, the market moved too fast to trade there and usually comes back. A naked POC sitting above or below current price is an obvious target for the next rotation.
Additional settings
- Profile period: D for day trading, W or M for swing context
- Row size: higher for precision, lower for speed on long periods
- Value Area %: 70 is standard, some traders use 68 or 80
- IB session and timezone: defaults to 0930 to 1030 New York, the RTH open hour for US index futures. Set it to your own instrument's open
- Profiles kept on chart: old profiles are deleted as a whole group, so the script never hits TradingView drawing limits and never leaves half a profile behind
- Min rows per single print: filters out one row noise, 2 or 3 keeps only meaningful gaps
- Show developing profile: toggle the live, still forming profile
- Level labels with prices for POC, VAH and VAL
- Full color, width and line style control for every element
- Built-in alerts for prior POC, VAH and VAL crosses and for IB high and low breaks
- Works on any instrument, requires a chart timeframe lower than the profile period
指標

KERNEL BANDS [vault]KERNEL BANDS
A non-parametric kernel regression centreline wrapped in adaptive residual sigma bands, with a full trade management layer on top: filtered entries, an exit engine that reports results in pips, a reversal radar, a dead-zone shield, session and momentum context, and a multi-timeframe screener. Everything is confirmed on bar close and nothing repaints.
A moving average assumes price came from a fixed-form equation (linear in lag, weighted in lag, and so on). Kernel regression makes no such assumption. It lets the local density of the data decide where the centreline sits, which gives a smoother and more honest picture of where price actually is, without the corner cutting EMAs and HMAs do around pivots. The bands around it are not arbitrary ATR multiples but a statistical measure of how far price normally strays from the kernel before reverting.
1. The kernel
Every moving average is a kernel, just a rectangular one (or, for HMA, a chained weighted one). Kernel regression generalises the idea: you pick the shape of the weight curve based on how much you want each historical bar to matter. Three kernels ship:
- Gaussian: the textbook bell curve, K(u) = exp(-u² / 2h²). Heavy tails, smooth everywhere. The most stable default.
- Epanechnikov: compact-support parabola, K(u) = max(0, 1 - u²/h²). Mathematically optimal in the mean-squared-error sense, lightest tails, slightly more responsive at the leading edge.
- Tricube: LOWESS-style, K(u) = max(0, (1 - |u/h|³)³). Very smooth shoulders, great on noisy intraday data where you want a confident centreline rather than a chasing one.
All three feed the same Nadaraya-Watson estimator, ŷ = Σ K(i) · close / Σ K(i), computed one-sided over the lookback window so it never looks into the future. The kernel choice sets the personality of the line, the bandwidth h sets its memory.
2. Adaptive bandwidth (ATR-scaled)
A static bandwidth breaks in changing regimes. When realised volatility expands a fixed h lags badly, when it contracts the same h starts amplifying noise. Here h is scaled live by normalised ATR:
h_eff = h_base × (1 + ATR / close × factor)
so the kernel widens when the market is loud and tightens when it is quiet, and the line behaves the same across gold, indices, crypto and FX without per-symbol tuning.
A Bandwidth Regime Shift alert fires when h moves by more than a user-set fraction in a single bar. It is your early warning that the volatility surface just changed: it typically fires before either directional signal and tells you whatever play you had on a minute ago may need to be re-evaluated. The dashboard shows the % jump that triggered it.
3. Residual sigma bands
The bands are the rolling standard deviation of the residual (close - kernel MA), EMA-smoothed, then scaled by the sigma multiplier. This answers a real question: how much do we usually deviate from the kernel before reverting? When the answer is small, the bands hug the line and a breakout is statistically meaningful. When it is large, band breaks are normal and should be downweighted.
Band Floor is an addition to the original concept. The half-width can never be thinner than a chosen fraction of ATR (0.6 by default). Without it, volatility compressions produced razor-thin bands and hair-trigger state flips on every wick. With it, a quiet market still needs a real move to change state.
4. State engine
A confirmed close above the upper band latches the state to Bullish, a confirmed close below the lower band latches it to Bearish. State only flips on the opposite band, there is no neutral repainting in between. Confirmation Closes sets how many consecutive closes beyond the band are required (default 2), which is the single biggest difference between a clean chart and a noisy one.
The band colour, the fill, the dashboard Signal row and the MTF screener all read from this one state.
5. Signal engine (what changed versus a plain band cross)
A state flip is not an entry any more. A flip arms the signal, and the entry prints only once every condition lines up within the entry wait window (default 6 bars). If the state reverts before that happens, the armed signal is dropped silently and nothing is printed. The dashboard shows the armed side in gold so you always know a setup is pending.
Conditions an entry must pass:
- Kernel slope must agree: buy only while the kernel is rising, sell only while it is falling. This kills counter-trend spikes, the classic "one violent wick through the lower band in an uptrend" trap.
- Entry candle must agree: a buy needs a green close, a sell needs a red close.
- Max extension beyond band: if the flip candle closed too far past the band (default 1.5× the band half-width) the engine waits for a calmer candle instead of chasing the blow-off.
- Skip blow-off candles: no entry on a bar (or the bar before it) whose range exceeds a multiple of ATR.
- Min bars between entries: a cooldown so two entries cannot stack on top of each other.
- Dead-zone shield: no entries while the market is flagged as chop (section 7).
- Session filter (optional, off by default): restrict entries to London / New York windows if you want it.
Re-entries: after an exit, if the state is unchanged and price crosses back through the kernel MA in the direction of momentum, a fresh entry arms. Trends are ridden in segments, each one banked.
Entry labels carry the side and the exact close price so you can enter at the same level.
6. Exit engine
Every entry is closed by the indicator with an Exit label in the colour of the side it closes (cyan closes a long, magenta closes a short). The label shows the exit price and the result in pips. Pip size is auto-detected (mintick × 10, so 0.1 on gold) and can be overridden.
An exit fires on whichever comes first:
- Flip: the state confirms the opposite way.
- Reversal: a reversal candle prints at a band extension while the trade is in profit.
- Giveback: after the trade has reached a minimum peak, it has given back a set percentage of that peak (default 50%).
- Structure: close breaks the lowest low (long) or highest high (short) of the last N bars while in profit.
The dashboard shows live Position, Open P&L and peak P&L, and the exit alert reports entry, exit, result, peak, trigger and bars held. Your journal writes itself.
7. Dead-zone shield
Flat, low-volume chop is where band systems buy the top and sell the bottom of the range. The shield scores four conditions every bar: flat kernel slope, clustered state flips (weighted double, because a burst of flips is the strongest chop tell there is), tight range and weak volume. Above the trigger score the chart is tinted, entries are suppressed and the dashboard reads DEAD ZONE with the bar count. The first genuine breakout escaping the zone still arms an entry.
Two alerts, deliberately not session-filtered: Dead Zone Entered (with the score and which conditions tripped it) and Dead Zone Cleared (with how long it lasted). The second one is the one to set: it tells you when to be back at the screen.
8. Reversal radar
Reversal candles (doji, pin bar, engulfing) that print at a band extension are marked with a ⚠ Rev label: red at the upper band, cyan at the lower. The dashboard tracks the most recent one as TOP FORMING / BOTTOM FORMING with its age. Kernel momentum is read live as Rising, Rising & Fading, Falling or Falling & Fading, with directional alerts when it turns. Together they are your early tell that a move is exhausting, and the Reversal exit uses the same signal.
9. Divergence engine
A pure slope-comparison divergence runs in parallel: the kernel slope over a window against the price slope over the same window. Bullish divergence is registered when price is falling while the kernel turns up, bearish is the mirror. Both slopes have separate minimum thresholds (as a fraction of ATR × window) so flat regions never trigger noise divergences, and a cooldown spaces them out. Labels print ▲ Div / ▼ Div at the wick they fire from, and the dashboard shows the active divergence with its bar age.
10. MTF screener
A compact board that shows the kernel state on 5m / 15m / 1h / 4h. The top row is pinned to whatever symbol your chart is on and follows you when you switch, so your active trade is always on the board. Up to five more symbols can be added in settings. Each cell is an arrow in the state colour, brighter when the flip is fresh (within a user-set number of bars) so you can tell at a glance whether a setup is new or already ran. The Σ column counts aligned timeframes and prints A+▲ or A+▼ when all four agree.
The screener requests nothing on your behalf: only symbols you type in are ever requested, so alerts save on every data plan.
11. Three visual modes
The same kernel and sigma feed every mode:
- Bands: classic upper / lower envelope with toggleable fill. Best for mean-reversion and band-touch analysis.
- Single Line: kernel centreline with a gradient fill between the line and price. Best for pure trend-following.
- Trail: only the trailing band is drawn, in the active state colour, with an optional sin-modulated pulse alpha that gives a subtle breathing effect. Best for visual conviction in directional moves.
State candles and bar colouring are independent toggles, and the kernel line can be drawn on top of Bands or Trail if you want it visible everywhere. A full Colors group covers bull, bear, neutral, text, accent and dashboard background / frame.
12. Dashboard
A monospaced table, positionable to any of nine anchors, with a subtle vertical gradient. Rows: Signal, Kernel MA, Upper Band, Lower Band, Band Width σ, Bandwidth h (with adaptive tag), Kernel, Divergence, Regime, Session, Position (including armed setups), Open P&L with peak, Market (Trending / Dead Zone), Momentum and Reversal.
13. Alerts
Seventeen named alert conditions, every one evaluated on bar close: BUY, SELL, EXIT LONG, EXIT SHORT, Bullish Breakout, Bearish Breakdown, Bullish Divergence, Bearish Divergence, Bandwidth Regime Shift, Reversal at Top, Reversal at Bottom, Dead Zone Entered, Dead Zone Cleared, Momentum Shift Bullish, Momentum Shift Bearish, Momentum Shift (any), Kernel State Flip.
On top of that the script sends dynamic messages through alert(): entries carry entry price, TP / SL geometry, live momentum and session, exits carry entry, exit, result in pips, peak, trigger and bars held, dead-zone events carry the score and the reason. Attach a webhook to "Any alert() function call" and a bot reading the payload has the same confluence a human reads on the dashboard.
Each named condition has to be selected individually in the alert dialog. "Any alert() function call" delivers the dynamic messages, not the named conditions. That is a TradingView rule, not a setting in this indicator.
How to use it
Trend-following: Single Line or Trail mode, Tricube kernel, adaptive bandwidth on, Confirmation Closes 2, kernel slope confirmation on. Take entries in the direction of the higher-timeframe rows on the screener and let the exit engine manage the trade.
Mean-reversion: Bands mode, Gaussian or Epanechnikov, fade band touches that coincide with a ⚠ Rev label, a divergence label and a low Band Width σ reading. Use the Regime Shift alert as a heads-up that a reversion play just got riskier.
Scalping 1m-5m: keep Band Floor at 0.6 or above and Confirmation Closes at 2, otherwise the band flips on every wick. If you get too few entries, loosen Entry Candle Must Agree first, then Max Extension to 2.0.
Suggested settings
Defaults are tuned for 5m-1H on liquid futures, gold and crypto: Lookback 30, Base Bandwidth 8, Sigma Multiplier 1.0, Band Floor 0.6, Confirmation Closes 2. For 1m-3m drop Lookback to ~20 and Bandwidth to ~6. For daily and above raise Lookback to 50 and Bandwidth to 12. The kernel and bandwidth jointly control how much the line trusts the recent past, the sigma multiplier and band floor separately control how much movement you are willing to call normal.
Limitations
The kernel is recomputed each bar over the lookback window, so very long lookbacks on very low timeframes can feel heavy. State transitions, entries, exits and reversal labels are all confirmed on bar close, so a band touch that gets reabsorbed within the bar will not fire. This is deliberate and is what prevents intra-bar repainting. The MTF screener reads higher-timeframe values that in real time come from the still-open bar, so a cell can flicker until that bar closes. Divergence is non-repainting but carries the natural lag of comparing slopes over a window.
What was improved over the original concept and why
- Band floor: the original residual sigma alone produced paper-thin bands in compressions and a flip on every wick. A floor tied to ATR fixed that without touching the statistical meaning of the band in normal conditions.
- Confirmation closes: one close beyond the band is a wick, two is a decision.
- Arm-then-fire entries: entries were firing on the flip bar no matter what that bar looked like. Now the flip arms the setup and the entry waits (up to a few bars) for kernel slope, candle colour and extension to agree, and is dropped if the state reverts.
- Kernel slope agreement: the single biggest source of bad trades was a sell printed during a spike down while the kernel was still rising. Requiring slope agreement removes the whole class.
- Blow-off check on two bars: a spike often spans the flip bar and the one before it.
- Dead-zone weighting: a cluster of flips is the strongest chop signal there is, so it counts double and the shield activates on a burst of flips alone instead of needing a second condition.
- Session filter off by default: gold and indices produce clean moves outside London / NY too, and the filter was skipping them. It is still there if you want it.
- Kernel MA plotted in every mode and alertable via the standard Crossing / Greater Than rules, plus a toggle to draw it on top of Bands or Trail.
- Screener requests only what you type in, so alerts save on any data plan.
指標

HTF Candle Projection Dashboard [Quantum Edge]HTF Candle Projection Dashboard projects multiple higher-timeframe candle structures directly onto your active chart.
Instead of switching between timeframes, the indicator displays the latest six candles from five configurable higher timeframes in a clean, forward-projected dashboard:
• 1 Hour
• 4 Hour
• Daily
• Weekly
• Monthly
Each timeframe group contains five historical candles plus the current developing candle. The live candle updates as new price data becomes available, allowing traders to monitor higher-timeframe range, direction, and key OHLC levels while executing from a lower timeframe.
FEATURES
• Displays five independently configurable higher timeframes
• Shows six candles per timeframe: five completed candles and one live candle
• Projects all higher-timeframe candle groups to the right of current price action
• Uses true chart prices—no normalized or synthetic price scale
• Bullish and bearish candle coloring
• Adjustable live and historical candle transparency
• Optional timeframe headers
• Optional Open, High, Low, and Close labels for each live HTF candle
• Adjustable right offset, candle width, candle spacing, and group spacing
• Designed for clean multi-timeframe context on intraday execution charts
HOW TO USE
1. Apply the indicator to a lower-timeframe chart.
2. Choose the higher timeframes you want to track in the settings.
3. Use the projected candle groups to identify higher-timeframe direction, current range position, prior highs/lows, and developing candle behavior.
4. Combine the dashboard with your preferred market-structure, support/resistance, volume, or execution model.
EXAMPLE WORKFLOW
A trader using a 1-minute or 5-minute chart can keep the 1H, 4H, Daily, Weekly, and Monthly candles visible at once. This makes it easier to see whether a lower-timeframe move is occurring near a higher-timeframe high, low, open, or close—without leaving the execution chart.
NOTES
• The rightmost candle in each group is the currently developing higher-timeframe candle, so its high, low, close, color, and OHLC labels can change until that timeframe closes.
• For the clearest results, use the script on a chart timeframe lower than the smallest selected dashboard timeframe.
• This is a visual analysis tool, not a trading strategy and not financial advice.
Created by Quantum Edge. 指標

ICT Equal Highs & Lows (EQH/EQL) Liquidity PoolsICT Equal Highs & Lows (EQH/EQL) Liquidity Pools
What it does
This indicator marks the horizontal shelves that form when two or more confirmed swing highs, or swing lows, come to rest at almost the same price. Those shelves are where resting orders accumulate, and the script answers one question about each of them: is this shelf still untouched, has price wicked through it, or has price closed beyond it? Lines are drawn only where the swing anchors themselves are visible on the chart, so you can always see why a line sits where it sits.
How it works
Every swing point starts an invisible hypothesis: a shelf at that price, with a tolerance band around it. The hypothesis has to survive. If price leaves the band before a second qualifying swing arrives, the hypothesis is dead and a later similar price cannot bring it back. Only a hypothesis that survives long enough to collect the required number of swings becomes a visible pool.
Swing points are confirmed pivots, found from wicks or from candle bodies. A takeout is always measured on the wick, whichever mode you pick: price trading through the shelf is what takes it, however the swings themselves were found.
The tolerance is frozen with the volatility of the swing that started the shelf. A later change in volatility can never pair two old swings after the fact.
When a shelf is confirmed, every bar since its first anchor is replayed against it, oldest first. The first bar that went past its boundary decides both what happened and when, so a shelf that was already taken never appears as untouched.
Once a pool becomes visible, its level and its boundary are fixed. Further swings at the same price raise the counter on the label and nothing else.
The visible line sits on the extreme of the price group that confirmed it - the highest of the equal highs, the lowest of the equal lows, or the outermost body edge if you switched the swing source to Bodies - so it lies on a price that was actually traded and touches the structure it names. The boundary that decides a takeout sits past the outermost wick of that group, plus a buffer - a poke inside the band the shelf was defined with is noise rather than a takeout. That wick is first capped at the edge of the tolerance band, so a single oversized wick on the first swing cannot lift the boundary off the chart. Measuring the boundary from wicks matters under Bodies: a level is a body edge there, and the same bar's wick reaches past it, so a shelf would otherwise be taken by the very bar that confirmed it.
A wick beyond the boundary marks the pool as swept. A close beyond it marks the pool as broken.
How to use it
Add the script to a chart. It works on any symbol and any timeframe and reads only the bars of the chart you are on.
With the default line style, read the solid lines as untouched shelves and the dashed ones as shelves price has already taken. Pick another style and the untouched ones follow it; a shelf that has been taken always draws dashed. Switch on Highlight nearest untapped pools if you also want the closest untouched shelf on each side drawn one step thicker.
Check the anchors. Every line should start at a swing you can point at, and the price of that swing should sit within the tolerance you configured.
If the chart shows more lines than you can read, lower the tolerance or raise the minimum number of equal highs and lows before touching the retention cap.
Inputs
Swing length - bars required on each side of a swing point. Larger values give fewer and more significant shelves. Range 1-50, default 5.
Measure swings from - Wicks uses the high and low, Bodies uses the open and close and ignores single long wicks.
History searched - how long an unconfirmed hypothesis may wait for its second swing, and how far back a newly confirmed shelf is checked. Range 50-500, default 500.
Tolerance unit - ATR multiple, ticks, or percent of price.
Tolerance - how far apart two swings may sit and still count as equal. Default 0.10, which on a volatile index future works out around ten ticks.
ATR length - length of the volatility measure, used by the ATR mode only. Range 1-200, default 14.
Minimum equal highs/lows per pool - swings needed before a shelf becomes visible. Range 2-10, default 2.
Takeout buffer - distance beyond the edge of the shelf that price must exceed before the pool counts as taken, in units of the frozen tolerance. Range 0-3, default 0.25, which is small enough that a stop run of a few ticks registers.
Display group - show or hide each side, keep or drop swept and broken pools, retention cap per side, line width, line transparency, line style, labels and label size. Broken pools are dropped by default, so switch that on if you want all three states on the chart.
Show EQH/EQL text and Show number of equal highs/lows - the label reads EQH 3x with both on, which is the default. Either can be switched off on its own.
Line style - solid, dashed or dotted for the intact shelves. A shelf that has been taken always draws dashed, because that is its state and not a preference.
Label background - off by default, so only the label text shows. Turn it on where a label sits over the candles and the bare text is hard to read.
Highlight nearest untapped pools - draws the nearest untouched shelf on each side one step thicker. Off by default: a line that is thicker for a reason the chart does not explain is harder to read, not easier.
Colors group - one colour each for buyside, sellside, swept and broken pools.
Signals and alerts
Buyside pool formed and Sellside pool formed - fire when a shelf becomes visible and is still untouched.
Buyside pool swept and Sellside pool swept - fire when a wick crosses the boundary and the bar closes back inside.
Buyside pool broken and Sellside pool broken - fire when a bar closes beyond the boundary.
All six fire on the close of the bar that produced the change. A shelf that the replay finds already taken raises no formation alert, because it was never visible as untouched.
Repainting
State changes only on a closed bar. On the live bar no shelf is added, removed or reclassified, so what you see on history is what you would have seen in real time. One thing does follow the live bar, and it rewrites nothing: the right edge of an untouched line. A second follows it only if you switch on Highlight nearest untapped pools - which line is marked as the nearest one ahead of price. Swing points are confirmed pivots and are therefore known a fixed number of bars after they happened; the script does not pretend otherwise, and it replays every bar since the shelf's first anchor, so a shelf cannot appear untouched at a price that was already traded through. Once a pool is visible its level and boundary are never rewritten.
Limitations
The very first swing of a shelf is the one bar never replayed against the shelf itself - it cannot be, or under Bodies a long wick on that bar would invalidate its own shelf before it exists. Under Bodies a small share of shelves therefore start on a bar whose wick already reached past the boundary. The cap on the boundary keeps that bounded; under Wicks it cannot happen at all.
A swing is confirmed only after the configured number of bars have passed, so a shelf always becomes visible later than it formed. That delay is inherent to pivots and cannot be removed without looking ahead.
On very quiet or thinly traded symbols the tolerance can be wide relative to the actual range, which pairs swings a trader would not group together. Lower it or switch to the tick mode.
The script reads only the bars of the chart timeframe. It does not look at higher timeframes, at intrabar data, or at volume.
It describes shelves that exist and what happened to them. It does not rank them, score them, or suggest entries, exits or targets.
Shelves are dropped once the retention cap per side is exceeded. Taken shelves go first; a shelf that still holds is only dropped when no taken one is left, and then the oldest goes. Deep history is not kept on the chart.
A shelf can be taken before its second swing exists. It is then drawn from its first anchor to the takeout and marked as taken, which puts the second swing to the right of where the line ends while the touch count still includes it.
Swing points must stand out from the bars around them. Two highs at the same price no further apart than the swing length cancel each other out, so a tight double top can go unmarked. Lower the swing length if you want those.
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. 指標

Sattam | option-scalpVolatility Projection Zones
Every 52 bars the indicator takes a reading of the market and projects where
price could travel next, based on how volatile the market actually is right now.
WORKS ON EVERY MARKET — AND HOLDS UP ON OPTIONS
There is not a single fixed value anywhere in this script: no pip counts, no
point targets, no price assumptions. Every distance it draws is derived from the
instrument's own volatility, so it behaves the same way on futures, forex,
indices, crypto, stocks — and on options contracts, which is where most
ATR-based tools quietly fall apart.
Options are a hostile case: premiums move in cents, a contract can lose half its
value in three bars, sessions are full of gaps, and plenty of bars print with no
trade at all. A pure ATR projection lags badly through moves like that and draws
targets far too tight. This script handles it by taking the LARGER of two
measures — the ATR projection, or the range of the anchor window itself. On
liquid futures the ATR is always the larger one and the floor never shows; on an
option, when a window holds a collapse, the window wins and the projection stays
honest.
HOW IT WORKS
At each cycle the script looks at the last 3 bars and finds the extreme that
price has moved furthest away from — if price is sitting near the top of that
little range, the low becomes the anchor, and vice versa. From that anchor it
projects a distance equal to 3 x ATR(14), or the range of those 3 bars when that
is wider.
Four lines are drawn per cycle:
- Two thick lines — the anchor and the full projection target
- Two thin lines — the 50% and 61.8% marks in between
Each set extends 49 bars, stopping just before the next cycle begins, and the
last 8 sets stay on the chart.
HOW TO READ IT
The direction of the projection is the cycle's bias. A set projecting upward
means the anchor sits below price as support, with the levels above as upside
reference. The two thin lines are the natural partial targets; the far thick
line is the full measured move.
Because the projection scales with volatility, the levels widen in fast
conditions and tighten in quiet ones automatically.
SETTINGS
Cycle length - bars between projections (default 52)
Anchor window - bars used to pick the anchor (default 3)
ATR length/mult - the projection distance (default 14 / 3.0)
Inner ratios - the two intermediate levels (0.5 / 0.618)
Cycle anchor - where the cycle starts counting: Session, Week, or a
manual phase
Display - colors, widths, line length, sets kept
NOTES
This is a levels framework, not a signal system. It draws on every cycle
regardless of trend or range conditions, and it has no entry filter of its own —
combine it with your own read of structure and context.
Not financial advice. Test on your own instruments and timeframes before relying
on it.
خطوط الهدف حسب حركة السوق
المؤشر كل ٥٢ شمعة يوقف ويقيس لك السوق، وبعدين يمد أربعة خطوط تقول لك
وين ممكن يوصل السعر. والمسافة مو رقم كتبته أنا، هي من حركة السوق نفسه
في ذيك اللحظة — سوق هايج يعطيك خطوط بعيدة، وسوق هادي يعطيك خطوط قريبة.
يشتغل على كل الأسواق — وأقوى شي على الاوبشن
ما فيه في المؤشر ولا رقم ثابت. لا نقاط ولا بيبس ولا أهداف محفوظة. كل
مسافة يرسمها يطلعها من حركة الأداة اللي أنت فيها. عشان كذا نفس الشغل
يمشي على الذهب والفوركس والمؤشرات والعملات الرقمية والأسهم، ويمشي على
عقود الاوبشن كمان — وهذي بالذات وين أغلب المؤشرات تخرب وأنت ما تدري.
ليش الاوبشن صعب؟ لأن سعر العقد يتحرك بالسنتات، وممكن العقد يطيح نص
قيمته في ثلاث شموع بس، والجلسات فيها فجوات كثيرة، وشموع تعدي بدون ولا
صفقة. مقياس ATR لحاله يتأخر على حركة زي كذا، فيرسم لك أهداف قريبة ما
تسوى شي.
الحل اللي فيه: يقارن بين شيئين وياخذ الأكبر — إما مسافة ATR، وإما مدى
الشموع الثلاث اللي طلعت منها نقطة البداية. في الأسواق العادية ATR يطلع
أكبر دايماً وما تحس بهالشي أصلاً؛ وفي الاوبشن لما تصير طيحة قوية، مدى
الشموع يطلع أكبر وياخذه المؤشر — فتطلع الخطوط واقعية مو مضحكة.
كيف يشتغل بالضبط
كل دورة يشوف آخر ٣ شموع، ويشوف السعر حالياً قريب من فوق ولا من تحت:
- السعر قريب من فوق؟ ياخذ القاع نقطة بداية ويمد الخطوط طالعة
- السعر قريب من تحت؟ ياخذ القمة نقطة بداية ويمد الخطوط نازلة
يعني دايماً يبدأ من الطرف الأبعد عن السعر.
ومن نقطة البداية هذي يقيس المسافة (٣ أضعاف ATR أو مدى الشموع الثلاث،
أيهم أكبر) ويرسم:
- خطين سميكين: واحد عند نقطة البداية، وواحد عند الهدف الكامل
- خطين رفيعين بينهم: عند ٥٠٪ و ٦١.٨٪ من المسافة
كل مجموعة خطوط تمشي ٤٩ شمعة وتوقف قبل ما تبدأ المجموعة الجديدة، ويبقى
لك على الشارت آخر ٨ مجموعات.
كيف تقراه
- الخطوط طالعة فوق؟ الدورة ميولها صعود، ونقطة البداية تحت تصير دعم
- الخطوط نازلة تحت؟ الدورة ميولها هبوط، ونقطة البداية فوق تصير مقاومة
- الخطين الرفيعين: أهداف أولى وثانية، مكان طبيعي تجني فيه جزء
- الخط السميك البعيد: الهدف الكامل للحركة
الإعدادات
Cycle length - كل كم شمعة يرسم مجموعة جديدة (الافتراضي ٥٢)
Anchor window - كم شمعة ياخذ منها نقطة البداية (٣)
ATR length/mult - مقياس المسافة (١٤ و ٣ أضعاف)
Inner ratios - الخطين الرفيعين (٠.٥ و ٠.٦١٨)
Cycle anchor - من وين تبدأ الدورة: مع الجلسة، مع الأسبوع، أو يدوي
Display - ألوان وسماكات وطول الخطوط وعدد المجموعات
كلام لازم يتقال
المؤشر يعطيك مستويات، مو إشارات دخول وخروج. يرسم كل دورة سواء السوق
ترند أو عرضي، وما فيه فلتر يقول لك ادخل الحين. استخدمه مع قراءتك أنت
للسوق.
وهذا مو توصية شراء ولا بيع. جربه على أدواتك وفريماتك قبل لا تعتمد عليه بصفقاتك. 指標

指標

Institutional Quant Correlation Grid Suite Slide 1: Title
Institutional Quant Correlation Grid Suite
Pine Script v6 Indicator
Purpose: A professional-grade quantitative analysis tool that evaluates a ticker's relationship to a benchmark (e.g., SPY) across multiple dimensions — correlation, volatility, momentum, and risk-adjusted performance — all presented in an intuitive visual dashboard.
Author: Quant Trading Team
Version: 6.0
Slide 2: Problem Statement & Solution
The Challenge:
Retail traders lack institutional-grade quant tools inside TradingView.
Evaluating a stock's true relationship to the market (or sector ETF) requires looking beyond simple price correlation.
Key metrics (Beta, Alpha, Z-scores, Relative Strength) are scattered across different indicators.
Our Solution:
An all-in-one indicator that computes, visualizes, and alerts on:
Multi-asset correlations (Price, RSI, ATR, Volume, Volume-Weighted)
Risk metrics (Beta, Annualized Alpha)
Mean-reversion signals (Spread Z-Score)
Relative strength momentum (RS Ratio)
Timeframe returns (1D, 1W, 1M)
Automated Buy/Hold/Sell conditions
Slide 3: Core Inputs – Quant Settings
Input Default Description
Lookback Window 30 bars Rolling window for all correlations & statistics. Adjustable 10–500.
Reference Symbol SPY Benchmark ETF. Dropdown includes 40+ sector/thematic ETFs (XLF, SMH, ARKG, GDX, JETS, etc.)
Correlation Metric Close Which data series to screen against the benchmark (Close, Open, High, Low, Volume, RSI, ATR).
Correlation Threshold 0.70 Minimum absolute correlation to be considered "aligned".
Z-Score Extremes Threshold 2.00 Level at which the spread is considered overextended (mean-reversion signal).
Slide 4: Oscillator & Indicator Parameters
The suite uses standard technical indicators for its multi-dimensional analysis:
Indicator Parameter Default
RSI Length 14
MACD Fast / Slow / Signal 12 / 26 / 9
Stochastic Length / Smooth 14 / 3
CCI Length 20
Williams %R Length 14
ATR Length 14
These are used to compute correlations across different market regimes (momentum, volatility, volume) — not just price.
Slide 5: Core Calculations – Correlation Suite
The indicator computes 6 distinct correlation metrics against the reference symbol over the lookback window:
Correlation Methodology
Price Corr Standard Pearson correlation of Close prices.
Selected Metric Corr Correlation of the user-chosen metric (e.g., RSI, Volume) against the benchmark's equivalent.
RSI Corr Correlation of RSI values.
ATR Corr Correlation of Average True Range (volatility alignment).
Volume Corr Correlation of raw volume (detects relative liquidity/interest).
VW-Corr Volume-Weighted correlation — weights daily returns by volume, giving more importance to high-volume days.
Slide 6: Core Calculations – Risk & Performance
Beta & Alpha (Annualized)
Beta = Covariance(asset, benchmark) / Variance(benchmark)
Alpha = (Mean_Asset_Return - Beta × Mean_Benchmark_Return) × 100 × 252
Interpretation: Beta > 1 = higher volatility than benchmark; Alpha > 0 = outperformance.
Relative Strength (RS) Momentum
RS Ratio = Close_Asset / Close_Benchmark
RS Momentum = (RS_Ratio / SMA(RS_Ratio, length) - 1) × 100
Positive = asset is strengthening relative to benchmark.
Spread Z-Score (Mean-Reversion)
Log Spread = ln(Close_Asset / Close_Benchmark)
Z = (Log_Spread - Mean(Log_Spread)) / StdDev(Log_Spread)
Extreme positive = asset is overextended vs benchmark (sell signal).
Slide 7: Grid 1 – Quant Heatcard (Visual Dashboard)
Position Options: 9 positions (Top/Bottom + Left/Center/Right)
Text Size: Tiny, Small, Normal
Top Row (6 cards):
Card Display Color Logic
Beta Value vs 1.0 Green if ≥ 1.0
Alpha (Ann.) Annualized % Green if positive, Red if negative
Price Corr Correlation Green if ≥ threshold
VW-Corr Volume-Weighted Corr Gold if ≥ threshold
RS Momentum % vs benchmark Green if positive, Red if negative
Spread Z-Score Z value Gold if ≥ Z-threshold (overextended)
Slide 8: Grid 1 – Quant Heatcard (Continued)
Bottom Row (6 cards):
Card Display Color Logic
Return 1D % change Green if positive, Red if negative
Return 1W % change (weekly close) Green if positive, Red if negative
Return 1M % change (monthly close) Green if positive, Red if negative
Quant Signal "ALPHA PASS" or "NEUTRAL" PASS if: corrClose ≥ threshold AND RS Momentum > 0 AND Beta > 0.8
Benchmark Symbol text (e.g., "SPY") Cyan highlight
Lookback e.g., "30 bars" Muted display
Slide 9: Grid 2 – Detailed Breakdown Table
Position Options: 9 positions (separate from Grid 1)
Text Size: Tiny, Small, Normal
Row Col 0 Col 1 Col 2 Col 3
Row 0: Correlations Price Corr RSI Corr ATR Corr Volume Corr
Row 1: Structure Beta Alpha Spread Z-Score RS Momentum
Row 2: Selected Metric Selected Metric Name Correlation of Selected Metric PASS/FAIL (≥ threshold) Lookback (e.g., "30B")
Color Coding:
Green = Strong/Positive
Red = Weak/Negative
Cyan = Informational
Gold = Extreme/Warning
Slide 10: Plots & Screener Exports
The indicator also plots directly on the chart pane (below price):
Plot Color Display
Price Correlation (%) Blue (linewidth 2) Main chart pane
VW-Correlation (%) Yellow (linewidth 1) Main chart pane
Threshold Upper/Lower Green/Red dashed lines ±70% bands
Beta Teal Data Window + Status Line
Alpha (%) Green Data Window + Status Line
RS Momentum (%) Purple Data Window + Status Line
Z-Score Orange Data Window + Status Line
Return 1D/1W/1M Purple/Orange/Red Data Window + Status Line
These enable screeners and multi-ticker comparisons using TradingView's Data Window.
Slide 11: Alert Conditions – Automated Signals
The indicator generates 3 distinct alert conditions for automated trading notifications:
Signal Condition
BUY / Accumulation corrClose ≥ threshold AND corrVW ≥ threshold AND RS Momentum > 0 AND Beta > 0.8 AND Z-Score < zThreshold
HOLD / Neutral corrClose ≥ threshold AND RS Momentum ≤ 0.5 AND Z-Score < zThreshold
SELL / Divergence RS Momentum < 0 OR corrClose < 0.20 OR Z-Score ≥ zThreshold
Alert Messages include: Ticker name and clear reasoning (e.g., "High correlation, positive RS momentum against benchmark, and stable Z-score.")
Slide 12: Use Cases & Applications
Scenario How the Indicator Helps
Sector Rotation Compare a stock to sector ETF (e.g., AAPL vs. XLK). High correlation + positive RS = sector leader.
Pair Trading Z-Score tells you when spread is overextended — mean-reversion entry/exit points.
Risk Management Beta tells you if stock is riskier than market; ATR correlation shows volatility alignment.
Factor Screening The "Quant Signal" (ALPHA PASS) quickly flags stocks with strong fundamentals vs benchmark.
Momentum Investing RS Momentum identifies stocks gaining relative strength.
Earnings / Event Analysis 1D/1W/1M returns show immediate impact vs benchmark.
Slide 13: Technical Implementation Highlights
Lookahead Handling: Uses barmerge.lookahead_off for reference security to avoid repainting.
Rolling Windows: All statistics use TradingView's ta.correlation, ta.sma, ta.stdev for consistency.
Volume-Weighted Correlation: Custom computation using volume-weighted returns for more robust correlation.
Dynamic Tables: Uses table.new with position constants, allowing users to place grids anywhere on screen.
Alerts: Built-in alertcondition() for automated strategy integration.
Compatibility: Requires Pine Script v6. Works on all timeframes (1min to monthly).
Slide 14: Customization Options Summary
Group Parameter Options
Core Quant Lookback, Reference Symbol, Correlation Metric, Thresholds 10-500, 40+ ETFs, 7 metrics, 0.05 steps
Grid 1 (Heatcard) Show/Hide, Position, Text Size 9 positions, 3 sizes
Grid 2 (Details) Show/Hide, Position, Text Size 9 positions, 3 sizes
Oscillators RSI, MACD, Stochastic, CCI, Williams, ATR lengths User-adjustable
Result: A fully configurable tool adaptable to any trading style — from day trading to long-term investing.
Slide 15: Demonstration – Example Output
Ticker: AAPL
Benchmark: SPY
Lookback: 30 bars
Metric Value Signal
Beta 1.12 High volatility
Alpha +2.3% Positive outperformance
Price Corr 0.85 Strong alignment
VW-Corr 0.81 Volume-confirmed correlation
RS Momentum +1.2% Gaining relative strength
Z-Score +0.45 Within normal range
Quant Signal ALPHA PASS Bullish
Alert: BUY condition triggered.
Slide 16: Summary & Value Proposition
What this indicator delivers:
✅ Institutional-grade quant dashboard in a single script
✅ Multi-dimensional analysis — not just price, but volatility, volume, momentum, and risk
✅ Visual clarity with two customizable data grids
✅ Actionable alerts for systematic trading
✅ Screener-ready outputs via Data Window
✅ Fully configurable to fit any strategy or timeframe
Ideal for: Swing traders, sector rotators, pair traders, risk managers, and quantitative researchers using TradingView.
FOR EDUCATIONAL PURPOSES ONLY
NOT A FINANCIAL ADVICE 指標

MACD Trend Continuation Filter [algotim]MACD Trend Continuation Signals with Trend Strength and Session Validation is a trend-following indicator designed to reduce false MACD crossover signals by requiring confirmation from market direction, trend strength, and trading session activity before generating a signal.
Instead of treating every MACD crossover equally, the indicator applies a sequential validation process so that signals are only produced when momentum develops in the direction of the prevailing trend during active market sessions.
Problem Statement
Standard MACD crossover strategies often generate numerous signals during ranging markets, weak trends, or periods of reduced market participation. While many of these crossovers satisfy the basic MACD conditions, they frequently lack the broader context needed to support a higher-probability continuation move.
This indicator addresses that issue by combining momentum, trend direction, trend strength, and session timing into a single validation workflow. The objective is not to increase the number of signals, but to improve their selectivity by filtering out conditions that commonly produce lower-quality entries.
Methodology
The indicator evaluates each setup through four consecutive validation stages.
Stage 1 – Momentum Trigger
The process begins with a traditional MACD crossover.
A bullish setup requires the MACD line to cross above the signal line while both remain below the zero line, indicating that bullish momentum is emerging from previously negative momentum.
A bearish setup requires the MACD line to cross below the signal line while both remain above the zero line, indicating weakening bullish momentum before potential downside continuation.
Stage 2 – Trend Direction
After a valid MACD crossover is detected, price location relative to the selected EMA determines the higher-level trend.
Long signals require price above the EMA.
Short signals require price below the EMA.
This prevents taking counter-trend MACD crossovers.
Stage 3 – Trend Strength
The indicator then evaluates ADX.
Signals are only accepted when ADX exceeds the user-defined threshold, indicating that directional movement has sufficient strength. When enabled, this filter attempts to reduce signals generated during low-volatility consolidation periods.
Stage 4 – Session Validation
Finally, signals are restricted to the selected trading sessions.
By default, only London and New York sessions are considered valid. These periods generally coincide with higher market participation and increased liquidity compared with quieter trading hours.
Only when all four stages agree is a signal plotted.
Signal Workflow
Bullish Signal
MACD crosses above its signal line.
MACD remains below zero.
Price trades above the EMA trend filter.
ADX exceeds the minimum strength threshold (optional).
The current bar occurs during an enabled trading session (optional).
A bullish signal is displayed.
Bearish Signal
MACD crosses below its signal line.
MACD remains above zero.
Price trades below the EMA trend filter.
ADX exceeds the minimum strength threshold (optional).
The current bar occurs during an enabled trading session (optional).
A bearish signal is displayed.
Why This Indicator Is Different
Many MACD-based scripts generate signals immediately after every crossover.
This indicator instead applies a layered validation process where each filter serves a distinct analytical purpose:
MACD identifies the momentum shift.
The EMA confirms the broader directional bias.
ADX measures whether the market is exhibiting sufficient directional strength.
The session filter limits signals to predefined periods of higher market activity.
Rather than operating as independent indicators displayed together, these components form a sequential decision process where each stage must validate the previous one before a signal is produced.
Inputs
The indicator allows customization of:
MACD fast, slow, and signal periods
EMA length
ADX length
Minimum ADX threshold
London session
New York session
Enable/disable ADX filtering
Enable/disable session filtering
Alerts
Built-in alert conditions include:
Bullish Signal
Bearish Signal
Alerts trigger only after all enabled validation stages have been satisfied.
Practical Usage
The indicator is intended for traders who prefer trading with the prevailing market direction rather than reacting to every MACD crossover.
Because multiple filters must align, signal frequency is intentionally lower than a standard MACD indicator. Traders may use the signals alongside their own price action analysis, support and resistance levels, or risk management rules.
Limitations
Signals are generated only after bar confirmation.
Strong trends may still produce losing trades during rapid market reversals.
Session filtering may exclude valid opportunities occurring outside the selected trading hours.
ADX measures trend strength but does not indicate future price direction.
The indicator is designed as a confirmation tool and should not be relied upon as the sole basis for trading decisions.
Notes
This script is intended for educational and analytical purposes. It visualizes a structured validation process that combines momentum, trend direction, trend strength, and trading session timing into a single signal-generation workflow. As with any technical indicator, outputs should be evaluated within a broader trading plan that includes appropriate risk management. 指標

FCP | HL Levels | Daily Weekly Monthly Multi Timeframe High LowHL Levels draws the high, low and midpoint of each completed higher-timeframe candle directly on your chart, so you can see where the market reacted without switching timeframes.
What it plots
For every closed candle of the selected timeframe, three horizontal segments are drawn across the range of that period:
High — the peak of the previous period
Low — the trough of the previous period
Midpoint — the 50% level between them, drawn as a dotted line
Each segment spans only its own period, so the chart reads as a sequence of ranges rather than a cluster of endless rays.
Timeframes
Three fixed groups are available out of the box:
Daily — previous day's high, low and midpoint
Weekly — previous week's high, low and midpoint
Monthly — previous month's high, low and midpoint
Each can be toggled independently and given its own colour and line width.
Custom timeframe
A fourth group lets you pick any timeframe you want. It is off by default. Turn it on, choose a timeframe, and set how many candles back to draw.
This is aimed at intraday traders who work on low timeframes but need a mid-level reference — for example a 5-minute chart showing 4-hour highs and lows. Its look-back is measured in candles, not days, because the timeframe is yours to choose and a day-based count would produce thousands of objects on a 1-minute setting.
Look-back
The three fixed groups share a single look-back measured in days (default 60). The indicator converts that into the right number of candles for each timeframe automatically, so one setting controls all three consistently.
Notes
A group is skipped when its timeframe is lower than the chart's own timeframe, since those levels would change faster than the bars drawn beneath them.
Higher-timeframe data is requested with lookahead_on applied to high and low — that is, only fully closed candles are read. Nothing repaints.
The script respects Pine's 500-line drawing budget. Older periods are removed as new ones form.
How to use it
Previous-period highs and lows are among the most watched levels in any market. Price approaching a prior daily high often meets sellers; a prior weekly low often attracts buyers. The midpoint marks the equilibrium of that period and frequently acts as support or resistance in its own right.
These are reference levels, not signals. Combine them with your own analysis and risk management. 指標

EVA Ai + POC, Liquidity & Smart Money## Overview
**EVA Ai+ Volume Profile — POC, Value Area & Liquidity** is a market-structure and volume-distribution indicator designed to analyze where trading activity is concentrated across price.
Its primary purpose is to combine price-based Volume Profile information with confirmed liquidity structure in one analytical framework.
The script calculates a horizontal volume distribution, Point of Control (POC), Value Area, High-Volume Nodes (HVN), Low-Volume Nodes (LVN), directional volume estimates, and confirmed buy-side/sell-side liquidity pools.
These components are not intended to function as independent entry signals. They are combined to help answer a specific analytical question:
**Where is price currently being accepted, where is participation relatively low, and where does confirmed unswept liquidity remain in relation to that auction structure?**
The indicator does **not** generate automatic LONG or SHORT recommendations and does not execute trades.
---
## Purpose of the combined architecture
Volume Profile and liquidity analysis describe different aspects of market behavior.
Volume Profile measures how the available volume data is distributed across price.
Liquidity structure identifies confirmed areas around comparable swing highs and lows that have not yet been fully cleared according to the script's rules.
EVA combines these concepts because either one viewed in isolation can omit relevant context.
For example:
* POC and Value Area describe the center and boundaries of accepted value;
* HVNs identify local concentrations of calculated participation;
* LVNs identify comparatively low-volume regions;
* directional volume provides context about the composition of the calculated profile;
* confirmed BSL/SSL pools identify unresolved liquidity structures;
* distance and quality calculations place those structures in relation to current volatility and price.
The intended result is a single auction map showing **value, participation, low-volume structure, and confirmed liquidity context together**.
This interaction is the principal reason these components are included in one script.
---
## Volume Profile
The script distributes the available volume across horizontal price rows within the active calculation range.
The profile is intended to show where the selected market spent comparatively more or less trading activity.
### Point of Control — POC
POC is the price row containing the largest amount of calculated profile volume.
It represents the highest-volume row of the current profile calculation.
It should not be interpreted as an automatic support, resistance, entry, or reversal signal.
### Value Area
The Value Area contains the configured percentage of calculated profile volume surrounding the profile's primary volume concentration.
A commonly used setting is 70%.
The script displays:
* **VAH** — Value Area High;
* **VAL** — Value Area Low.
Price inside the Value Area indicates that it is trading within the profile's calculated value region.
Price above VAH or below VAL indicates that it is outside that region, but this condition alone does not imply continuation or reversal.
---
## HVN and LVN structure
### High-Volume Nodes — HVN
HVNs are local concentrations within the calculated profile where neighboring rows contain comparatively high volume.
They can be used to identify areas of previous acceptance or repeated participation.
Possible market behavior around an HVN can include rotation, consolidation, retesting, support/resistance behavior, or no meaningful reaction at all.
The script does not assume that an HVN must hold.
### Low-Volume Nodes — LVN
LVNs are local low-volume regions between areas of greater calculated participation.
They can highlight portions of the profile where historical acceptance was comparatively limited.
Price may sometimes traverse these areas more quickly, but an LVN does not guarantee acceleration or determine direction.
HVN and LVN structures remain components of the calculated profile and can change when the active profile range changes.
---
## Directional volume context
When lower-timeframe data is available, the script classifies lower-timeframe volume according to candle direction and aggregates that information into the profile.
The resulting values are displayed as:
* Up Volume;
* Down Volume;
* Delta.
**Delta in this indicator is the difference between the script's classified Up Volume and Down Volume.**
It is important to distinguish this from exchange-level bid/ask order-flow delta.
Pine Script does not provide the script with a complete historical exchange order book or universal historical bid/ask footprint data.
Therefore, EVA does not claim to reconstruct those datasets.
Directional volume is an approximation derived from the available lower-timeframe OHLCV data.
---
## BSL and SSL liquidity structure
The liquidity component identifies confirmed structures around comparable pivot highs and lows.
### BSL — Buy-Side Liquidity
BSL structures are created above qualifying comparable swing highs.
### SSL — Sell-Side Liquidity
SSL structures are created below qualifying comparable swing lows.
The script does not label every swing high or swing low as liquidity.
A liquidity structure requires multiple confirmed pivot observations that satisfy the script's similarity, spacing, volatility, and quality conditions.
This filtering is intended to reduce the number of insignificant structures displayed on the chart.
Liquidity terminology in this script represents a technical model based on price structure. It does not imply direct observation of hidden orders or stop orders in an exchange order book.
---
## Liquidity Quality
Each qualifying liquidity structure receives a quality value based on several measurable properties of the detected structure.
Depending on the active configuration, these properties include factors such as:
* relative volume;
* rejection characteristics;
* spacing between qualifying pivots;
* volatility-adjusted geometry.
The quality value is used for filtering and ranking detected structures.
It is a relative analytical score created by this script. It is **not a probability of a profitable trade or a prediction that a liquidity level will be reached or swept**.
---
## Liquidity states
Detected pools can move through several states.
### FRESH
The qualifying structure has been confirmed and has not yet met the script's test or sweep conditions.
### TESTED
Price has interacted with the structure according to the configured testing rules without completing the full sweep condition.
### OFF
The structure remains internally valid but falls outside the configured volatility-adjusted working radius and is therefore not displayed as an active nearby structure.
### SWEPT
Price has crossed the structure's defined far boundary.
Once this condition is confirmed, the corresponding active pool drawings are removed.
The state system prevents historical liquidity structures from remaining visually active after the script considers them resolved.
---
## Nearest structural references
The dashboard identifies nearby calculated structures such as:
* BSL;
* SSL;
* HVN;
* LVN.
Distances can be normalized using ATR so that the displayed distance is comparable across instruments with different nominal prices and volatility.
These values describe **location**, not trade expectancy.
A nearby BSL, SSL, HVN, or LVN should not be interpreted as a recommendation to enter a position.
---
## Profile modes
The script supports several ways to define the profile range.
### Visible Range
The profile is calculated from the chart region used by the script's visible-range logic.
Changing the visible chart area can therefore change the profile.
This behavior is intentional.
A Visible Range profile is dynamic and should not be interpreted as an immutable historical signal.
### Session
The profile is calculated using the selected session boundaries.
This mode can be used to examine session-specific POC, Value Area, and volume distribution.
### Fixed Range
The profile is calculated between user-defined time boundaries.
This mode can be used to inspect a specific impulse, consolidation, expansion, or other manually selected market segment.
---
## Adaptive configuration
The optional adaptive mode adjusts selected calculation parameters according to chart conditions.
Depending on configuration, this can include:
* lower-timeframe selection;
* profile row density;
* HVN/LVN sensitivity;
* pivot sensitivity;
* liquidity-zone width;
* minimum liquidity-quality threshold;
* volatility-adjusted display radius.
The purpose of this mode is to maintain usable analytical resolution across different chart timeframes and price scales.
Adaptive configuration does not optimize for future profitability and does not predict future market direction.
Users can disable adaptive behavior and use manual settings where required.
---
## Dashboard
The dashboard summarizes the current calculated state of the indicator.
Depending on the selected configuration, it can display:
### Auction
The location of current price relative to VAH, VAL, and the calculated Value Area.
### Range / Source
The active profile mode and the data source currently used by the calculation.
### Rows × Step
The effective number of price rows and the price increment represented by each row.
### Up / Down / Delta
The directional volume classification generated from the available data.
### POC / Distance
The current POC and price distance from it.
### Nearest BSL / SSL
The nearest qualifying liquidity structure together with distance, quality, and state.
### Nearest HVN / LVN
The nearest calculated high-volume and low-volume structures.
### Structure
A descriptive classification of the current volume distribution.
### Status
Information concerning the current calculation mode and available data.
The dashboard summarizes calculated information; it does not produce trading instructions.
---
## How to interpret the map
### Price inside Value Area
Price inside VAH and VAL is trading within the profile's calculated value region.
POC and HVNs can help locate concentrations of historical participation.
This does not necessarily imply a ranging market or predict that price will remain inside the Value Area.
### Price above VAH
Price above VAH is outside the upper boundary of the calculated Value Area.
Whether the move continues or returns into value depends on subsequent market behavior.
VAH alone is not a breakout confirmation.
### Price below VAL
Price below VAL is outside the lower boundary of the calculated Value Area.
VAL alone does not confirm bearish continuation.
### Interaction with an LVN
An LVN identifies a region of comparatively low calculated participation.
It can be used to observe how price behaves when entering a low-volume region, but it does not guarantee rapid movement through that area.
### Interaction with liquidity
When price reaches a BSL or SSL structure, users can observe whether the level remains active, becomes tested, or satisfies the script's sweep condition.
A sweep is a structural event only.
**A liquidity sweep does not by itself imply a reversal or continuation.**
---
## Data handling and confirmation
Where available, lower-timeframe OHLCV data is used to improve the allocation of volume within higher-timeframe chart candles.
When the requested lower-timeframe sample is unavailable or insufficient for the selected calculation, the script can use its documented fallback calculation instead of presenting an incomplete lower-timeframe profile as if it were complete.
Liquidity structures are based on confirmed pivot events.
Because a pivot requires subsequent bars for confirmation, a newly confirmed liquidity structure can appear later than the historical bar on which the pivot itself occurred.
The script does not interpret this confirmation delay as advance knowledge.
Developing profiles can change as additional data arrives.
Visible Range profiles can also change when the chart viewport changes.
These behaviors are inherent to dynamic profile calculations and should not be interpreted as historical trade signals being rewritten.
---
## Originality and design rationale
The script uses established analytical concepts such as Volume Profile, POC, Value Area, pivots, ATR normalization, and liquidity terminology.
It does not claim that those individual concepts are proprietary.
The distinctive functionality of this implementation is their integration into a unified state-based analytical system.
Instead of independently displaying several unrelated indicators, EVA:
1. builds a common price-row volume model;
2. derives POC and Value Area from that same distribution;
3. identifies local HVN/LVN structure within the profile;
4. estimates directional volume from lower-timeframe data where available;
5. independently confirms comparable pivot structures;
6. applies volatility-, geometry-, and participation-based filtering to those structures;
7. maintains lifecycle states for active liquidity pools;
8. relates nearby volume and liquidity structures to current price using a common dashboard and normalized distance model;
9. provides explicit fallback behavior when detailed source data is unavailable.
The purpose of the integration is to provide one coherent representation of **auction value, relative participation, low-volume structure, and unresolved price-based liquidity** rather than a collection of independent signals.
---
## Why the source code is protected
The source code is protected to preserve the implementation of the script's integrated profile construction, adaptive parameter logic, node-classification methods, liquidity-quality filtering, state transitions, data-fallback handling, and visualization architecture.
Closed-source visibility is not intended to prevent users from understanding the indicator's behavior.
This description therefore documents the script's purpose, inputs, main calculations, interpretation, data limitations, and expected dynamic behavior without exposing implementation-specific formulas and thresholds.
---
## Important limitations
Users should understand the following limitations before using the indicator:
* The script only has access to data supplied to Pine Script by TradingView and the active symbol's data provider.
* Volume characteristics differ between markets and symbols.
* On some Forex instruments, the available volume can represent tick volume rather than centralized exchange volume.
* The script does not have access to a complete historical exchange order book.
* It does not know the location of actual individual traders' stop orders.
* BSL and SSL are price-structure models, not observations of hidden orders.
* Directional volume is derived from available candle data and is not equivalent to true exchange bid/ask footprint delta.
* Confirmed pivots necessarily introduce confirmation delay.
* Visible Range calculations can change when the chart viewport changes.
* Developing profiles can change as new bars or intrabars become available.
* HVNs, LVNs, POC, VAH, VAL, BSL, and SSL do not predict future price behavior.
* No individual component should be interpreted as a guaranteed support, resistance, breakout, reversal, entry, or target.
* Different symbols, sessions, timeframes, and data feeds can produce materially different profile structures.
---
## Intended use
EVA is intended as a **market-reading and contextual-analysis tool**.
A typical workflow is:
1. identify the current Value Area and POC;
2. inspect the shape of the volume distribution;
3. locate nearby HVN and LVN structures;
4. identify confirmed active BSL and SSL structures;
5. compare those structures with current price and volatility;
6. observe subsequent price and volume behavior;
7. perform an independent trade and risk assessment.
The indicator deliberately does not convert this information into automatic LONG or SHORT instructions.
---
## Risk disclosure
This script is an analytical indicator and does not execute orders.
It does not provide financial advice, guarantee trading outcomes, or predict future market behavior.
Historical structures and previous market reactions do not establish how price will behave in the future.
Users remain responsible for independent analysis, position sizing, execution decisions, and risk management.
指標

ADX / DMI(+)(-) TRENDICATOR## Draft Description
**ADX / DMI(+)(-) TRENDICATOR** is a responsive trend-strength and directional-momentum indicator designed to complement an **8 EMA / 20 EMA trading system**.
It combines:
- **ADX** to measure trend strength
- **DI+** to measure bullish directional pressure
- **DI−** to measure bearish directional pressure
- **20 and 40 ADX levels** to identify developing and strong trends
- **Angel Crosses** when DI+ crosses above DI−
- **Death Crosses** when DI− crosses above DI+
- Confirmed-candle alerts designed to avoid intrabar repainting
The default calculation settings use an **8-period DI length** and **8-period ADX smoothing** for a faster response to recent price candles. All calculation settings remain adjustable for different markets and timeframes.
The indicator includes customizable:
- ADX, DI+, and DI− visibility
- ADX and DI line widths
- Line, stepline, and circle plot styles
- Indicator colors
- Horizontal level visibility and styles
- ADX alert threshold
- Directional DI fill
Use ADX to determine whether a market is trending, then use DI+ and DI− to identify the dominant directional pressure. For example, a bullish EMA alignment combined with DI+ above DI− and ADX above 20 may indicate strengthening bullish momentum.
## How It Differs From Typical ADX/DMI Indicators
### 1. Confirmed-candle behavior
Many indicators react to changing intrabar values, causing temporary crosses or signals that can disappear before the candle closes. This indicator commits ADX, DI+, and DI− values only after candle confirmation, helping prevent intrabar signal repainting.
### 2. Designed for faster EMA-based systems
The default **8/8 settings** are intended as a responsive starting point for an **8 EMA / 20 EMA trend system**, rather than relying exclusively on the traditional slower 14/14 settings.
### 3. Clearer trend-strength framework
The fixed **20 and 40 levels** provide a simple visual framework:
- Below 20: weak or ranging conditions
- Above 20: trend development or moderate strength
- Above 40: strong trend conditions
### 4. More complete customization
Instead of only changing colors, users can control visibility, line widths, plot styles, level styles, and directional fills directly from the settings panel.
### 5. Expanded alert system
The indicator includes confirmed alerts for:
- Angel Crosses
- Death Crosses
- ADX crossing above or below 20
- ADX crossing above or below 40
- ADX crossing the custom alert threshold
### 6. Direction and strength are separated
Unlike systems that treat ADX as a buy or sell signal, this indicator keeps the concepts separate:
- **ADX = strength**
- **DI+ / DI− = direction**
- **8 EMA / 20 EMA = trend structure**
This helps reduce the common mistake of interpreting a rising ADX alone as a bullish signal. 指標

iNaka 3-Bar SequenceiNaka 3-Bar Sequence marks every place a three-bar candlestick sequence that YOU define completes. You set what the 1st, 2nd and 3rd bar must each be - Bull Bar, Bear Bar, Hammer, Shooting Star, Doji, or Any Bar for "I do not care what shape this one is" - and the script marks the bar that finishes that sequence. Around it sit six optional gates that decide whether a completed sequence counts here.
Two things here are uncommon, and they are the reason it exists. The sequence is defined ACROSS ALL THREE POSITIONS independently, with an Any Bar wildcard on each, so the same script expresses a two-bar pair, a three-bar reversal or a single candlestick without changing anything but the dropdowns. And the RSI test is a SEPARATE BAND PER POSITION rather than one reading at the signal bar - momentum is checked as a shape running through the sequence, not as a threshold at the end of it.
WHY THIS IS ONE TOOL AND NOT A PILE OF INDICATORS
The three-bar sequence is the only thing the six gates can fire. Bollinger Bands, the two moving averages, RSI, the price window and the time window produce no signal of their own: none of them plots a cross, an arrow or an alert, and none of them can trigger anything by itself. They are AND-gates on the same event, and each answers a different question about the SAME three bars:
- RSI, read separately at each of the three bar positions: what momentum was doing THROUGH the sequence. This is not "RSI is overbought" - it is a band per bar, so you can say "already extended two bars ago, more extended one bar ago, still up here" and reject the same candlestick shape when it appears with flat momentum.
- Bollinger band width: was the market wide enough for a three-bar sequence to mean anything. The same three candles inside a dead flat band are noise.
- Bollinger band touch: did the sequence complete AT an extreme rather than in the middle of the range.
- Fast and slow moving average: did it complete with the prevailing trend or against it.
- Price window: is price in the area you are willing to trade at all.
- Time window: is the bar inside the date range you are testing.
Every gate is off by default, so the script starts as a plain pattern detector and you add context one gate at a time. That is the design: a candlestick shape is not a setup until you have said where and when it counts, and each gate is one clause of that sentence.
WHAT IT DRAWS
- A red triangle above every bar that completes the sequence, plus a green background tint on that bar.
- A green numbered label above the bar each time an alert is allowed through. The number is a running count of alerts on the chart. With Silent Minutes left at 0 every detection is numbered.
- A red numbered label below the bar where a Silent-Minutes mute window ended, carrying the number of the alert that started it - so a muted stretch reads as a matched green/red pair.
- Optionally the Bollinger Bands, the two moving averages, and the New High / New Low lines. All three are off by default. Drawing the bands or the moving averages changes nothing at all; the New High / New Low toggle also arms that pair of alerts, which is described in its own section below.
HOW A BAR IS CLASSIFIED
- Bull Bar: close above open, with an optional minimum body size in POINTS (1 point = 1 tick, so the value follows the feed's precision: on a 2-decimal XAUUSD feed 100 points = $1.00, on a 3-decimal one 1000 points = $1.00). Bear Bar is the mirror.
- Hammer: lower shadow longer than Hammer Shadow % of the bar's high-low range, upper shadow no more than (1 - Hammer Body %) of it, and body no more than Hammer Body % of it.
- Shooting Star: the same test with the shadows swapped, using its own body and shadow percentages.
- Doji: body no more than Doji Body % of the range.
- Any Bar: no bar-type constraint at this position. Its RSI band and bar-comparison rule, if you enabled them, still apply.
HOW THE SEQUENCE IS TESTED
The 1st bar is two bars back, the 2nd is one bar back, and the 3rd is the current bar. All three are tested on every bar, so the sequence is reported the moment its last bar completes it. On top of the type test, two optional rules can be attached:
- Bar Comparison, separately for the 2nd and the 3rd bar: require that bar's close to be higher or lower than the open, high, low or close of a bar a chosen number of bars before it. This is how you turn "Bull, Bull, Shooting Star" into "Bull, Bull that closed above the bar before it, Shooting Star".
- The RSI band for that position, if RSI detection is on.
THREE THINGS THAT WILL SURPRISE YOU IF NOBODY SAYS THEM
1. Any Bar switches off the bar-TYPE test for that position and nothing else. Its RSI band and its Bar Comparison rule, if you enabled them, still apply. That is the point: "any shape here, but momentum had to be in this range" is a setup you can actually express.
2. If you tick both Near Upper BB and Near Lower BB, Near Upper wins and Near Lower is ignored. The same applies to Detect Above MA and Detect Below MA: ticking both is treated as Above.
3. Use MA Detection with NEITHER Above nor Below ticked blocks every signal. That is deliberate rather than an oversight - the gate is on and you have not told it which side - but it looks like the script has stopped working, so it is worth knowing.
SETTINGS
Sequence - the master switch and the three bar types. Bar Definitions - what each type means: minimum bull/bear body in points, and the body and shadow percentages for Hammer, Shooting Star and Doji. Bar Comparison - the optional higher/lower rules for the 2nd and 3rd bars. Momentum (RSI) - one RSI length, then a min/max band for each of the three positions. Bollinger Context - length, basis MA type, source, standard deviation; whether to draw the bands; the width filter in points; and the Near Upper / Near Lower band-touch gate. Trend (Moving Averages) - fast and slow type and length, which side to require, and whether to draw them. Price & Time Window - an absolute price range and a date range. Note the price range defaults to 0-100, which blocks everything on any instrument priced above 100, so set it before switching it on. New High / New Low - a separate pair of alerts, described below. Alerts & Display - the triangle and highlight toggles and their colours, Silent Minutes, and the numbered markers.
NEW HIGH / NEW LOW - READ WHAT IT ACTUALLY TESTS
This is an independent pair of alerts, not part of the sequence and not a gate on it. New High fires when the close is at or above the highest high of the last N bars including the current one. Because a bar's close can never exceed its own high, that can only be true when the bar closes exactly at its high AND that high is the highest of the window. It is therefore a good deal stricter than "price made a new high", and on most instruments it fires rarely. New Low is the mirror.
Why it ships in this script rather than as a separate one: the sequence engine describes SHAPES, and this is the one piece of context a shape cannot express - the moment price closes at the extreme of the last N bars. It shares the same Silent Minutes throttle and the same numbered labels, so one alert stream covers both, and a sequence alert on the same bar takes precedence over it. Leave Use New High / New Low switched off and it draws nothing and fires nothing.
SILENT MINUTES
After an alert is allowed through, all further alerts from the script are suppressed for this many minutes. Detection is never suppressed: the triangles and the highlight keep appearing, so the chart still shows you everything that happened while the alerts were muted. 0 disables it.
HOW TO USE IT
- Start with the pattern alone, every gate off, on the timeframe you actually trade. Find out how often your shape occurs before you start filtering it.
- Add ONE gate at a time and watch what it removes. If a gate removes nothing, it is not doing work; if it removes everything, it is the wrong gate for that market.
- Add the RSI bands last, and set them from what you observe on the chart rather than from the usual 70/30 habits. The three bands are a shape, not a threshold.
- If you use this for alerts on a fast timeframe, set Silent Minutes rather than tightening the pattern: you keep seeing every occurrence on the chart and stop getting told about each one.
LIMITATIONS, WHICH YOU SHOULD READ BEFORE USING IT
- The 3rd bar of the sequence is the CURRENT bar. The triangle, the background tint and the alert condition are evaluated on a bar that is still forming, so they can appear and disappear until it closes. Closed bars never change. Set every alert to "Once Per Bar Close". The numbered labels are drawn only on confirmed bars and never repaint. The New High / New Low lines, if you switch them on, also move while the current bar forms.
- Apart from the RSI bands, which are read at each bar's own position, the gates read the CURRENT bar's state. The band-touch gate compares all three bars against the current bar's Bollinger Bands, and the band-width, MA, price and time gates are all evaluated on the bar that completes the sequence.
- Candlestick classification is threshold arithmetic on one bar's four prices. It has no notion of context, and the same shape on a 1-minute chart and a daily chart is not the same event.
- Only the most recent 500 numbered labels are kept. Scroll back far enough and the older ones have been deleted; the triangles and the highlight are not affected and go back as far as the chart data.
- The default percentages for Hammer, Shooting Star and Doji are conventional starting values, not optimised or validated ones. Every instrument has its own shadow distribution and you should expect to change them.
- This is a detection tool. It does not generate entries or exits, does not size or manage a position, and makes no claim about profitability.
ALERTS
Three conditions: "3-Bar Sequence Detected", "New High" and "New Low". All three respect Silent Minutes. Set them to "Once Per Bar Close".
The chart above is not on default settings. The sequence is set to 1st Bar = Bear Bar, 2nd Bar = Bear Bar, 3rd Bar = Bull Bar. Use Bar Comparison for 3rd Bar is on, so the closing bar must also close above the OPEN of the first bar of the sequence (Comparison Type = Higher, Compare Against = Open, Lookback Period = 2). Use RSI Detection is on with a different band at each position - 1st Bar 1-30, 2nd Bar 1-40, 3rd Bar 1-50. Read together that is: two down bars completing from deeply oversold, reclaimed by an up bar that closes back above where the move began, with the momentum requirement widening one step at a time across the three bars. Everything else is at its default.
Published open-source under the Mozilla Public License 2.0. 指標
