Cash Runway & SolvencyCash Runway & Solvency estimates how long a company can keep operating at its current cash burn, using reported quarterly figures rather than estimates.
The script reads two quarterly items: cash and equivalents, and cash flow from operating activities. Both are carried forward between reports so the line is continuous between filings.
If operating cash flow is positive, the company is funding itself and the line sits at the top of the scale. If it is negative, the burn is the absolute value of that figure, and the runway is cash divided by burn, expressed in quarters and capped at 20 so the scale stays readable.
Three reference lines mark the zones: 20 quarters is the self-funding cap, 4 quarters is roughly one year of cash, and 2 quarters is where financing pressure usually starts. The line changes color as it crosses them: teal when self-funding, blue above four quarters, orange between two and four, red below two.
How to read it. A falling line means burn is rising faster than cash, or cash is being consumed without replacement. A jump upward usually means a capital raise, so check for dilution. A flip from red or orange to teal is the quarter the company turned operating cash flow positive.
Notes and limits. Values update only when a new quarterly report is released, so the line steps rather than moves daily. The runway assumes the last reported burn continues unchanged, which it rarely does; it is a snapshot, not a forecast. Financing and investing cash flows are excluded, so a company that keeps raising money can run at low readings for years. It needs reported quarterly financials, so nothing plots on indices, forex, crypto, most funds, and some non-US listings. Banks and insurers do not fit the burn model at all. 指标

Candle Club - Session LevelsYesterday's high, the overnight range and today's open, drawn where they formed and kept on the chart so you can see what price did there.
WHAT IT DRAWS
Prior day high, low and close; overnight high and low; the cash-session open; an optional prior-day midline and round-number reference lines; and shelf zones, shaded pockets where recent session highs and lows cluster. Each day's lines start when that level becomes known and stop when the next one replaces it, so history stays readable.
THE IDEA
A session extreme is a place the market reached and turned away from; the overnight range is the path it took while the cash session was shut. Many traders watch these places, and this tool's only job is to put them on your chart where you can see them. It makes no claim about what price does when it returns there; what you do at a level is your call.
WHAT IS ORIGINAL
Shelf zones. The script banks each completed session's high and low, sorts the last few days of them, and groups any within your chosen width of each other. Two or more in one pocket become a box starting where its oldest member formed. One extreme is a number; a cluster is a shelf the market has revisited.
HOW TO USE
Set the cash session and timezone for your market (default: US index futures and stocks) and how many days to keep. Read it top down: the table lists every level and how far it sits from the last price, so you can see at a glance what is above and below you. Shaded boxes are shelf zones - the more session extremes stacked in one, the more times the market has stopped in that pocket. Set one alert per level, or the "any level" alert, to be told when price crosses one instead of watching. Best on 1-minute to 15-minute charts; it draws nothing on daily and above.
SETTINGS
One group per family: prior day, overnight, open, shelf zones, round lines, each with an on/off switch and colour on one row, then width and style. Neutral lines follow your chart theme. Prior day can use the exchange's daily bar or the previous cash session only.
LIMITATIONS
Intraday charts only. On stocks the overnight means the pre- and post-market bars on your chart, so extended hours must be on. The cash-session option needs one completed session first. Overnight here means everything outside the cash session you set, so if you also run a tool that starts its overnight at a fixed hour the two will not always draw the same line. The round-number lines are an evenly spaced grid, off by default. They are drawn for reference only and nothing here claims price behaves differently at them.
A standalone drawing tool with no buy or sell signals. 指标

Smooths Session Volume ProfileOverview
Smooths Session Volume Profile (SSVP) is built around a single volume-splitting engine that feeds three different views of the same underlying data: a per-bar footprint table, a compact mobile dashboard, and a session-scaled Volume Profile with Point of Control, Value Area, and Imbalance detection. Every number shown anywhere in the script traces back to one buy/sell volume calculation performed once per bar.
Why these are one script, not a mashup
The footprint table and the Volume Profile are not two indicators placed side by side — they are two resolutions of the identical volume model. The table shows that model at full per-bar detail over a short recent window; the profile aggregates the exact same bar-level buy/sell split over whichever session(s) the user selects. The session tools (highlight boxes, session-based profile scaling, Naked POC) extend that one model with time-of-day awareness rather than adding a separate feature. Removing the table would not simplify the script's purpose, it would just remove one lens on the same data the profile already uses.
Concepts used
Selectable volume engine: Geometric splits each bar's volume by where it closed inside its own high-low range. Intrabar reads real up/down volume from a lower timeframe via TradingView's own ta library. Footprint reads TradingView's native per-tick request.footprint() data (Premium/Ultimate plans only). Every other calculation in the script consumes whichever engine is active, unchanged.
Per-bar truncated-normal volume split: rather than splitting a bar's volume evenly across the ticks it traded, the script models the buy side and the sell side as separate truncated normal distributions inside the bar's own high-low range, centered toward where the bar actually closed. This produces a continuous, weighted density instead of a flat histogram bar.
Volume Profile as a summed density: the same per-bar truncated-normal components are summed across every included bar into one continuous curve, which is then sampled to locate the Point of Control (the price of maximum combined density), the Value Area (the narrowest band containing a chosen percentage of the modeled volume), and diagonal volume imbalances between adjacent price levels.
Session-aware scaling: Asia, London, and New York are each tracked independently — the script knows whether a session is currently forming or was last completed, and the profile can be built from the live union of whichever sessions are toggled on, instead of a fixed bar count.
Naked POC: the instant a session's occurrence closes, that session's own standalone Point of Control is computed independently of the combined profile and kept on the chart as an untested level until price actually trades back through it.
Self-checking math: the Overlap reading (OVL) measures what share of buy and sell volume occurred at the same prices, from 0 (fully separated, directional) to 1 (fully overlapping, balanced/rotational). The Residual reading (RES) independently re-integrates the density model and compares it back to the real volume it's supposed to represent, in parts-per-million, so the script can flag its own modeling error rather than silently drawing a profile that doesn't add up.
How to use it
Add it to any chart and timeframe. Use the Volume Profile's POC as a magnet level and its Value Area edges as boundaries between accepted and rejected price. Diagonal imbalances mark price levels where one side of the market overwhelmed the other. Toggle individual sessions in and out of "Include in Profile" to isolate one session's structure or build a composite of several. Switch to the footprint table or the mobile dashboard for the identical volume data at per-bar resolution instead of session-aggregated.
Originality
The per-bar truncated-normal volume model — shared by the footprint table and the Volume Profile alike — is the mechanism this script is built around, not an assembly of standard metrics. Session-aware profile scaling, Naked POC seeded independently per session, and the self-checking Residual metric are not reused from another publication; the detection, modeling, and rendering logic here were written for this script.
Inputs
Volume Profile — Profile Period/Session Scaling mode, Style (Line/Columns/Histogram), Width/Resolution, Gap From Chart, bell colors and fill
Session Profile Scaling — per-session time windows, time zone, Include in Profile and Show Highlight toggles, highlight colors
Metrics — Point of Control, Value Area, Imbalance thresholds, Naked POC, Balance Tilt, Residual Tolerance
Data Engine — volume engine selection and its parameters
Table Display — footprint table and mobile dashboard appearance
This indicator has no buy/sell signals, alerts framed as trade calls, or strategy logic — it is a volume-analysis tool. It does include TradingView alertcondition() entries for session starts and Overlap-state changes, which fire on data conditions, not trade recommendations. 指标

Smooths Heat Seeker Liquidity MapOverview
This indicator maps resting liquidity by detecting confirmed swing highs and lows at three independent lookback lengths, then rendering each one as a zone that visibly fades the longer it goes untouched. Instead of a static box that holds one shade until it's swept, each zone is built from small time-segments, and each segment locks in whatever color the zone's fade formula produces at the moment it's drawn — so a single zone shows a genuine gradient across its own lifetime, brightest where it formed and dimmer toward the present if nothing has happened to it since.
Concepts used
Tiered pivot detection: ta.pivothigh()/ta.pivotlow() run at three separate lookback lengths (Fast/Mid/Slow). A pivot only confirms after "Confirmation Bars" bars have passed with no higher high / lower low, which is what prevents repainting the level's location after the fact.
Age-based color decay: each level stores the bar index it was formed on. Every time a new segment is drawn, the indicator computes how many bars old the level is, runs that through a decay curve (fadeStrength input controls the curve's steepness), and converts the result into a transparency value for that segment only. Because past segments are never redrawn, the visual history of the fade is preserved rather than the whole zone jumping to one shade at once.
Mitigation vs. retest: a level is deleted the instant price crosses it (wick or close, user's choice) — that's treated as the liquidity being consumed. If price merely touches the level without crossing it, and "Refresh Fade On Retest" is on, the level's age resets to zero, so a level that keeps getting defended stays bright while one that's simply being ignored keeps fading toward removal.
Tier-priority merging: if a new pivot lands at the same price as an existing level, the indicator keeps the higher tier rather than creating a duplicate zone, so a level significant on the Slow lookback doesn't get visually diluted by a Fast-tier duplicate sitting on top of it.
How to use it
Add it to any chart/timeframe with default settings. Brighter zones are recent or actively-retested liquidity; dimmer zones are levels the market has drifted away from without touching. Use Fast/Mid/Slow tier colors to separate minor intraday levels from more structurally significant ones, and adjust Fade/Lifetime, Fade Strength, and Cell Width to control how far back the map looks and how coarse or smooth the fade appears.
Originality
This is not a combination of other publications — there's a single detection-and-rendering pipeline here (pivot detection → age tracking → per-segment decay → mitigation/retest handling), and every part of it was written for this script. No code, calculations, or visual techniques are reused from another publication.
Inputs
Fast / Mid / Slow — pivot lookback lengths for the three liquidity tiers
Confirmation Bars — bars required after a swing point before it's confirmed
Mitigate On — wick or close removes a level
Fade/Lifetime, Fade Strength, Cell Width — control how long a zone lives and how its decay curve is shaped
Refresh Fade On Retest — restarts a zone's age on an unmitigated touch
Box Height Multiplier — sets zone thickness as a multiple of ATR
Weak / Mid / Strong colors — one color per tier
This indicator has no signals, alerts, or trade markers — it's a pure visualization of where liquidity currently sits on the chart, and how fresh or stale each level is. 指标

Opening Range Breakout Statistics (ORB) (kronos)Opening Range Breakout (ORB) Statistics: Retest & Extension (kronos)
This indicator turns a completed opening range into a compact statistical read of what historically happened next. The default summary keeps the chart clean and focuses on three questions: which side broke first, how often the selected extension was reached, and what the current session has already confirmed.
How it works
The script builds an opening range from a market preset or custom session. When the range closes, its width and close location are frozen. Historical sessions are then filtered by the selected similarity rule. The current session is never included in its own sample.
First Break shows UP, DOWN and OTHER in separate cells. OTHER combines no-break sessions and same-bar two-sided breaks because OHLC data cannot prove an intrabar order.
UP or DOWN receives the stronger highlight only when that directional outcome leads both the opposite direction and OTHER.
Extension shows the historical share that reached the selected range multiple. Once a directional first break exists, the sample switches to comparable historical breaks in that direction.
Based On shows the sample size and effective similarity scope behind the extension statistic.
Today shows the confirmed first-break direction, broken-edge retest state and active extension state.
Opening range presets
US Cash 09:30 New York
London Cash 08:00 London
Tokyo Cash 09:00 Tokyo
Crypto 00:00 UTC
Custom session and timezone
Opening Range Length supports 15, 30 and 60 minutes for the market presets. Custom mode uses the custom Opening Range and Outcome Window fields.
Historical matching
Auto is the recommended mode. Before a break it uses the most specific sample that reaches the target sample size. After a directional break it resolves a separate sample for that break direction. Manual filters can instead use the same range setup, same range size, same range close, or all sessions.
Range size is classified from historical normalized opening-range widths. The current width uses a half-tie percentile rank, so equal historical widths do not receive an artificial upper-rank bias. The range close is classified into lower, middle or upper thirds.
Outcome rules
Confirmed Close requires a closed bar beyond the opening-range edge. Wick Beyond Range uses strict high/low breaches. Exact touches of the opening-range boundary are not breaks. If a single wick bar crosses both edges before a direction is established, the result is recorded as a same-bar two-sided break rather than assigning an order that the chart data cannot prove.
The broken-edge and midpoint retests can only be confirmed on a later bar than the first break. Extension targets count an exact touch.
Chart display
The opening-range box, high, low and optional midpoint remain unchanged after the range locks. Only the target in the first-break direction is shown. The OR and target lines extend one chart bar beyond the latest processed bar, matching the price-label offset on every supported timeframe. Event labels are optional and off by default.
Inputs
Preset - Market/session preset. Default: US Cash 09:30 NY.
Opening Range Length - 15, 30 or 60 minutes. Default: 30 Minutes.
Max History Sessions - Maximum retained completed sessions. Default: 250.
Target Sample Size - Desired sample size for adaptive matching. Default: 20.
History Filter - Auto, same range setup, same range size, same range close, or all sessions. Default: Auto (Recommended).
Minimum Session Data % - Required outcome-window coverage. Default: 80.
Break Confirmation - Confirmed Close or Wick Beyond Range. Default: Confirmed Close.
Extension Target - Range-width multiple beyond the broken edge. Default: 1.0.
Display - Opening range, midpoint, active target, price labels, event labels and compact summary.
Alerts
Alerts are available for opening-range lock, first break up, first break down, same-bar two-sided break, edge retest, midpoint retest, opposite edge, selected extension and both-sides completion. State changes are processed on confirmed chart bars.
Limitations
The indicator uses chart-timeframe OHLC bars only. It does not reconstruct intrabar sequencing. Session windows must align with the chart timeframe, and incomplete opening ranges are excluded. Historical percentages describe the selected sample and are not forecasts.
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. 指标

MSnR Double Breakout LevelMSnR Double Breakout Level
A staircase of turning points, and the level that matters once price finally runs out the top or
the bottom of it.
Support and resistance tools usually mark a level the moment it forms, which is why a chart ends up carrying dozens of lines that never meant anything. This one marks nothing when a level appears. It holds two of them, waits to see whether price runs past the pair, and only then draws the one that was left behind.
The result is that a level is never drawn on hope. By the time it is on the chart, price has
already proved it was willing to go through everything above or below it.
THE TWO BUILDING BLOCKS
A candle is green when close is above open, red when close is below. A doji, where they are
equal, is neither and takes no part.
A Level a green candle followed immediately by a red one.
The GREEN candle's CLOSE is the level.
Buyers pushed, sellers took it straight back.
V Level a red candle followed immediately by a green one.
The RED candle's CLOSE is the level.
Sellers pushed, buyers took it straight back.
These are not the output. They are the raw material.
DOUBLE BREAKOUT
Two same-side levels are held as a rolling pair. On the A side that is a descending pair - A1
above, A2 below:
A1 a close above this confirms it
A2 this is the level that gets marked
When a candle CLOSES above A1, the staircase has been run out, and A2 - the innermost step, the last place sellers stepped in before price left - is marked as the level.
The V side is the exact mirror. An ascending pair, V1 below and V2 above, a candle closing below V1, and V2 is marked.
It is always a DOUBLE. However long the staircase runs, only the latest two steps are ever held.
When a new same-side level appears while the pair is still waiting, one question decides what
happens to it:
the new level did NOT break the inner step -> the pair SLIDES one along
(old inner becomes the new outer)
the new level DID break the inner step -> the pair RESTARTS from that level
That single question is the whole bookkeeping, and it is the part most easily got wrong. Throwing the pair away every time another step appears loses the long staircases, which are exactly the ones worth waiting for. Never throwing it away means the pair drifts away from price and stops describing anything. Sliding keeps it anchored to the two most recent steps for as long as the move keeps going the same way, and restarts it the moment the move stops.
The breakout is always checked before any new level is. Reaching the outer step IS the breakout, so a level beyond it can only ever belong to the next search, never interrupt the current one.
DOUBLE BREAKOUT TO DOUBLE BREAKOUT
A completed Double Breakout can itself be taken out - by a completed Double Breakout running the other way.
a Double A Breakout confirms, marking A2
a Double V Breakout then confirms, marking V2
a candle CLOSES below that old A2
-> V2 becomes a DBO to DBO V level
The bullish case is the mirror: a Double V, then a Double A, then a close above the old V2, and
A2 becomes a DBO to DBO A level.
The cross break may land on the very same candle that confirmed the second Double Breakout, or on any candle after it. What it says is that the level which had just been established as the place price wanted to leave from has now been given up in the other direction, by a move built the same strict way.
The level is UPGRADED, not duplicated. A DBO to DBO A sits at exactly the price its Double A
Breakout already marked - it is the same level with more behind it - so the line already on the
chart changes its name and thickens rather than a second line being drawn on top of the first.
WHAT MAKES THIS DIFFERENT
1. Nothing is marked when it forms.
An A Level or a V Level on its own is never drawn. Two of them together are never drawn either.
Only the breakout puts something on the chart, which is why a whole session can pass with nothing new on it.
2. The pair rolls instead of resetting.
This is the piece that separates it from a plain two-level check. A staircase that keeps stepping
the same way keeps its pair alive, sliding one step at a time. A staircase that turns back on
itself starts again. Both cases are handled by the same rule.
3. The inner step is the level, not the outer one.
The outer step is what price had to close through to prove anything, so it has already been
consumed by the time the pattern completes. The inner step is the last one price never came back to, and that is what is drawn.
4. Breakout has priority over everything else.
Because reaching the outer step is itself the breakout, the order in which the two checks run
changes the result. Checking for new levels first would let a level that is really the start of
the next search interrupt the current one. Here the breakout is always resolved first.
5. The chain is a real state, not a coincidence.
A DBO to DBO level requires a full Double Breakout, then a full opposite Double Breakout, then
the first one's level being closed through. All three are tracked as one sequence, and any part
of it ageing out of the window cancels it.
6. The search itself can be watched.
The pair currently waiting for its breakout can be drawn, so the staircase can be seen sliding
before anything confirms. It is the working state, not a signal, and it is off by default.
READING THE CHART
Green line, "DBO A" Double A Breakout, label below
Red line, "DBO V" Double V Breakout, label above
Thick green, "DBO to DBO A" the bullish chain completed
Thick red, "DBO to DBO V" the bearish chain completed
Every line starts at the candle the level was read from and runs to the right, so the distance
from its origin to price shows how long it has been standing.
Labels are parked clear of that origin candle rather than on the level itself - under its low on a
bullish level, over its high on a bearish one. The level price is a candle CLOSE, so it sits
inside the candle, and a label placed there would be buried in the price action.
A chain level is always drawn one step thicker than a plain one. That is the only styling
difference, because it is the same kind of level, reached by a longer road.
With the working pair switched on, dotted lines labelled A1, A2, V1 and V2 show what is currently being tracked. A1 and A2 are the descending pair waiting for a close above A1; V1 and V2 are the ascending pair waiting for a close below V1. Watch A2 slide down as the staircase extends. If only A1 or only V1 is drawn, the search has one step and is waiting for its second.
Only the most recent few levels are drawn, so the chart stays readable. Older ones are still
counted in the corner table, which reports Double Breakout and DBO to DBO levels split into bull and bear. If the table reads higher than what you can see, the display limit is doing its job.
SETTINGS
Double Breakout
- Scan Length: how far back the search reaches. A pair that has been waiting longer than this is
abandoned, and a confirmed level is dropped once the candle it came from is older than this. It
also bounds how long a chain can stay open.
- Max Levels Shown: how many of the most recent levels are drawn. Switching a type off frees its slots for the others.
Level Types
- A switch for each of the four: Double A Breakout, Double V Breakout, DBO to DBO A, DBO to DBO V.
- Show Working Pair: draws the pair currently waiting for its breakout.
Level Style
- Bullish, bearish and working pair colours, line width, and whether levels extend to the right
edge. With extending off, a level stops at the candle that confirmed it.
Labels
- Show Labels, Label Size, and Label Distance from Candle as a percentage of ATR(14), so the gap scales with whatever instrument and timeframe you are on. The distance is measured from the origin candle's high or low, not from the level.
Summary Table
- Show, position and size of the corner table.
ALERTS
Four alert conditions:
Double A Breakout a descending pair was run out to the upside
Double V Breakout an ascending pair was run out to the downside
DBO to DBO A a bullish chain completed
DBO to DBO V a bearish chain completed
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 four 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 a level, and cannot make a signal appear and then disappear.
- Both building blocks need a candle AFTER them to exist at all. An A Level is only an A Level
once the red candle behind it has closed, so nothing is ever read from a candle still forming.
- Levels are built forward, one candle at a time, in the same order they would have been built live. A line that has been drawn never moves. The only thing that can change about it is its
name and thickness, when a later chain upgrades it, and that is a record of what price did
afterwards rather than 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
- Levels are deliberately infrequent. Two same-side reversals have to line up and then be run
through by a close, and a DBO to DBO level needs that to happen twice in opposite directions.
Long stretches with nothing new are normal.
- Scan Length is not only cosmetic here. It decides when a waiting pair is abandoned and when a chain expires, so changing it changes what is found, not just what is drawn. Max Levels Shown
is the cosmetic one.
- A doji takes no part. An A Level or V Level needs one candle of each colour, so a pair
containing a doji is not one.
- DBO to DBO upgrades the existing level in place. The count of plain Double Breakouts therefore goes down by one each time a chain completes, because that level has become
something else.
- An internal cap of 120 stored levels keeps the drawing count inside TradingView's limits. On a
very long history the oldest are dropped.
- Detection is purely structural. It reports where these sequences occurred and nothing more. It
does not rank levels by quality, measure what happened next, or produce entries, targets or
stops.
HOW TO USE IT
A Double Breakout level marks the last place the other side stepped in before price left the
area. Traders commonly watch these for:
- A reaction on the first return, since price has not been back to that step since the breakout
- Direction from the side, where a bullish level below price and a bearish level above it frame
the range price is currently working in
- Confirmation against a higher timeframe read, where a level that agrees with the larger picture carries more weight than one that fights it
A DBO to DBO level is the same level after the market has argued about it twice. The road to it
was longer, and it sits where a completed move in one direction was undone by a completed move in the other.
The working pair is worth turning on while learning the tool. Watching A2 slide down step by step makes it obvious what the breakout is waiting for, and where it would have to close for anything to be drawn.
These are reference areas, not entry signals on their own. Use them alongside your own support
and resistance mapping, 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. 指标

Golden Trident | Swing-Anchored VWAP Trend SystemGolden Trident is a long-only, daily-timeframe trend-following strategy built specifically for XAUUSD (spot gold). Rather than relying on a lagging moving-average crossover or a single volatility band, it reads market structure directly — tracking swing highs and lows to determine trend direction — and pairs that with a volume-weighted anchor price that resets at every structural trend change. This gives the strategy a "fair value" reference line that adapts to each new trend leg rather than dragging a fixed-length average behind it.
The strategy is deliberately long-only. Gold has spent most of its liquid trading history in a secular uptrend, and countertrend short entries were found to meaningfully drag down both total return and risk-adjusted performance without adding diversification benefit — so the system simply steps to the sidelines when structure turns bearish, rather than fighting the dominant trend.
Position sizing is intentionally simple: a fixed percentage of equity per trade, compounding as equity grows. Risk management is handled by a single wide "catastrophe" stop rather than a tight trailing stop — the strategy is designed to exit on genuine trend reversal, not to be shaken out by normal daily noise.
How It Works
Swing Structure (Trigger): The strategy tracks rolling swing highs and lows over a configurable lookback. When the most recent extreme is a new high, structure is bullish; when it's a new low, structure is bearish.
Anchored VWAP (Trend Reference): Each time structure flips, the volume-weighted average price calculation resets and begins accumulating fresh from that point — producing a trend-relative fair-value line rather than a static average.
EMA200 Filter (Structure Confirmation): Long entries additionally require price to be trading above the 200-period EMA, keeping trades aligned with the macro trend.
Chop Filter (Volatility Gate): Entries are blocked when recent price range is too narrow relative to ATR — this avoids entering on structural "flips" that occur during sideways consolidation, where they're most likely to reverse immediately.
Exit: Positions close purely on structural trend reversal. No trailing stop is used, since research during development found trailing exits tended to cap winning trades prematurely without meaningfully reducing losses.
Backstop Stop: A wide ATR-based stop exists purely as disaster protection for extreme, unexpected moves — it is not intended to be part of normal trade management.
Features
Swing-structure trend detection (not a lagging indicator crossover)
Self-resetting anchored VWAP trend reference
Optional EMA200 macro trend filter
Optional ATR-based chop/consolidation filter
Configurable backtest date range
Trade outcome visualization (colored boxes showing each closed trade's entry-to-exit range)
Live dashboard showing current structure, volatility state, position size, and open P/L
Gold-themed visual design with gradient trend fill and directional bar coloring
Tips for Use
Timeframe: Designed and tested on the daily chart. Shorter timeframes will likely need proportionally shorter swing/EMA/ATR lengths.
Data quality matters: Backtest only over periods with clean, liquid, consistently-quoted price and volume data. Very long historical ranges on XAUUSD may include gold-standard-era pricing or unreliable volume that will distort results — the built-in date range inputs default to 2010 onward for this reason.
Position sizing: The default equity percentage is aggressive. Test at a lower size first and scale up only after reviewing max drawdown and worst losing-streak length for your specific test window — position sizing should reflect your own risk tolerance, not just backtest profit factor.
Shorting: Short entries exist as a toggle for experimentation, but are off by default based on backtest performance on gold's historical trend bias. Re-enabling changes the strategy's risk profile meaningfully.
Not financial advice: This is a backtesting and educational tool. Past performance on historical data does not guarantee future results.
策略

Aurora_FLux_VWAP_V2 (Drizzle_ALGO56)Aurora Flux is an adaptive VWAP system that combines volume-weighted price analysis, dynamic volatility envelopes, ADX trend filtering, and lower-timeframe wick volume analysis.
The indicator builds a volume-weighted VWAP core and expands its bands using both volume intensity and ADX strength. It then analyzes lower-timeframe data to measure how much volume occurred in the wicks versus the body of each candle. When strong wick volume coincides with price entering the outer zones, multi-layer intensity clouds light up to visualize buying or selling pressure.
The result is a clear visual map of rejection strength around the VWAP structure.
█ How It Works
⚪ Adaptive VWAP Core
Calculates either a Session VWAP or a Rolling VWAP together with volume-weighted variance. Band width is then modulated by two forces at the same time: current volume ratio and normalized ADX strength.
⚪ Wick Volume Analysis
Uses lower-timeframe data to split every chart candle into body volume and wick volume. A smoothed wick-volume ratio is calculated and used as the main intensity driver.
⚪ Intensity Mapping
When price enters the Extreme Zones (or the Main Channel depending on the selected mode), the current wick ratio is converted into an intensity value.
• Upper intensity reflects Sell pressure
• Lower intensity reflects Buy pressure
The intensity directly controls the opacity of the multi-layer clouds.
⚪ Session Average Tracking
A running average of Upper and Lower intensity is maintained throughout the session and displayed in the Dashboard. This shows the dominant rejection bias of the day.
█ How to Use
⚪ Identify Rejection Zones
Strong Extreme Zone clouds highlight price areas where high wick volume rejected the move.
These zones can act as high-quality support or resistance.
⚪ Read Buy vs Sell Pressure
• Rising Upper Intensity = increasing Sell pressure
• Rising Lower Intensity = increasing Buy pressure
Compare the current intensity with the Session Average to judge whether the rejection is stronger or weaker than the day’s average.
⚪ Combine with ADX
When ADX is high, the bands automatically widen. This reduces false signals during strong trends and keeps the focus on mean-reversion environments.
⚪ Classic Stdev Bands
Optional multi-level standard deviation bands can be enabled for additional fixed statistical reference levels.
█ Settings
• VWAP Mode (Rolling / Session)
• Base Deviation Multiplier & Volume Expansion Factor
• ADX Length, Smoothing and Band Multiplier
• Cloud Mode (Extreme Zone / Main VWAP / Both)
• Extreme Zone Offset & Width
• Main Channel and Extreme Zone colors (single color → automatic gradient)
• Automatic or Manual Lower Timeframe
• Wick Volume Ratio Threshold
• Dashboard HUD
█ Development Status
This indicator is still experimental and under active development.
Default settings are a starting point. Optimal results usually require manual fine-tuning of the Volume Expansion Factor, ADX Influence, Wick Threshold and Zone Width depending on the instrument and timeframe.
█ Feedback
Found a bug, have a suggestion, or want a specific improvement?
Feel free to reach out via TradingView private messages or leave a comment under the script. Feedback is highly appreciated.
█ Disclaimer
The content provided in this script is for educational and informational purposes only. It does not constitute financial advice, investment recommendations, or a solicitation to buy or sell any financial instruments. Past performance is not indicative of future results. All trading involves risk, and you are solely responsible for your own trading decisions. 指标

GM Fusion OscillatorCombo Oscillator – MACD + Stochastic + RSI + EMA
The Combo Oscillator combines four widely used technical indicators into one simple momentum oscillator:
MACD + Stochastic + RSI + EMA
Instead of switching between several indicators, the Combo Oscillator combines their information into one normalized and smoothed line.
🟢 GREEN / BULLISH SIGNAL
Generated when the combined oscillator crosses above the zero line, indicating a potential shift toward bullish momentum.
🔴 RED / BEARISH SIGNAL
Generated when the combined oscillator crosses below the zero line, indicating a potential shift toward bearish momentum.
The oscillator also uses ATR normalization, allowing indicators with different scales to work together in one combined calculation.
DEFAULT SETTINGS:
EMA: 21 / 55
MACD: 12 / 26 / 9
RSI: 14
Stochastic: 14 / 3 / 3
ATR: 14
Smoothing: 3
The major parameters are adjustable, allowing traders to experiment with different settings for different markets and timeframes.
The Combo Oscillator is designed as a momentum and confirmation tool, not as a standalone trading system.
For best use, combine it with your own analysis, market structure, support and resistance, liquidity and risk management.
One oscillator.
Four indicators.
One clear view of momentum. 指标

Combo Oscillator - MACD + Stoch + RSI + EMACombo Oscillator – MACD + Stochastic + RSI + EMA
The Combo Oscillator combines four widely used technical indicators into one simple momentum oscillator:
MACD + Stochastic + RSI + EMA
Instead of switching between several indicators, the Combo Oscillator combines their information into one normalized and smoothed line.
🟢 GREEN / BULLISH SIGNAL
Generated when the combined oscillator crosses above the zero line, indicating a potential shift toward bullish momentum.
🔴 RED / BEARISH SIGNAL
Generated when the combined oscillator crosses below the zero line, indicating a potential shift toward bearish momentum.
The oscillator also uses ATR normalization, allowing indicators with different scales to work together in one combined calculation.
DEFAULT SETTINGS:
EMA: 21 / 55
MACD: 12 / 26 / 9
RSI: 14
Stochastic: 14 / 3 / 3
ATR: 14
Smoothing: 3
The major parameters are adjustable, allowing traders to experiment with different settings for different markets and timeframes.
The Combo Oscillator is designed as a momentum and confirmation tool, not as a standalone trading system.
For best use, combine it with your own analysis, market structure, support and resistance, liquidity and risk management.
One oscillator.
Four indicators.
One clear view of momentum. 指标

Monday High & Low - ProWelcome to the Monday Range & Liquidity Sweeps indicator, a powerful and clean tool designed specifically for Range Traders and Smart Money Concepts (SMC) enthusiasts.
📊 The Core Concept:
According to market data and price action algorithms, the first day of the trading week sets the tone.
Monday High acts as a major Resistance and a pool of Buy-Side Liquidity (BSL).
Monday Low acts as a strong Support and a pool of Sell-Side Liquidity (SSL).
💡 How to Trade with this Indicator:
This indicator automatically plots the Monday High and Low from the exact candles they were formed, extending cleanly to the right. You can use these levels to trade high-probability liquidity sweeps:
🐻 Bearish Setup (Short): Wait for the market to sweep the Monday High (grabbing liquidity). If the price fails to hold above and closes back inside the Monday range, it indicates a false breakout. You can enter a short position targeting the opposite liquidity pool: the Monday Low.
🐂 Bullish Setup (Long): Wait for the market to sweep the Monday Low. If the price rejects and closes back inside the Monday range, the bearish momentum is likely trapped. You can enter a long position targeting the opposite liquidity pool: the Monday High.
⚙️ Key Features (Pro Customization):
Custom Timezone (UTC Offset): Manually input your UTC offset in the settings to align the Monday range perfectly with your trading session (e.g., New York, London, or Local Time).
Clean Visuals: Adjust line thickness, color, transparency, and style (Solid, Dotted, Dashed) so it blends perfectly with your chart theme.
Minimalist Design: Only draws what you need. Labels and lines automatically extend without cluttering your historical price action.
Drop a like and leave a comment if this helps your trading week. Trade safe and always manage your risk! 指标

SMC EngineSMC Engine
Overview
SMC Engine is a market-context indicator designed to identify potential liquidity sweeps and directional pressure around a selected session range.
The indicator combines an open-based NY range, candle spread analysis, and lower-timeframe volume pressure to classify market conditions such as Stop Hunts, directional aggression, and breakouts.
The default session is 09:30–10:30 New York time, but the session and timezone can be adjusted from the settings.
Key Features
Open-based NY session range
Automatic range box visualization
Projected range levels after the session
Candle spread anomaly detection
Lower-timeframe volume pressure
Stop Hunt High detection
Stop Hunt Low detection
Bullish Aggression detection
Bearish Aggression detection
Breakout Up/Down classification
Real-time sentiment dashboard
How It Works
1. Open-Based NY Range
During the selected session, the indicator tracks the highest and lowest candle opening prices.
These levels form the open-based range used by the sentiment engine.
Note: This is an open-based range, not a conventional opening range calculated from candle highs and lows.
2. Spread Analysis
The indicator compares the current candle's spread (High - Low) with its average spread over the selected baseline period.
Default settings:
Spread Baseline: 50 bars
Spread Anomaly Multiplier: 2.0
When the current spread exceeds the baseline multiplied by the anomaly multiplier, it is classified as a spread anomaly.
3. Volume Pressure
The indicator uses lower-timeframe candle data to estimate directional volume pressure.
Lower-timeframe close > open → volume is counted as positive
Lower-timeframe close < open → volume is counted as negative
Lower-timeframe close = open → volume is ignored
The resulting value is used as a volume-pressure proxy.
This is not true bid/ask volume delta.
Sentiment Conditions
Stop Hunt High
A Stop Hunt High is identified when:
The candle has an unusually large spread
Price trades above the open-based range high
The candle closes back at or below that level
Lower-timeframe volume pressure is negative
The signal is displayed with an orange downward triangle.
This can be viewed as a potential bearish liquidity-sweep setup.
Stop Hunt Low
A Stop Hunt Low is identified when:
The candle has an unusually large spread
Price trades below the open-based range low
The candle closes back at or above that level
Lower-timeframe volume pressure is positive
The signal is displayed with an orange upward triangle.
This can be viewed as a potential bullish liquidity-sweep setup.
Bullish / Bearish Aggression
When a spread anomaly occurs without meeting the Stop Hunt conditions, the indicator evaluates candle direction and volume pressure to identify:
Bullish Aggression
Bearish Aggression
Air Pocket/Uncertain
Breakouts
When the spread is not classified as an anomaly, the indicator can identify:
Breakout Up
Breakout Down
These classifications are based on price closing beyond the open-based range together with corresponding volume pressure.
How to Use It
The indicator is primarily intended as a market-context and confirmation tool, rather than a standalone buy/sell system
A simple way to use the Stop Hunt signals is:
Bullish Setup
Stop Hunt Low → wait for confirmation → consider long
When an orange Stop Hunt Low appears, avoid entering immediately. Observe the following price action and look for bullish confirmation before considering a long trade.
Bearish Setup
Stop Hunt High → wait for confirmation → consider short
When an orange Stop Hunt High appears, avoid entering immediately. Observe the following price action and look for bearish confirmation before considering a short trade.
The Stop Hunt signal should therefore be treated as a setup/area of interest, not an automatic entry signal.
Traders can combine the signal with their own market structure, price action, risk management, and higher-timeframe analysis.
Dashboard
The dashboard displays:
VSA Price Spread — current candle spread in ticks
Baseline Spread — average spread used for anomaly detection
Volume Pressure — calculated lower-timeframe directional volume pressure
Current Sentiment — current classification produced by the engine
Recommended Usage
The default configuration is designed around using a lower timeframe for volume-pressure analysis, such as a 1-minute lower timeframe on a 5-minute chart.
The appropriate settings can vary by market, symbol, and timeframe, so traders should test the indicator under the conditions in which they intend to use it.
Important Limitations
The range is based on candle opens, not highs and lows.
Volume Pressure is a directional-volume proxy and should not be interpreted as true bid/ask delta.
A Stop Hunt signal does not guarantee a reversal or profitable trade.
Breakout classifications do not guarantee that a breakout will continue.
The indicator does not determine stop-loss placement, take-profit levels, or position sizing.
Market conditions, liquidity, and data-feed characteristics can affect the behavior of lower-timeframe calculations.
Traders should independently test and validate the indicator before using it in live trading.
SMC Engine is intended for market analysis and educational purposes and should be used together with appropriate risk management. 指标

Buy-Sell with Adaptive Market Intelligence Engine
Adaptive Market Intelligence Engine - Structure and Trend Confluence
---------------------------------------
📊 Overview
Adaptive Market Intelligence Engine is a multi-layer market analysis indicator designed to interpret trend, market structure, momentum, volatility, participation, and higher-timeframe context through a unified weight-of-evidence framework.
The purpose of the indicator is not to predict every price movement or produce frequent trade signals.
Instead, it attempts to answer three practical questions:
• Is the market trending, ranging, compressing, or expanding?
• Which side currently has stronger technical evidence: buyers or sellers?
• Has a sufficiently strong new directional trend developed to justify a BUY or SELL signal?
The indicator combines several independent categories of technical evidence while attempting to reduce duplicated information and chart clutter.
Its primary components include:
• Major market structure
• HH/HL and LH/LL structural progression
• BOS and CHOCH detection
• Trend regime classification
• EMA trend structure
• Higher-timeframe confirmation
• VWAP / mean positioning
• RSI momentum
• MACD momentum
• ADX and directional movement
• Volume participation
• ATR volatility analysis
• Volatility compression detection
• Bullish and bearish confluence scores
• One-signal-per-trend state logic
• Structural retest identification
• Market intelligence dashboard
The indicator is intended to work as an analytical framework rather than as a standalone mechanical trading system.
---------------------------------------
🧠 Core Philosophy
Markets rarely move because of one technical condition.
An EMA crossover alone, RSI reading alone, volume spike alone, or isolated market-structure break can provide incomplete information.
This indicator therefore uses a weight-of-evidence approach.
Different technical categories contribute to a bullish or bearish score, and directional signals are generated only when several conditions align simultaneously.
The goal is to separate:
Trend from Temporary movement and Directional expansion from Range-bound market noise.
---------------------------------------
🔄 Market Regime Engine
Before evaluating directional signals, the indicator attempts to classify the current market environment.
The main regime states are:
• TRENDING
• TREND EXPANSION
• VOL EXPANSION
• RANGE
• COMPRESSION
• TRANSITION
The regime engine uses a combination of:
• ADX
• EMA separation relative to ATR
• ATR expansion
• Bollinger Bandwidth compression
This is important because the same technical signal can behave differently depending on market conditions.
For example, repeated structure breaks occurring inside a narrow range are intentionally treated differently from breaks occurring during an established directional expansion.
BOS and CHOCH detection is therefore suppressed when the engine identifies significant range-bound or compression conditions.
---------------------------------------
🟢 Bullish Market Structure
Bullish structural development is identified through sequences involving:
Higher Highs and Higher Lows.
Instead of placing HH and HL text labels across the chart, the indicator represents qualifying bullish structural progression using low-opacity green gradient bands.
The bands are designed to visually communicate directional structure without covering the underlying candles.
A structural band is not automatically created for every small pivot.
The movement must satisfy configurable structure-strength and ATR-distance requirements.
This helps reduce visual noise created by minor oscillations.
---------------------------------------
🔴 Bearish Market Structure
Bearish structure is evaluated through:
Lower Highs and Lower Lows.
Qualifying bearish sequences are represented using low-opacity red gradient bands.
As with bullish structure, minor swings are filtered using structural strength and ATR-based movement requirements.
The purpose is to highlight meaningful directional structure rather than drawing every short-term fluctuation.
---------------------------------------
🔀 BOS and CHOCH
The indicator also tracks external market structure.
BOS = Break of Structure
CHOCH = Change of Character
These events are displayed using dashed structural break lines.
A bullish BOS generally represents continuation of bullish external structure.
A bearish BOS represents continuation of bearish external structure.
CHOCH identifies a structure break occurring against the previously established structural direction.
However, BOS and CHOCH are not treated as automatic trade signals.
They are one component of the wider market intelligence engine.
BOS/CHOCH events are also filtered when the market is classified as significantly range-bound or compressed.
This is intended to reduce repeated structure-break markings inside sideways markets.
---------------------------------------
📈 Trend Engine
The default trend model uses:
Fast EMA: 21
Slow EMA: 50
A bullish trend condition requires bullish EMA alignment together with supportive price positioning.
A bearish trend condition requires bearish EMA alignment together with supportive price positioning.
The EMA ribbon provides a simple visual representation of the prevailing trend relationship.
These values are configurable.
---------------------------------------
🌐 Higher-Timeframe Confirmation
The engine can use a higher timeframe as an additional directional filter.
Higher-timeframe confirmation evaluates:
• Higher-timeframe price
• Higher-timeframe fast EMA
• Higher-timeframe slow EMA
Confirmed higher-timeframe data is used rather than the developing higher-timeframe candle.
This improves stability but introduces additional confirmation delay.
The selected higher timeframe must be greater than the chart timeframe.
For example:
15-minute chart → 1H or 4H confirmation
1H chart → 4H or Daily confirmation
Using the same or a lower timeframe as the HTF setting is intentionally prevented.
---------------------------------------
📍 VWAP / Mean Location
On intraday charts, the indicator uses session VWAP as a directional location reference.
Above VWAP supports bullish evidence.
Below VWAP supports bearish evidence.
On non-intraday charts, an EMA-based mean reference is used instead.
The purpose of this component is not to create VWAP crossover signals.
It provides context regarding where price is trading relative to an important market mean.
---------------------------------------
⚡ Momentum Engine
Momentum confirmation uses two separate measurements:
RSI
and
MACD Histogram.
The default bullish RSI threshold is above 52.
The default bearish RSI threshold is below 48.
The MACD histogram contributes additional directional momentum confirmation.
Momentum is intentionally only one component of the complete score.
A strong RSI reading by itself cannot produce a trade signal.
---------------------------------------
📊 ADX and Directional Movement
ADX and DMI are used to evaluate trend quality.
The engine considers:
ADX strength
*
+DI / -DI directional dominance.
Bullish directional confirmation requires sufficient ADX together with +DI dominance.
Bearish directional confirmation requires sufficient ADX together with -DI dominance.
This helps differentiate directional movement from weak oscillation.
---------------------------------------
⚡ Volume Participation
Where reliable volume data is available, the engine evaluates current volume relative to its average.
Bullish participation favors increased volume accompanying bullish price movement.
Bearish participation favors increased volume accompanying bearish price movement.
Volume can also be required as part of the final signal confirmation.
For symbols where meaningful volume information is unavailable, the engine does not automatically treat missing volume as bearish or bullish confirmation.
---------------------------------------
🌡️ Volatility Analysis
ATR is used throughout the indicator as a volatility-normalized measurement.
This allows several conditions to adapt more naturally across instruments with different price scales.
ATR is used in areas including:
• Structure strength
• Swing-leg measurement
• Volatility expansion
• Structural break buffering
• Retest tolerance
• Signal positioning
The indicator also compares current ATR against a longer ATR baseline to identify volatility expansion.
---------------------------------------
📉 Compression Detection
Bollinger Bandwidth is used internally to help identify volatility compression.
The Bollinger Bands themselves are not plotted.
When bandwidth contracts materially relative to its recent baseline, the engine can classify the environment as COMPRESSION.
During these conditions, new structural signals are filtered more aggressively.
---------------------------------------
🧮 Bull and Bear Confluence Scores
The engine independently calculates bullish and bearish scores from 0 to 100.
The current weighting framework is:
Current timeframe trend — 15 points
Higher-timeframe trend — 20 points
Major market structure — 20 points
Momentum — 15 points
VWAP / mean location — 10 points
Volume participation — 10 points
ADX / directional movement — 10 points
Total possible score:
100
Bullish and bearish evidence are calculated separately.
The difference between the two scores is also evaluated.
This prevents a high bullish score from automatically being considered strong when bearish evidence is simultaneously elevated.
---------------------------------------
🎯 One Signal Per New Trend
One of the most important features of the indicator is its trend-state signal engine.
The indicator is intentionally designed NOT to print BUY or SELL signals repeatedly throughout the same trend.
Once a new bullish trend satisfies the complete confirmation framework:
BUY is generated once.
Afterward:
• Additional BOS events do not create another BUY.
• Retests do not create another BUY.
• New momentum confirmations do not create another BUY.
• Continuation candles do not create another BUY.
The bullish trend remains active until the internal trend-state engine determines that the trend has genuinely deteriorated or a confirmed bearish trend takes control.
The same principle applies to SELL signals.
This produces a sequence closer to:
Neutral → New Bull Trend → BUY → Bull Trend Active
or
Neutral → New Bear Trend → SELL → Bear Trend Active
rather than repeatedly generating signals during the same directional move.
---------------------------------------
🏷️ A and A+ Signal Grades
Signals may display an A or A+ classification.
These labels refer only to the amount of technical confluence present at the time of confirmation.
They are NOT historical win-rate statistics.
They do NOT represent a guaranteed probability of success.
A+ simply represents stronger alignment within the indicator's internal scoring framework than the standard A condition.
---------------------------------------
🔁 Trend Reset Logic
The engine does not immediately reset a trend because of one weak candle.
Instead, it tracks sustained deterioration.
The default Trend Reset Bars value is:
6 bars.
A bullish trend remains active while bullish conditions remain sufficiently healthy.
If the structure deteriorates for the required number of confirmed bars, the state returns to neutral and becomes eligible to identify a future trend.
An opposite fully confirmed trend can also transition the state directly.
This helps prevent repeated BUY → BUY → BUY or SELL → SELL → SELL signals during ordinary pullbacks.
---------------------------------------
🔄 Structural Retests
After a valid structural break, the indicator can identify a return toward the broken level.
Bullish breaks may produce an R>S RETEST.
Bearish breaks may produce an S>R RETEST.
Retests require price to return within an ATR-based tolerance and subsequently close back on the expected side of the level.
Retest labels are analytical information.
They do not independently generate another trade signal when a trend signal has already been used.
---------------------------------------
🧭 Premium, Discount and Equilibrium
The latest confirmed major swing high and major swing low are also used to estimate the active structural range.
Price is classified as:
PREMIUM
DISCOUNT
EQUILIBRIUM.
These classifications are contextual only.
They should not be interpreted as automatic reversal zones.
For example, price can remain in premium during a strong uptrend or remain in discount during a strong downtrend.
---------------------------------------
⚙️ Suggested Starting Configuration
The default settings are designed as a balanced starting point rather than universally optimal parameters.
Major Swing Length: 8
Fast EMA: 21
Slow EMA: 50
ADX Trend Threshold: 22
Minimum Signal Score: 86
Minimum Bull/Bear Advantage: 25
Trend Reset Bars: 6
Consecutive Structure Pairs: 2
Users should evaluate different settings according to the instrument, timeframe, volatility characteristics, and their own trading methodology.
Avoid changing parameters simply to improve historical appearance.
---------------------------------------
✅ How to Use the Indicator
The preferred workflow is:
1. Check Market Regime.
If RANGE or COMPRESSION is displayed, directional signals should be treated cautiously.
2. Check Bull Score vs Bear Score.
Look for meaningful separation rather than nearly equal scores.
3. Check Major Structure.
Determine whether the external structure supports the intended direction.
4. Check HTF.
Higher-timeframe agreement generally represents stronger directional alignment.
5. Observe the gradient structure bands.
These provide visual context regarding recent bullish or bearish structural progression.
6. Check price relative to VWAP / Mean.
This adds location context.
7. Wait for a confirmed new-trend signal.
Avoid anticipating the BUY or SELL before the complete engine confirms it.
8. Perform independent risk analysis.
Entry price, stop placement, targets, position size, option strike selection, and portfolio risk should be determined separately.
---------------------------------------
🚫 When to Avoid Using Signals
You should generally avoid relying heavily on directional signals when:
• Market Regime shows RANGE or COMPRESSION.
• Bull and Bear scores are very close.
• Price is reacting violently around major news.
• Liquidity is poor.
• The instrument has irregular or unreliable price/volume data.
• The chosen timeframe produces excessive market noise.
• A signal appears too close to an important external event or known gap-risk period.
No technical indicator can eliminate these market risks.
---------------------------------------
⏱️ Important Pivot Confirmation Behavior
The market-structure engine uses confirmed pivot highs and pivot lows.
A pivot cannot be confirmed until the required number of bars has formed to its right.
With a Major Swing Length of 8, for example, a major pivot requires eight subsequent bars before confirmation.
After confirmation, structural graphics can be anchored visually to the original pivot bar.
This means the historical chart can show a structural band beginning at the earlier pivot even though that pivot was not known to the indicator in real time until later.
This is an important distinction.
The structure graphics should therefore be interpreted as a confirmed historical map of market structure, NOT as proof that the swing was identifiable at the exact pivot candle.
Trade signals themselves are evaluated on confirmed bars using information available to the signal engine at that time.
---------------------------------------
🕒 Higher-Timeframe Timing
Higher-timeframe confirmation intentionally uses completed higher-timeframe information.
This reduces instability associated with using a still-forming HTF candle.
The tradeoff is confirmation delay.
For example, a strong movement can begin before the previous completed higher-timeframe candle has confirmed the same direction.
This indicator intentionally favors confirmation over immediate reaction.
---------------------------------------
🔬 What Makes This Indicator Different
The intention behind Adaptive Market Intelligence Engine is not to combine unrelated indicators simply to produce more signals.
Each component has a defined analytical role:
EMA structure → trend
HTF → broader directional context
Market structure → price-action direction
RSI / MACD → momentum
VWAP / mean → location
Volume → participation
ADX / DMI → directional trend quality
ATR → volatility normalization
Bandwidth → compression / regime
State machine → signal frequency control
The final result is therefore based on agreement between multiple categories of market evidence rather than repeated confirmation from several indicators measuring essentially the same thing.
Another important design choice is that structural information and trade signals are separated.
BOS, CHOCH, gradient structure bands, retests, support/resistance information, and dashboard states can continue updating without generating repeated BUY or SELL labels.
---------------------------------------
🛡️ Risk Notice
This indicator is intended for technical analysis and educational use.
BUY and SELL labels represent conditions produced by the indicator's internal rules. They are not guarantees of future price movement and should not be interpreted as personalized investment advice.
Markets involve risk, and technical conditions can fail.
Users should independently evaluate price structure, liquidity, volatility, position sizing, stop placement, trading costs, and event risk before making any trading decision.
Past chart behavior does not guarantee future results.
指标

指标

Trade Coach-JournalEvery trader knows they should journal. Almost nobody does it, and the ones who do
mostly end up with a spreadsheet of numbers they never open again.
The problem isn't discipline. It's that a journal tells you what happened last month,
and the moment you actually need it is right now — with your finger over the button,
about to take a trade at 2pm on a Thursday after two losses, which is exactly the
combination that has cost you money forty times before.
This puts your journal on the chart and reduces it to a verdict that changes as your
day does. At 9:50am it might say:
GOOD WINDOW
this is when you trade best
By 2:15pm, after a loss, the same panel says:
STOP · DONE TODAY
weak window and you're coming off a loss
Nothing in between those two moments came from the market. It came from you, forty
trades ago, doing the same thing.
THE PART THAT ACTUALLY CHANGES THINGS
Timing patterns are useful. Knowing your afternoons win 30% is worth something. But
you can't decide to make afternoons behave differently.
You can decide to stop chasing.
So every trade can carry tags — words you invent, starting with #. Log a trade you
chased as:
8/17 13:35 S 29140 14:10 29168.75 #fomo
Do that twenty times and the panel stops talking about the clock:
TOP FIX
#fomo trades win 18% (n=22)
→ stop taking #fomo entries
That's a different kind of sentence than "your Tuesdays are weak." It names a habit,
it's yours, and you can change it tomorrow morning. Tag findings outrank timing
findings in the panel for exactly that reason.
Use whatever vocabulary fits how you actually trade — #plan, #revenge, #late, #news,
#tired, #a+. The only requirement is honesty. Putting #plan on a trade you chased
makes the whole thing useless, and nobody sees this but you.
LOGGING A TRADE
One line, in the settings:
8/17 9:45 L 29048 10:15 29096.5 #plan
August 17th, 9:45am, long from 29048, out at 10:15 at 29096.50, planned setup.
The parser tries hard not to make you think about formatting. These four lines are
the same trade:
8/17 9:45 L 29048 10:15 29096.5
8/17, 9:45, L, 29048, 10:15, 29096.5
08-17 0945 LONG 29048 1015 29096.5
2026-08-17 09:45 buy 29048 10:15 29096.5
Dates take 8/17, 08-17, 2026-08-17, 0817 or 20260817. Times take 9:45, 09:45 or 0945.
Side takes L/S, LONG/SHORT or BUY/SELL in any case. Spaces and commas both work. The
year is set once in settings so you're not retyping it. Exit time is optional — leave
it out and you keep every statistic, you just lose the line drawn on the chart. An
exit time earlier than the entry is read as an overnight hold.
Times should match the clock on your chart's time axis.
WHAT YOU SEE
Under the verdict, the panel is deliberately short:
now: pm ▰▰▰▱▱▱▱▱▱▱ 30% n=20
form ●●○○●○○○●○
equity █▇▆▄▅▃▂▁
today 3 trades · -2.1R
Four lines, and the third one is the one that hurts. Your form dots can look fine
while the equity sparkline slides down the page — that's the shape of winning often
and losing big, and it's the most common way a trader who looks profitable isn't.
The footer says the same thing in numbers:
40 trades · 67% win · -0.12R avg
A green win rate sitting next to a red R average is worth more than any entry signal
you'll read this year.
Every statistic carries its sample count, and rows stay grey until they've earned an
opinion. A grey row means the script doesn't know yet — more honest than a confident
percentage built on six trades.
Turn on "show full detail" for the full breakdown: morning against afternoon, long
against short, after-loss, average winner against average loser, worst losing streak,
and every tag ranked by how often you use it.
On the chart itself each trade draws where it happened — a triangle at the entry, a
line to the exit, the R result labeled, tags in the tooltip.
ALERTS
The panel only helps if you're looking at it, and the moments you most need it are
the moments you're not.
Entering a weak window
Daily stop hit
STOP for today
Set them once. Then the coach speaks first, and you don't have to remember to ask.
ON THE NEURAL NETWORK IN GROUP 4
There's a small neural network in the advanced settings that trains on your logged
trades and estimates whether a trade taken under current conditions would win. Most
of the time it says this:
verdict not significant
vs control 58% vs 62%
That second line is the whole reason to trust it. Alongside the real network, the
script trains an identical one on deliberately shuffled labels — a model that cannot
possibly know anything. If the real network can't clearly beat that, its opinion is
suppressed and the panel says so.
A network with this many parameters needs several hundred trades before it can
separate a pattern from a coincidence. It will probably read "not significant" for a
long time, and that's the safeguard working rather than the tool failing.
Nothing in the verdict, TOP FIX, or the pattern tables involves the model. That's all
plain counting, which is why it becomes usable around 20 trades and trustworthy around
40 — while the network is still deciding whether it knows anything at all.
IF SOMETHING LOOKS WRONG
The panel tells you which of three things went wrong rather than making you guess:
⚠ 3 lines unreadable (line 12)
Line 12 didn't parse. Usually a missing price, a typo in the date, or a side it
didn't recognize.
⚠ 8 trades off-chart — check timezone
The timestamps don't land on a loaded bar. Either scroll left for more history, or
your times aren't in the exchange's timezone.
⚠ 5 trades too early on this chart
The script needs 220 bars of warmup before it can read market context. Load more
history or move to a higher timeframe.
If it reads "0 of 40," everything was rejected or fell outside the chart. Work
through those three in order.
This is a review tool. It reports patterns in trades you've already taken, generates
no entry signals, and makes no claim about future results. What it shows you is your
own history. 指标

Divergence Confirmation Oscillator [Pineify]Divergence Confirmation Oscillator
Overview
This RSI divergence indicator starts from one timing fact: a pivot is knowable only after its right-side bars close. It scores regular and hidden events, showing both the formation location and the later confirmation time.
Problem Definition
A divergence line drawn back to a pivot can look actionable there, although several bars were still required to confirm it. Binary markers also give equal weight to shallow disagreements and well-separated price/RSI moves. The failures are timing ambiguity and absent evidence quality. This script exposes the delay and ranks completed events; it does not assume divergence predicts reversal.
Design Rationale
Price pivots are the anchors, with RSI sampled on those exact bars. A solid diagonal shows formation; a dotted track from the second pivot to the confirmation bar shows knowledge time. Quality combines spacing, ATR-normalized price movement, RSI movement, threshold context, and RSI departure by confirmation. ATR avoids raw-point scale dependence. Unconfirmed turns would appear earlier, but would break the timing invariant. The chosen tradeoff is delay and selectivity for auditable events.
Key Features
Confirmed regular/hidden bullish and bearish divergence.
Adjustable 0–100 quality gate.
Pivot bridge plus confirmation wait track.
Bounded follow-through, invalidation, or expiry state.
Four close-confirmed alerts and optional dashboard.
How It Works
RSI uses closes. Price highs/lows become pivots only after the configured bars on both sides; processing occurs when the right-side bar closes.
Regular bullish means lower price low and higher RSI; hidden bullish means higher price low and lower RSI. Bearish definitions are symmetric at highs.
Only consecutive confirmed pivots inside the separation range interact. Each new pivot becomes the next reference even if no event passes.
The score weights spacing 25%, ATR-normalized price displacement 25%, RSI displacement 25%, threshold context 15%, and departure from the second pivot 10%. Price ATR and RSI delta inputs define full component scores.
Passing events receive a solid bridge, a dotted pivot-to-confirmation track, and a REG/HID label with Q at confirmation. Nearby labels rotate through three vertical lanes.
After confirmation, the watch records favorable ATR movement or RSI midpoint reclaim as follow-through, a buffered close beyond the pivot as invalidation, or the time limit as expiry. Circles and crosses mark these later outcomes without duplicate edge text; they are not alert signals.
Warm-up requires valid RSI, ATR, and pivot history; invalid spacing suppresses events.
How Multiple Indicators Work Together
Price pivots supply auditable anchors; RSI measures momentum there; ATR normalizes price distance; the score ranks the completed disagreement; and the lifecycle observes only later evidence. Removing any part changes the result: without pivots timing is undefined, without RSI divergence disappears, without ATR price scale leaks into quality, and without the wait track confirmation delay is hidden. This is one causal chain, not an unrelated mashup.
Trading Ideas and Insights
Regular events show price extending while RSI disagrees; hidden events show price holding structure while RSI pulls back. Compare the confirmation bar, Q, and lifecycle before forming a thesis. Repeated invalidation suggests retuning the pivot scale. The indicator supplies no entry, stop, size, or expected return.
Unique Aspects
Confirmation geometry is the structural contribution. The diagonal shows where the relationship formed; the dotted track and label show when it became knowable. Five score components rank evidence without altering RSI, and the bounded lifecycle keeps later behavior separate. A historical bridge is therefore created at confirmation, not proof of availability at the pivot.
How to Use
Start with defaults. Cyan/green lower labels show bullish confirmations; orange/red upper labels show bearish ones. Nearby labels rotate through three lanes. Follow the dotted track to confirmation and read Q. Triangles mark events; circles/crosses mark later outcomes named in the dashboard. Use the four close-confirmed alerts.
Customization
Short pivot sides reduce delay but admit noise; long sides select broader swings and confirm later. Separation limits choose pivots. Price ATR, RSI delta, quality, and context calibrate scoring. Follow distance, buffer, and window control lifecycle. Label spacing sets the clustering window. Visual layers and retained events are switchable.
Assumptions and Limitations
Confirmed does not mean correct or profitable. Pivots lag, and historical bridges are drawn only at confirmation. Events and lifecycle changes require a closed bar. ATR is scale, not probability. Consecutive-pivot logic can miss a relationship that skips an intermediate pivot. Trends may invalidate regular divergence; ranges may create many pivots; gaps, thin trading, parameters, and synthetic chart prices can distort results. The script uses chart OHLC only, requests no external or lower-timeframe data, infers no order flow, and performs no execution backtest.
Conclusion
The oscillator makes RSI divergence auditable through confirmed anchors, scale-aware quality, explicit knowledge time, and bounded follow-up. It exposes delay and evidence while preserving uncertainty.
指标

指标

TRMSF (Trend / Range Market-State Filter) v1.0The Trend / Range Market-State Filter is a TradingView Pine Script indicator designed to label XAUUSD and BTCUSD market conditions as BULLISH, BEARISH, or SIDEWAY. It gives your webhook system a market-state rule that decides whether BUY and SELL signals should be delivered to the Telegram group or paused.
The script combines two technical tools. First, it uses the Directional Movement Index (DMI). DMI provides the Average Directional Index (ADX), which measures trend strength, plus the positive and negative Directional Indicators (+DI and -DI), which indicate directional pressure. A BULLISH condition requires ADX to be above the trend threshold and +DI to be above -DI. A BEARISH condition requires ADX above the trend threshold and -DI above +DI. The default trend-strength threshold is ADX above 25.
Second, the script optionally uses the Choppiness Index (CHOP). CHOP does not determine bullish or bearish direction. Instead, it checks whether price action is relatively directional or ranging. Low CHOP readings support a trend, while high readings support a sideways market. With the default settings, CHOP below 38.2 confirms a directional trend and CHOP above 61.8 supports a SIDEWAY classification.
The script labels a market SIDEWAY when ADX is below 20 or CHOP is high. It intentionally keeps the last market state when readings fall in the middle zone, such as ADX between 20 and 25. This prevents frequent switching between states when the indicators hover near their thresholds.
A state change is confirmed only at the close of a candle. When the state changes, TradingView can send one of six exact webhook messages: BULLISH, BEARISH, or SIDEWAY for either XAUUSD or BTCUSD. BULLISH and BEARISH pause BUY/SELL messages for it; SIDEWAY re-enables them. XAUUSD and BTCUSD remain independent, so a BTCUSD pause does not affect XAUUSD signals. 指标

CCI Divergence Volume Breakout [josseliani]CCI Divergence Volume Breakout combines confirmed CCI divergence with a relative-volume candle level. It waits for a confirmed close beyond that candle's high or low before displaying a BUY or SELL signal, and it can optionally map Entry, a volume-candle-based stop, 1R, and historical R-reach statistics.
The default settings are tuned for XAUUSD on the 7-minute chart, but the indicator can be adapted to other instruments and timeframes. The statistics dashboard updates for the current symbol, timeframe, loaded chart history, and selected inputs, making it easy to see how different settings affect the sample size and historical R-reach rates.
→ HOW I USE IT
The default settings are the configuration I currently use for XAUUSD on the 7-minute chart.
Seven minutes is the favorite timeframe of my wonderful wave-analysis teacher. I built this version around the way he studies the market: first CCI divergence, then a meaningful volume spike. After that, he moves on to his own wave-analysis methods, including trendlines, wave count, structure, and broader market context. This indicator does not reproduce or replace his complete method. I use it as a supporting tool within my own wave analysis.
With the default settings, the script first searches for a confirmed CCI divergence. It then selects a qualifying volume candle connected to that divergence. The first search covers the divergence span; if necessary, it checks the area around the second pivot and then watches the post-confirmation candidate window. A qualifying candle must have volume of at least 1.5 times its 20-bar average.
For a bullish divergence, the high of the selected volume candle becomes the confirmation level. A BUY signal appears only after a candle closes above that high within the permitted breakout window.
For a bearish divergence, the low of the selected volume candle becomes the confirmation level. A SELL signal appears only after a candle closes below that low within the permitted breakout window.
The optional trade map starts from the open of the candle after the signal. It displays an Entry line, a stop behind the opposite edge of the exact volume candle plus the selected ATR delta, and a 1R reference target.
I use the dashboard to compare configurations rather than to treat one historical percentage as a promise. For example, changing the minimum volume multiple, pivot-matching radius, maximum distance between pivots, candidate-search window, or breakout window changes how often historical observations reached 0.5R, 1R, 2R, and 3R. This helps me see the trade-off between signal selectivity and historical excursion.
→ HOW THE INDICATOR WORKS
→ 1. Automatic CCI pivot scan
The script evaluates confirmed CCI pivots using strengths 3, 5, 7, and 9. The first pivot must be beyond the selected extreme threshold. The second pivot may form closer to the center of the oscillator.
A bullish divergence requires price to form a lower low while CCI forms a higher low. A bearish divergence requires price to form a higher high while CCI forms a lower high.
CCI pivots require bars on the right to become confirmed. For that reason, divergence lines are anchored to their historical pivot candles only after confirmation. They do not represent information that was available on the original pivot candle. BUY and SELL signals are evaluated only on confirmed closes after the divergence has been confirmed.
→ 2. Price-pivot matching
CCI and price do not always turn on exactly the same candle. Price Pivot Match Radius searches on both sides of each CCI endpoint for the corresponding price high or low.
Maximum Price/CCI Span Difference then checks that the two price pivots and the two CCI pivots describe approximately the same market swing. Lower values require tighter alignment; higher values allow more flexibility.
→ 3. Relative-volume candle selection
When a divergence becomes confirmed, the script first searches its pivot-to-pivot span for qualifying volume candles and selects the qualifying candle with the greatest reported volume. If that search finds none, it also checks the area around the second pivot. Search After Divergence then defines how many new bars after confirmation may supply a qualifying candidate. Volume is measured relative to its moving average:
Relative volume = candle volume / average volume
The default requirement is 1.5 times the 20-bar average. Candle direction is not used. For a bullish setup, the selected candle's high becomes the level. For a bearish setup, its low becomes the level.
Maximum Candidates controls how many qualifying volume levels one divergence may create. You can use up to three qualifying volume-candle candidates for each confirmed divergence. The default is one to keep the chart and signal source unambiguous. With this default, an already selected historical candidate fills the single slot; otherwise, the first qualifying post-confirmation candidate can fill it.
→ 4. Breakout confirmation and signal window
The volume level begins as gray. It changes to the bullish or bearish color only when price closes beyond it on a confirmed candle:
Bullish divergence: confirmed close above the selected volume candle's high.
Bearish divergence: confirmed close below the selected volume candle's low.
Breakout Signal Window defines how many bars that exact volume level is permitted to produce a BUY or SELL signal. The count begins when the level is created. Once the window expires, the level cannot trigger a late signal and cannot add a late observation to the statistics.
→ 5. Expired levels
Keep Expired Levels Visible separates signal validity from visual analysis.
When it is enabled, an unbroken level continues as a gray reference after its signal window expires. The expired line is visual only: it cannot produce a BUY or SELL signal and is not reactivated by a new calendar day, exchange day, or session. It remains visible until a newer qualifying volume level replaces it.
When Keep Expired Levels Visible is disabled, the gray line ends when its breakout signal window expires.
This indicator does not carry or re-arm levels according to a calendar boundary or timezone.
→ OPTIONAL TRADE MAP
The trade map is a visual measurement tool, not an automated order-placement system.
Entry: open of the candle following the confirmed BUY or SELL signal.
Stop: opposite edge of the exact volume candle that produced the signal, plus the selected ATR delta.
1R: one initial-risk unit from Entry.
The map helps compare the signal with the user's own execution, market structure, and risk plan. It is not financial advice and does not account for spread, slippage, commissions, or individual position sizing.
→ STATISTICS DASHBOARD
The dashboard reports historical reach rates for the current symbol, timeframe, loaded chart history, and selected inputs. It is designed for configuration comparison.
Completed: observations that reached the stop, reached 3R, or reached the maximum evaluation window.
Reached >=0.5R: completed observations whose maximum favorable excursion reached at least half of the initial risk.
Win Rate >=1R: completed observations that reached at least 1R before the stop.
Reached >=2R / >=3R: completed observations that reached those excursion levels before the stop.
Average MFE: average maximum favorable excursion, expressed in R, across completed observations.
Active / Invalid: observations still being evaluated and observations rejected because a valid positive risk distance could not be constructed.
Only breakouts confirmed while their volume level is inside its active signal window create statistical observations. An expired gray reference does not create a trade in the dashboard.
If the stop and a target fall inside the same historical candle, the script gives the stop priority because OHLC data cannot reveal the intrabar sequence. This is intentionally conservative.
These figures are descriptive historical measurements, not a backtest equity curve, not a profit factor, and not a forecast of future results. They can change with the data provider, symbol, timeframe, available history, and settings.
→ DEFAULT XAUUSD 7-MINUTE PRESET
CCI Length: 20
CCI Source: Typical Price (HLC3)
First Pivot Extreme Level: +/-150
Maximum Bars Between Pivots: 60
Price Pivot Match Radius: 7
Maximum Price/CCI Span Difference: 35%
Volume Average Length: 20
Minimum Volume x Average: 1.5
Search After Divergence: 15 bars
Maximum Candidates per Divergence: 1
Breakout Signal Window: 40 bars
Keep Expired Levels Visible: On
Show Entry / SL / 1R Markup: On
→ ALERTS
Bullish CCI Divergence: fires when a bullish divergence becomes confirmed.
Bearish CCI Divergence: fires when a bearish divergence becomes confirmed.
CCI Volume Long Signal: fires after a confirmed close above an active bullish volume level.
CCI Volume Short Signal: fires after a confirmed close below an active bearish volume level.
→ ORIGINALITY
This script is not a standard CCI divergence plot and not a generic volume-spike marker. Its purpose is to connect four separate stages in one workflow: multi-strength confirmed CCI divergence, price-pivot alignment, relative-volume candle mapping, and close-confirmed breakout authorization.
Candidate search, signal lifetime, visual reference lifetime, trade measurement, and historical R-reach analysis are kept separate. This makes it possible to change one part of the workflow and see how it affects signal frequency and the historical statistics without confusing an expired visual level with an active signal source.
→ LIMITATIONS
CCI, volume, and divergence are analytical tools, not guarantees of reversal or continuation. Pivot confirmation introduces an intentional delay. Historical volume and results can differ between data providers. Signals should be evaluated with market structure, liquidity, volatility, wave context, and personal risk management. The default preset was developed for how I analyze XAUUSD on 7 minutes; other markets and timeframes require independent testing.
指标

IPDA Year Map (M1D)IPDA Year Map draws the window the Interbank Price Delivery Algorithm is said to reference — the 20, 40 and 60 day look-back highs and lows — and puts it on a year of quarterly dividers rather than on a rolling snapshot. Every level carries how many sessions it has left before the candle that set it ages out of that window and stops being a reference at all.
The idea it implements is simple and it is the reason for every design decision below. The algorithm does not see a chart. It references days as data points inside a fixed look-back, and once a level falls outside 60 trading days it is purged. So the useful questions are which levels are still inside the window, where in the window they sit, and when each one leaves. Most range tools answer the first. This one answers all three.
The data range
Three nested look-backs, computed on daily closes: 20 days for the near-term read, 40 for the intermediate, 60 as the outer edge of what is still referenced. Each contributes its high and its low, drawn from the candle that actually set it and running forward to the current bar. Six extremes, and that is the whole object — the script does not go hunting for additional pools, order blocks or gaps to decorate it with.
The levels come from the daily timeframe regardless of what the chart is showing, so a 60-day window exists on a 1 minute chart where only a fortnight of chart candles is loaded.
Each level's origin is found from the offset back to the extreme candle, not from watching the value change. Those are different things and the difference is visible. A rolling minimum moves for two reasons: a lower low prints, or an older and deeper low ages out of the window and the minimum steps up to whatever is left. Only the first is a candle forming a level. Anchoring on "the value changed" attaches the line to the day the old low expired, which can be months after the candle that actually set the price.
One price is one line
A high made inside the last 20 sessions is simultaneously the 20, 40 and 60 day high. Drawn as three separate levels that is three lines and three captions stacked on a single row of pixels, and the top of the chart reads as one anonymous level while the lows — which genuinely differ — read as three.
Levels at the same price are drawn once, captioned with every window that shares them, as in 20·40·60d high. Each side of the range then shows exactly as many lines as it has distinct prices. The caption also tells you when a level stops being the tightest one: a shared high loses the 20 from the front of its name the day the 20-day window moves on without it.
Levels that are merely close rather than identical still collide on screen, so each caption steps out to its own lane along the right of the chart until it is clear of the ones above it. No two captions share a row at any zoom.
Equilibrium
Each window can carry the midpoint of its own high and low — the premium and discount divide of that range. Three switches, one per window.
They are drawn dotted and neutral. Dotted because an equilibrium is a calculated reference and not a price that traded, and neutral because a midpoint is neither bullish nor bearish. Each runs from its own window's left edge rather than from a candle, since no single candle sets a midpoint.
The roll-out countdown
Every level and every equilibrium carries the sessions it has left inside its window, printed on its caption as out 12d. When the count reaches its last session the caption reads out next instead.
The arithmetic is the window length less the level's age, both in trading days. A high set yesterday sits in the 20-day window for 19 more sessions; one set 19 sessions ago leaves at the next close. This is also why a 60-day level can date back around 83 calendar days — 60 trading days is twelve weeks, and 24 of those days are weekend.
Two things it states rather than glosses over. The count is measured from the last completed daily close, so today's session is one of them. And it is the origin candle leaving that is counted — the printed level only actually moves if nothing else still inside the window matches that price.
For a level shared by several windows the countdown belongs to the widest one, because that is when it stops being referenced at all. An equilibrium's countdown is the sooner of its two extremes, since it moves the moment either side of it ages out.
The shift, and the sixty day budget
A market structure shift here is a liquidity raid: a day taking out the highest high, or the lowest low, of the days before it. The look-back is an input. Raise it to ignore the smaller shifts inside a range and find only the major one — in ICT's framing the real shift can sit two or three months back, so a reading of no shift found is an instruction to widen the search before concluding there isn't one.
A confirmed shift stands for its full 60-day budget. A later raid in the same direction inside that budget is a mini shift within the range and does not restart the clock; only a raid in the opposite direction, or one arriving after the budget is spent, places a new anchor. Without that rule a trending market would reset the count every few sessions and the budget would never be seen counting down.
The raid is marked with a vertical, and three more are projected forward from it at 20, 40 and 60 trading days, weekends skipped. The last is the point at which the 60-day budget from that shift is spent. The projection counts weekdays; the panel counts sessions the symbol actually traded, so a weekday the exchange was closed puts the chart marker one session ahead of the panel's count, and the panel says so.
The panel reports the same thing in numbers: when the shift happened, sessions elapsed, and sessions left of the 60. Its header reads IN BUDGET while the count runs, DUE SOON at five or fewer sessions left, and BUDGET SPENT past 60 — at which point the projections come off the chart rather than being extended into a window that no longer exists.
There is only one forward boundary and the arithmetic is worth seeing, because it looks like two:
today + (60 − elapsed) = (shift + elapsed) + (60 − elapsed) = shift + 60
The cast-forward target and the budget expiry are the same date. Drawing both would be drawing one fact twice.
Anchored to the minute
A raid found on chart candles lands on the chart's own grid, so on a 1 hour chart the shift marker can sit up to 59 minutes away from where the level was actually taken. The raid candle is re-read at 1 minute resolution and the marker placed at the first minute the prior extreme was genuinely exceeded.
TradingView only serves intrabar data for recent history. Where it is not available the marker falls back to chart-candle resolution, the tag carries a ~ mark, and the panel says which of the two it used. It never claims a precision it did not get.
Open interest
Where the instrument publishes an open interest series, the panel reports its change over a set window — 20 trading days by default, matching the innermost look-back — against price over the same window, and states a reading only where the arithmetic supports one: a fall of 15% or more on flat price, both falling together, both rising together, or no clear read. Open interest is a daily series whatever the chart shows, so the reading is the same on a 1 minute chart and a daily one.
The two sign readings compare only the direction of two changes, so they sit behind a floor: the open interest change must be abnormal and price must not be flat. The default floor of 10% was measured rather than chosen. Over 400 sessions with the quarterly roll weeks removed, the 90th percentile of the 20-day open interest change was about 14% on NQ and about 7% on ES; 10% sits between them. NQ's open interest runs roughly twice as noisy as ES's, so a chart dedicated to one instrument may want the floor moved.
The contract roll is refused outright. A continuous contract's open interest collapses by a third to a half in a session as the front month is abandoned, then rebuilds over the following week, and a window that spans one cannot be read for positioning. The panel fetches the largest one-day jump inside the window and, above 12%, reads contract roll instead of a signal until the window has cleared it.
Most instruments publish nothing. On those the panel names the symbol it looked for and says the reading is unavailable. It does not print a zero, and it does not infer open interest from volume or anything else.
The year map
Quarterly dividers run across the loaded history and project forward, so the year reads as quadrants rather than as one rolling window. Two spacings are offered — three month and four month — because ICT's IPDA material carries both as worked examples anchored at different points. They are the same rule applied from different places, not rival calendars, which is why this is a choice of grid rather than a claim about which one is correct. The 60-day look-back and look-forward is measured from wherever a shift actually sits, independently of the grid.
Keeping it readable
The vertical tags ride two rails outside the range — budget markers on the inner rail, the calendar on the outer — offset by a fraction of the 60-day range rather than by ATR. On a chart spanning a year an ATR cushion is a rounding error, which puts the tags inside the candles and on the same row as the level captions.
Because the range is the unit of measurement throughout, the spacing holds on any instrument and any timeframe without tuning.
By default every extreme is drawn black. The six levels are liquidity, and liquidity is neither bullish nor bearish — a level tinted by the direction of the last shift would be a bias call the script has no basis for. Which window a level belongs to is in its caption.
Each line family carries its own colour and width: the 60, 40 and 20 day levels, the equilibriums, the shift verticals and the calendar dividers. The defaults are set for a grey chart, where the usual light-grey neutral is the background itself and vanishes, so the secondary families use a dark slate instead. A level shared by several windows takes the colour and width of its tightest one. The panel header field has its own colour.
Non-repainting
Every daily figure is read from confirmed candles. Nothing is revised once its candle has closed, and no level, count or projection moves in hindsight. The lines extend rightward to the current bar while they are live — that is the drawing tracking the present, not its history changing.
Alerts
Three: a new shift confirmed and the 60-day budget restarted, fired on the close of the bar that placed the anchor; five or fewer sessions left of the budget; and the budget spent. The last two are evaluated once per day.
What it will not do
It places no entries, exits, stops or targets, and it does not size a position. It draws no bias, no trend and no projection of where price is going. A shift marker says a level was taken on that day; it does not say what happens next.
It does not rank the levels against each other or tell you which one price is drawn to. Whether a level inside the window is worth trading is a judgement about context this script does not have — session, higher timeframe draw, and what the day has already done.
It has no opinion on open interest where none is published, and no opinion on direction where the arithmetic does not support one. Both are stated as unavailable rather than filled in.
Settings
Quarterly dividers with their spacing and how far forward they project; the 20, 40 and 60 day bands each on their own switch; equilibrium on its own switch per window; the shift clock panel with its raid look-back and its minute-anchoring toggle; open interest with its comparison window and abnormal-move floor; and label size, tag rail offset, whether tags sit above or below the candles, right offset, the panel header colour, and a colour and width for each line family.
Attribution
IPDA, the 20/40/60 day look-back and the market structure shift are concepts from ICT's public teaching material. This is an original implementation of them. No third-party code is used.
Disclaimer
This is a decision-support tool for discretionary ICT trading. It is not financial advice, and no market's past behaviour is indicative of future results. 指标

Liquidity Sweep Detector Liquidity Sweep Detector is a price-action based indicator designed to identify potential liquidity sweeps around recent highs and lows and highlight subsequent directional confirmation.
The indicator focuses on a simple market behavior: price may temporarily move beyond a recent high or low, take available liquidity, and then return inside the previous range. After detecting this event, the indicator monitors the following candles for confirmation of a potential directional move.
## How It Works
The indicator calculates recent highs and lows using a configurable lookback period.
A bullish liquidity sweep is identified when price moves below a recent low and then closes back above that level.
A bearish liquidity sweep is identified when price moves above a recent high and then closes back below that level.
After a sweep occurs, the indicator monitors a configurable number of candles for directional confirmation. A bullish confirmation requires price to move above the previous candle's high, while a bearish confirmation requires price to move below the previous candle's low.
## Main Features
• Recent liquidity high and low levels
• Bullish liquidity sweep detection
• Bearish liquidity sweep detection
• Sweep zones for visual reference
• Directional confirmation signals
• Configurable confirmation window
• Optional candle-body confirmation
• BUY and SELL markers
• Alert conditions for sweep and confirmation events
• Adjustable visual settings
## Settings
Liquidity Lookback controls how many previous candles are used to identify recent highs and lows.
Confirmation Window controls how many candles the indicator monitors after a liquidity sweep.
Minimum Sweep Wick controls the minimum relative wick size required for a sweep to qualify.
Strong Candle Body can be enabled to require stronger directional candle confirmation.
Visual settings allow users to display or hide liquidity levels, sweep labels, sweep zones, and confirmation markers.
## How to Use
The indicator is intended to help traders study price behavior around recent liquidity levels.
A typical bullish sequence is:
Recent Low → Liquidity Sweep → Reclaim → Bullish Confirmation
A typical bearish sequence is:
Recent High → Liquidity Sweep → Rejection → Bearish Confirmation
Users can combine these observations with their own market analysis, timeframe context, and risk-management approach.
## Limitations
Liquidity sweeps can occur without producing a sustained directional move. A confirmed signal does not guarantee a particular market outcome.
The indicator is based on historical price data and should be treated as an analytical tool rather than a prediction system. Market conditions can change rapidly, and users should independently evaluate each setup.
This script does not guarantee profits, accuracy, or future performance.
## Originality
The indicator combines recent liquidity-level detection, sweep recognition, configurable confirmation logic, and visual sweep zones into a focused price-action tool. Its purpose is to provide a clear framework for observing liquidity events and subsequent price behavior without relying on excessive chart elements.
This publication is intended for educational and analytical purposes and is not financial advice.
指标

Confirmed Swing Ledger [BSL]Confirmed Swing Ledger is a confirmation-aware market-structure ledger
for studying how swings become known in real time.
WHAT IT DOES
- Detects pivot highs and lows only after the configured right-side
confirmation window has closed.
- Separates the pivot's historical origin bar from the later confirmation bar.
Confirmation markers are the default; optional hollow origin dots are
retrospective and clearly labelled.
- Maintains an alternating ledger of accepted highs and lows, classifying them
as HH/LH and HL/LL.
- Applies an optional ATR-distance filter to reduce near-duplicate swings.
Same-side candidates may replace an existing extreme without inventing a new
alternating swing.
- Tracks the latest confirmed upper and lower levels.
- Distinguishes strict close breaks from wick rejections. A break requires the
close to cross a known confirmed level; a wick through the level that closes
back inside is counted separately.
- Freezes state on non-standard chart types instead of presenting synthetic
bars as ordinary OHLC evidence.
- Exposes hidden numeric streams for confirmed swings, level updates, breaks,
rejections, dual rejections and bias. These are selectable sources in Signal
Audit Lab .
- Includes alert conditions for accepted swings, confirmed-level close breaks
and confirmed-level wick rejections.
TIMING MODEL
With the default 3/3 left/right settings, a candidate that originates at bar
`t` can only become a usable event at `t + 3`. The script never relocates a
tradeable event back to the origin bar. Optional origin dots are visual
context, not realtime signals.
DEFAULTS
- Pivot left/right: 3 / 3
- ATR length: 14
- Minimum alternating swing distance: 0.5 ATR
- Panel: Compact
DESIGNED FOR AUDITABILITY
The panel reports current confirmed levels, classification, structural bias,
accepted/replaced/filter/ambiguity counts, break/rejection totals, chart-type
guard status and open-bar hold state. Historical state changes occur only on
confirmed bars.
This tool describes confirmed structure; it does not predict future price,
guarantee performance or provide trading advice. Validate behavior on your own
symbols, timeframes and execution assumptions before making decisions.
Open-source Pine Script® v6. Educational use only.
指标

Execution-Aware Trend [BSL]Execution-Aware Trend is a deliberately ordinary trend-and-breakout strategy
whose main product is visible testing discipline. It answers “what did this
exact ruleset simulate after declared costs, next-tick execution and a fixed
sample split?” It does not predict the next move and does not claim an edge.
This is an original BarState Labs implementation created from an independent
written specification. It does not reproduce another publication’s source,
defaults, interface, chart grammar or report.
HOW IT WORKS
Trend qualification uses a fast and slow EMA. A long setup requires the fast
EMA above the slow EMA and the slow EMA above its value at the configured slope
lookback. The short rule is symmetric. Equality qualifies neither side.
Entry and exit channels always exclude the current bar:
`entryHigh = highest(high , entry length)`
`entryLow = lowest(low , entry length)`
`exitHigh = highest(high , exit length)`
`exitLow = lowest(low , exit length)`
A confirmed close beyond the prior entry channel creates a market-entry
intent only when the matching trend filter qualifies. There is no pyramiding
and no same-calculation reversal.
The close-risk line uses ATR and confirmed closes. For a long position, the
highest observed close is tracked and the line is the greater of its previous
value and `peak close - ATR multiple × ATR`. It therefore never loosens. The
short rule is symmetric and never rises. A channel breach or a confirmed close
through the risk line creates a market-close intent.
EXECUTION MODEL AND COSTS
Orders are not processed on the signal bar’s close. The strategy keeps
TradingView’s normal next-tick behavior, which on historical bars normally
means a fill at the following bar’s open. The declaration includes:
- 0.10% commission per filled order;
- 2 ticks of slippage per market fill;
- 10% of equity order size;
- no pyramiding and no simulated leverage;
- no calculation on every tick or on order fills.
These are generic examples, not estimates for a particular broker or market.
Users must replace them in Properties. The panel cannot detect a manual
Properties override, so it labels them declaration defaults. Simulated fills
do not model liquidity, spread variation, queue position, rejected orders or
market impact.
SAMPLE WINDOWS
The same signal parameters can be viewed as Full history, In-sample or
Out-of-sample. The default split is 2024-01-01 UTC. In-sample ends immediately
before the split; out-of-sample begins at the split. No entry is allowed
outside the selected window, and an open position is closed by a normal delayed
market intent when the window ends.
One visible split does not prove that a user avoided tuning after seeing the
result. The script exposes the boundary; it cannot enforce research behavior.
A visible 100-closed-trade gate is a sample-size warning, not statistical
proof.
CONFIRMED AND STANDARD-CHART BOUNDARIES
New orders require a confirmed bar and `chart.is_standard`. On Heikin Ashi,
Renko, Kagi, Line Break, Range, Point & Figure and other non-standard charts,
the script displays `NON-STANDARD — NO ORDERS` and creates no trades.
The script uses only the current chart symbol and timeframe. It makes no
external requests, uses no lookahead and does not force same-bar-close fills.
Exchange or broker feed corrections can still rebuild historical standard
OHLC after reload.
OUTPUTS
The chart shows fast and slow EMAs, optional prior-bar entry and exit channels,
the active close-risk line, optional sample background and confirmed intent
markers. Compact and Full panels expose state, sample, split, fill model,
declaration costs, closed trades, the 100-trade gate, net result, average closed
trade and maximum drawdown.
Hidden machine-readable plots expose:
- Confirmed entry intent: +1, -1 or 0;
- Confirmed exit intent: +1, -1 or 0;
- Selected sample: 1 or 0;
- OOS flag: 1 or 0.
Order calls contain explicit alert messages, so TradingView order-fill alerts
can identify the simulated action, size, ticker and resulting strategy
position. They are diagnostics, not recommendations.
LIMITATIONS
- Positive net profit is not a design requirement or evidence of robustness.
- Results depend on symbol, feed, timeframe, loaded history, Properties and
inputs.
- Close-confirmed risk exits can gap on the next simulated fill.
- Commission and slippage defaults are not a complete transaction-cost model.
- One in-sample/out-of-sample split is not walk-forward validation.
- The 100-trade gate does not establish significance or future performance.
- Backtests are simulations and are not trading advice or expected returns.
VALIDATION
The candidate passed 16 deterministic Python fixtures and a 16/16 live Pine
harness. Manual TradingView checks covered BTCUSDT and AAPL on daily and
intraday charts, 187 BTCUSDT 30-minute and 103 AAPL hourly trades, unchanged
parameters across IS/OOS, higher costs, reload parity, realtime confirmation,
daily Bar Replay, zero orders on Heikin Ashi, the order-fill alert dialog,
390 × 844 rendering and Pine Profiler. The profiler observed 32,614 executions
on DJI daily history with 0.6 seconds total runtime.
The validation intentionally retains unfavorable evidence: BTCUSDT 30-minute
Full history returned about -3.70%, AAPL hourly Full history about -2.63%, and
AAPL daily OOS about -1.83%. No parameter was retuned after these observations.
ORIGINALITY AND SOURCE
Category demand was selected from dated popularity metadata. No protected,
invite-only or closed source was accessed, and no compared script’s source was
imported. EMA, ATR, prior-bar channels and sample splitting are standard,
transparent building blocks. The implementation is released under MPL 2.0.
CHANGELOG
v1.0.0
- Initial open-source release candidate.
- Symmetric confirmed-close trend and prior-channel entries.
- Non-loosening ATR close-risk line with delayed market exits.
- Explicit commission, slippage, sample split and standard-chart guard.
- Compact/Full evidence panels, signed intent exports and order-fill messages.
策略
