Session Breakout ContextMulti-Market Session Breakout Context
Description
Multi-Market Session Breakout Context is a rule-based intraday indicator designed to help traders organize session structure across gold, forex pairs, and selected index instruments. It was originally developed for XAUUSD and can also be applied to other markets whose session behavior, liquidity, and data quality are suitable for this type of analysis.
The indicator tracks the Asia, London, and New York session ranges using the America/Chicago timezone. It displays session highs, lows, and midpoint reference levels, then classifies selected price movements as directional breakouts or sweep/fade conditions. The chart markers and dashboard are intended to support discretionary analysis and trade planning. They do not place orders, manage positions, or guarantee a market outcome.
The main session conditions are:
•London breakout: price moves beyond the completed Asia session range.
•London fade: price sweeps an Asia range boundary and satisfies the rule-based reversal filters.
•New York breakout: price moves beyond the completed London session range.
•New York fade: price sweeps a London range boundary and satisfies the rule-based reversal filters.
•Asia breakout: price moves beyond the completed New York session range.
The indicator also provides additional market context through pivot-based directional readings, RSI divergence conditions, volatility measurements, volume-derived pressure and spread classifications, prior-day levels, previous-week levels, daily range references, weekly open, four-hour swing references, and a fixed time blackout window. These components are contextual filters. They are not independent guarantees of direction, probability, or profitability.
The optional dashboard summarizes the current session state, rule-based directional alignment, reference levels, entry and stop planning zones, target reference levels, and hypothetical point movement. Any displayed score is a rule-based alignment score, not a statistically validated probability or accuracy rate. Any displayed point movement is hypothetical and does not represent broker P&L, account performance, or a Strategy Tester result.
How to use the indicator
1.Apply the indicator to a standard candlestick chart.
2.Begin with XAUUSD and a lower intraday timeframe such as 5 minutes or 15 minutes.
3.Confirm that the chart symbol, exchange or broker feed, timezone, and session schedule are appropriate for your market.
4.Allow the relevant session range to form before interpreting its breakout or fade conditions.
5.Use the plotted levels as analytical references rather than guaranteed entry or exit prices.
6.Independently evaluate market structure, spread, volatility, scheduled events, liquidity, and position risk before making any trading decision.
7.Test the indicator on historical data and in a simulated environment before considering live use.
The displayed session schedule is based on fixed Chicago-time windows. The indicator should therefore be checked after daylight-saving changes and on every symbol or data feed where it is used. Session behavior can differ between spot metals, forex pairs, CFDs, futures, and other instruments.
Signal interpretation
A green or red breakout marker identifies a rule-based directional breakout classification. A blue or orange fade marker identifies a rule-based sweep/fade classification. These classifications describe what the indicator detected; they are not instructions to buy or sell and do not predict how far price will move.
Signals may depend on the active chart bar and on confirmed pivot information. A condition can change before the realtime bar closes. Users should evaluate signals on confirmed bars when they require stable, repeatable readings and should not assume that every historical marker was available at the beginning of the bar where it appears.
The indicator is intended for standard time-based candles. Signal interpretation may be misleading on non-standard chart types such as Heikin Ashi, Renko, Kagi, Point & Figure, Line Break, or Range charts.
Example screenshots
The following screenshots show selected visual examples on XAUUSD. They demonstrate how the indicator labels different session conditions. They are illustrative examples only and are not a complete record of all signals.
1. Full XAUUSD overview
Full overview of the indicator on XAUUSD showing session ranges, reference levels, breakout and fade markers, and the rule-based dashboard.
2. London fade long
London fade-long example after price sweeps the lower boundary of the completed Asia range. The marker represents a rule-based condition, not a guaranteed reversal.
3. London fade short
London fade-short example after price sweeps the upper boundary of the completed Asia range. Traders should independently evaluate confirmation, stop placement, and market conditions.
4. London sell
London bearish breakout example showing a downside break of the Asia session range. The displayed level is an analytical reference and does not represent an executed order.
5. New York sell
New York bearish breakout example showing a downside break of the completed London session range. Results may vary according to symbol, data feed, spread, liquidity, and execution conditions.
6. New York fade long
New York fade-long example after price sweeps the lower boundary of the completed London range. This is a rule-based signal classification for discretionary analysis.
7. New York fade short
New York fade-short example after price sweeps the upper boundary of the completed London range. The indicator does not guarantee continuation or reversal.
The screenshots are visual examples of the indicator’s signal classifications and are not a performance record. They do not show every signal, guarantee future results, or account for spread, slippage, commissions, liquidity, or execution delay. Signal behavior may vary across instruments, brokers, data feeds, and timeframes.
Limitations
This indicator is a decision-support and chart-organization tool. It is not investment advice, an automated trading system, a broker connection, or a guarantee of profit. It does not determine position size, account risk, contract quantity, execution quality, or whether a trade is appropriate for a particular user.
The indicator does not use a broker-level order book or guarantee access to true exchange-level volume. Volume-derived calculations may behave differently on symbols with limited, synthetic, tick, or unavailable volume. Reference levels and classifications can also vary according to the selected symbol, historical data, chart timeframe, session template, and data provider.
Historical examples should not be interpreted as evidence of future performance. Any decision to trade remains the user’s responsibility. Always consider the possibility of loss and use risk controls appropriate to your own circumstances.
Release notes
Initial public release of the Multi-Market Session Breakout Context indicator. This version provides Asia, London, and New York session levels, rule-based breakout and fade classifications, contextual reference levels, and an optional dashboard for discretionary chart analysis.
Indicador

Opening Range Breakout [ITA]🟠 OVERVIEW
Opening Range Breakout marks the high and low of the first minutes of the trading session, extends those boundaries forward, and flags the bar where price closes outside them. The range is built live as the session opens, tracking its running high and low, then locks once the opening period ends.
Once the range is set, the indicator measures its height and projects extension targets above and below it. Four range lengths are available, and the session open time and timezone are configurable so the tool works on any market rather than being fixed to a single exchange.
🟠 CONCEPTS
* Opening Range - The high and low established during the first minutes of the session. Represents the initial boundaries of agreement between buyers and sellers before the day develops.
* Range Lock - The moment the opening period ends and the boundaries stop updating. From that bar onward the levels extend forward unchanged.
* Extension Target - A projected level placed at a multiple of the range height above the range high or below the range low. Acts as a measured move reference rather than a prediction.
* Qualified Breakout - The first close outside the range in a given direction. Each direction is tracked independently and marked only once, so a session that breaks up, reverses and then breaks down shows both events without repeating either.
* Session Anchoring - The range window is evaluated in the selected timezone rather than the chart timezone, keeping it aligned to the actual market open regardless of the user's location.
🟠 FEATURES
* Selectable Range Length - Choose between 5, 15, 30 or 60 minute opening ranges.
* Live Range Building - The box tracks the running high and low as the opening period develops, then locks when it closes.
* Extension Targets - Projects two configurable multiples of the range height in both directions.
* Breakout Marking - Labels the first close outside the range in each direction.
* Breakout Alerts - Fires on upside and downside breaks independently.
🟠 HOW TO USE
* Match the range length to the instrument. Shorter ranges suit fast-moving markets and scalping, longer ranges suit index futures and higher-priced equities where the first minutes tend to be noisy.
* Set the session open time and timezone to your market. The default is 09:30 New York.
* Use the range boundaries as the reference for the session. Price holding inside them points to rotation, while a decisive close outside tends to set the tone for the rest of the day.
* Read the extension targets as measured moves. A tight opening range produces close targets, while a wide one produces targets that may take the full session to reach, which is itself useful when sizing expectations.
* Adjust Days to Display to keep the chart clean when reviewing several sessions of history.
🟠 CONCLUSION
Opening Range Breakout combines automatic range detection, forward-extending boundaries, and range-based extension targets in a single tool. It removes the manual work of marking the opening range each session while keeping the framework configurable enough to apply across different markets and session times. Indicador

Session Killzones + Opening Range [verticetrading]SESSION KILLZONES + OPENING RANGE
The Session Killzones + Opening Range indicator draws the Asia, London and New York sessions as live boxes on the chart, highlights each session's opening range, and adds a "fuel gauge" that compares the session's developing range with the symbol's own recent sessions.
🔶 USAGE
Add the indicator to an intraday chart of a market that trades across sessions (gold, forex, crypto, index futures). Each active session appears as a shaded box with its name; the first minutes of the session are shaded darker as the opening range. When price closes beyond that range, an alert can fire.
🔹 Reading the fuel gauge
* The session label shows the current range as a percentage of the typical range of that session's last 20 instances, e.g. "London — range at 137% of typical".
* Below roughly 60% late in the session: a quiet session; breakouts tend to have less follow-through.
* Around 60-110%: a normal session.
* Above roughly 120%: the session has already travelled more than usual; late entries face a statistically stretched move.
* The gauge measures amplitude, not direction: a 137% session can be a straight trend or a range that ends where it started — the candles inside the box tell you which.
🔹 Alerts
* Session opened.
* Opening range broken up / broken down (confirmed close only).
🔶 DETAILS
Sessions are evaluated in the timezone you choose (New York by default, the usual anchor for FX and metals). For every session the script stores the final range of its last 20 instances and divides today's developing range by that average; the label appears once a few sessions of history exist. Since a range can only grow, the percentage rises during the session and never falls, so the same 40% means "slow, still has room" mid-session and "a quiet day" at the close. Opening-range breakouts are detected on confirmed closes only, so nothing repaints. The statistics describe the loaded history of the chart only.
🔶 SETTINGS
🔹 General
* Language / Idioma: interface language (English by default, Spanish available). Every setting, tooltip and alert has an English label.
* Sessions timezone: the timezone the session hours refer to (Exchange, UTC, New York, London, Central America, Mexico City, Madrid/Paris/Berlin, Tokyo).
* Opening range (minutes): length of the opening range, 30 by default.
🔹 Session: Asia / London / New York
* Show: toggles the session.
* Hours: the session's time window in the selected timezone (defaults 18:00-03:00, 03:00-11:30 and 08:00-17:00 New York time).
* Color: box and label color.
Educational tool, not financial advice. A news day can print 200%; the gauge tells you when the context deserves attention, not where price will go. Trading involves risk. Indicador

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. Indicador

Level survival trackerEveryone trades PDH. Almost nobody knows their own numbers on it.
Description
Tracks six session reference levels every day: prior day high, prior day low, overnight high, overnight low, opening range high, opening range low. For each, over a rolling window of sessions, it reports the probability the level gets tested, the probability it breaks given a test, how failure probability changes with repeated tests, and the median rejection distance and time from first touch to break.
How it calculates
Prior day levels come from the last completed exchange daily bar via the documented non-repainting request idiom, or optionally from the previous custom chart session. Overnight high and low accumulate outside the session and freeze at the open; the opening range freezes when its window completes, and the bars that built it cannot also test it. A touch is a bar overlapping the level within a tolerance frozen at the session open, counted in episodes. A break is a confirmed close beyond the level plus tolerance, after a touch. A session whose open is already beyond a level, or where price closed through it without any bar ever overlapping it, is recorded as opened-beyond and excluded from every rate, because that level was never fairly testable. Completed sessions are written once, after the session ends.
The tolerance can be defined in ticks, points, a fraction of prior daily ATR, or a fraction of chart ATR. Statistics can be conditioned on the session's opening gap against the prior daily range, or on prior daily volatility versus its own 20-day mean. The break rate can display a 95% Wilson interval so the uncertainty is visible next to the point estimate. Break rates and touch-failure rates require their own minimum number of actual tests before anything is shown.
How to read it
Today's column shows each level's live state: untested, testing with its touch count, broke with the touch it broke on and the time, or opened beyond. P(test) is tests over eligible sessions. P(break | test) is breaks over actual tests, with the interval underneath if enabled. Touch failure answers: of past sessions that reached this many touches on this level, how often did the level eventually break. Reaction and time are the median rejection distance in points and the median minutes from first touch to confirmed break. Every figure carries its sample size, and figures below the minimums show the count instead of a percentage.
Repainting
Closed bars do not repaint. Touches and breaks are decided on confirmed bars only, and a session's outcomes enter history only after the session completes.
Originality and attribution
The levels are common knowledge. What is original is the survival accounting: episode-counted touches, conditional failure by touch number, opened-beyond exclusion, frozen per-session tolerance, regime conditioning, and interval-honest break rates with sample sizes shown. This is not derived from and does not reuse code from any existing published script.
Honest limitations
These are empirical frequencies, not forecasts or trade signals.
Intrabar path is unknowable from OHLC bars. A same-bar touch and break records as a first-touch break with zero measured rejection.
Overnight rows need extended-hours bars on the chart.
The session must not cross midnight in the chosen time zone.
Previous-RTH prior levels need one completed chart session to warm.
The chart timeframe must divide the session start and length exactly, so bars align to the session boundaries. For a 09:30 to 16:00 session that is 1, 2, 3, 5, 6, 10, 15, or 30 minutes. This is not a fixed ceiling: it follows your session. A session starting on the hour, such as 09:00 to 16:00 or 08:00 to 17:00, also accepts 20 and 60 minutes. Misaligned timeframes are refused rather than measured against fuzzy session boundaries, because a bar straddling the open would corrupt the opened-beyond classification, which reads the session-open price.
The opening range is rounded up to a whole number of chart bars, so no bar can straddle its boundary. On a 2-minute chart a 15-minute range becomes 16. The effective value is in the table header tooltip.
Results depend on instrument, session, tolerance, timeframe, and sample. Change any one and the numbers change. Indicador

Session Open LineA price overlay for TradingView (Pine Script v6). A horizontal line at the session's reference level - the previous session's close by default, or the session open - drawn from the first to the last bar of that session, with a label carrying the price change during the session (close vs the reference) - as a percent, as a difference in the instrument currency, or both. Alerts fire when the price crosses the line, and the reference level plus the session change are exposed as hidden series for other scripts.
█ 🧠 WHAT IT SHOWS
For every trading session the script anchors a line at the session's reference level and stretches it to the right as the session progresses:
price
│ ╭─╮
│ reference level │ │ ╭╮ ← price above the reference
│ ╭╮ ╭╮ ╰─╯ ││
│ ══╪╪═══════════════════╪╪═══════╪╪══ ─►
│ ╰╯ ╭╮ ╭╮ ╰╯ ╰╯
│ ╰╯ ╰╯ ← price below the reference
│
│ ├──────── one session ────────┤├── next session ──
└────────────────────────────────────────────── time
The line sits at the reference level - the previous session's close (default) or the session open - and never moves vertically.
Its right end follows the current bar until the session ends.
The color of the line depends on the sign of the change : up color when close >= reference level , down color otherwise. It is re-evaluated on every bar, so a session that flips from green to red repaints the whole line.
The whole session is shaded in the same up/down color (on by default, can be turned off).
Reference level
Previous session close (default) - the close of the last bar of the prior session. The change matches the day change quoted against the previous close (the way most quote screens report it), and an opening gap shows up as the distance between the line and the session's first candle.
Session open - the open of the first bar of the session. The change measures only what happened inside the session; there is never a gap between the line and the first candle.
Session detection
A new session is detected with timeframe.change('D') - the trading day boundary as TradingView defines it for the symbol. That is deliberately not "midnight": it follows the instrument's own session definition, so futures sessions that cross midnight are handled correctly (the line starts at the session boundary, not at 00:00).
Why a box, not bgcolor()
The session highlight is drawn as one box per session rather than bgcolor() . bgcolor() paints a single bar and cannot be repainted afterwards, so a session that flips sign would end up striped. A box spans the whole session and keeps a single color that is corrected on every bar. Box extend only works on the time axis, so the vertical coverage comes from the box bounds: the highest high and lowest low of the loaded data, padded by 100x that range above and below. On the last bar every box is brought to the final bounds, so sessions drawn while less data was loaded get the same coverage.
Why not simply 1e17 / -1e17 : TradingView silently skips boxes whose bounds lie extremely far from the price scale (on an instrument near 85, bounds of +-1e8 still draw while +-1e9 do not). Such boxes exist - they show up in the object tree - but never render, so the highlight looks like it is not working at all.
█ 🏷️ THE CHANGE LABEL
The label is colored by the sign of the change and sits on a fully transparent background. Two checkboxes decide what it carries:
Show percent change (default on) - the change as a percent of the reference level, formatted as +0.84% / -1.12% (always signed, two decimals).
Show change in instrument currency (default off) - the change as a price difference ( close - reference level ), formatted with the symbol's tick precision ( format.mintick ) and suffixed with syminfo.currency , e.g. +12.50 USD . For symbols without a quote currency the suffix is omitted.
With both on the label reads +0.84% (+12.50 USD) ; with both off no label is drawn at all - only the line (and the optional highlight) remains. For a reference level at or below zero (possible on futures spreads) the percent is undefined - the label falls back to the price difference, and the up/down color always follows the sign of the difference, which stays meaningful at any price.
Percent position decides where it sits, and the choice applies the same way to completed sessions and to the ongoing one:
Behind the line (default) - anchored on its left edge ( label.style_label_left ), at the reference level, right of the line end, as if continuing the line.
Above the line - anchored at its bottom-right corner ( label.style_label_lower_right ), so the text sits over the end of the line and does not stick out past the session end.
Below the line - anchored at its top-right corner ( label.style_label_upper_right ), so the text hangs under the end of the line, again inside the session.
During the ongoing session the label follows the end of the line and updates on every bar; once the session ends it stays at the last bar with the final value.
█ 🛠️ KEY PARAMETERS
General
Reference level (default Previous session close) - Previous session close / Session open, described above.
Show percent change (default on) - percent of the reference level in the label.
Show change in instrument currency (default off) - price difference in the instrument currency in the label.
Appearance
Up color (default #26A69A ) - line and label color when the session is up.
Down color (default #EF5350 ) - line and label color when the session is down.
Line style (default Solid) - Solid / Dashed / Dotted.
Line width (default 1) - range 1 - 4 .
Text size (default Small) - Auto / Tiny / Small / Normal / Large.
Percent position (default Behind the line) - Above the line / Below the line / Behind the line, described above.
Session highlight
Highlight the whole session (default on) - fills the entire session with a single color, decided by where the price stands against the reference level.
Highlight up color (default #26A69A at 90% transparency) .
Highlight down color (default #EF5350 at 90% transparency) .
█ 📈 HOW TO READ IT
The line is a reference level, not a signal. Trading above it means buyers have controlled the day so far; below it, sellers have.
Reclaims and rejections at the line are the interesting part - price returning to the level and being pushed away often marks who is defending the day.
With the previous-session-close reference (default) the line doubles as the gap-fill level : a session that opens with a gap and later crosses the line has closed that gap.
The label value gives an instant sense of the session's magnitude without measuring anything by hand, and the sign color makes a flip visible at a glance. The percent is comparable across instruments; the currency difference maps directly to points or ticks on the symbol you trade.
With the session highlight on , a screen full of alternating green and red blocks makes runs of consecutive up or down sessions obvious.
█ 🔔 ALERTS
Cross above the reference level - the price crossed the current session's line from below.
Cross below the reference level - the price crossed the current session's line from above.
Those are exactly the reclaim/rejection moments described above (with the default reference: the gap-fill / day-flip moments). The first bar of a session - where the line jumps to the new reference - never fires either alert. Crosses are evaluated on close , so on the live candle a cross can appear and un-cross before the candle closes; set the alert trigger to Once Per Bar Close if you only want confirmed crosses.
█ 📤 HIDDEN SERIES
The script exposes two hidden series, visible in the Data Window and usable as an external source in other indicators and strategies (any input.source field):
Reference level - the level the line sits at: the previous session's close (default) or the session open.
Session change % - the session change as a percent of the reference level.
█ ⛔ LIMITATIONS
Intraday timeframes only. On D and above every bar is its own session, so the script draws nothing and instead shows a hint table in the top-right corner: Session Open Line: the indicator works on intraday timeframes .
Drawing objects are capped at 500 lines, 500 labels, and 500 boxes - older sessions drop off the left side of the chart.
Both values are computed from close against the reference level, so during the ongoing session they move with every tick and only become final at the session close.
The first session in the loaded history starts at the first loaded bar, which is not necessarily the true session start. With the default reference (previous session close) it has no prior close at all, so it draws nothing; with the session-open reference its "open" (and therefore its change) can be off. Every later session is exact.
© Piotr Kowalski "piecioshka". License: Mozilla Public License 2.0. Indicador

VWAP AI - Statistical Bands & Touch Stats [Dots3Red]⚓ VWAP AI - STATISTICAL BANDS & TOUCH STATS
VWAP's standard deviation bands are treated more or less as reliable support and resistance — on faith. This script checks that faith against the actual chart in front of you: every band touch is graded, every break beyond a band is graded, and the results accumulate into a running, honest record.
✨ WHY THIS MATTERS
VWAP tells you the volume-weighted average price — where the "center of gravity" of trading has actually been. The bands around it are meant to show how far price typically wanders from that center before snapping back. But "typically" varies enormously by instrument, session, and market condition, and no plain VWAP tool tells you what's actually been happening on your chart.
This script tracks it directly:
📊 +1σ | 62% rejected (n=41)
That means 41 touches of the +1σ band have been recorded on this chart, and 62% of them resulted in price genuinely rejecting back toward VWAP. Measured history, not an assumption baked into the tool.
⚙️ HOW IT WORKS
⚓ Anchoring — VWAP resets at the start of each new period. Session is the classic intraday default; Week and Month extend the same logic to longer views. Custom Bar anchors once, permanently, to a specific historical point you choose — useful for anchoring to an earnings date, a gap, or any event you want to measure from, rather than the calendar.
📏 Two-tier statistical bands — Band 1 and Band 2 are both standard-deviation multiples of VWAP, computed from a proper running variance (not an ATR approximation). Defaults are ±1σ and ±2σ, both fully adjustable.
🎯 Touch grading — when price wicks into a band without closing beyond it, that's logged as a touch. Within a configurable window, it resolves as:
• Rejection — price moved back toward VWAP by a meaningful distance
• Break — price closed convincingly through the band
• Timeout — neither happened clearly enough to call
🔄 Break-to-reversion tracking — separately, when price actually closes beyond Band 1, the script watches whether that move reverts back toward VWAP or continues away from it. This answers a different question than touch grading: not "did the band hold," but "once it didn't, did price come back anyway?"
🔒 Non-repainting — all grading happens strictly on confirmed bars.
🧭 HOW TO USE
1️⃣ Check the band stats before treating a level as reliable. "+1σ: 71% rejected (n=38)" and "+1σ: 44% rejected (n=12)" look like the same line on the chart but mean very different things about how much to lean on it.
2️⃣ Use break-reversion stats to judge a breakout beyond VWAP's range. If breaks above Band 1 have reverted back 65% of the time on this chart, that's useful context before assuming a fresh breakout will keep running.
3️⃣ Read Price vs VWAP as the simplest possible bias check. Above VWAP means the average buyer today is in profit; below means the average buyer is underwater. It's a blunt but genuinely useful read on crowd positioning.
4️⃣ Let sample sizes build before trusting the percentages. Every stat shows its N= specifically so you can judge reliability yourself — a handful of touches is not yet a pattern.
5️⃣ Match the anchor mode to what you're actually measuring. Session for pure intraday structure, Week or Month for a longer view, Custom Bar when you want to measure from one specific moment forward.
⏱️ WHICH TIMEFRAMES WORK BEST
Session-anchored VWAP is fundamentally an intraday tool — it was built for, and is most meaningful on, timeframes where a full session contains enough bars to form a real distribution: 1-minute through 1-hour is the classic and most effective range, which is exactly where VWAP sees the heaviest institutional and day-trading use.
On daily or weekly charts, a Session anchor resets so frequently relative to the bar size that it stops being meaningful — you'd see very few bars per session. For higher-timeframe or swing-style use, switch the anchor to Week, Month, or Custom Bar instead, so the accumulation window actually spans enough bars to produce a meaningful VWAP and band structure.
The touch and break statistics also need enough occurrences to mean anything — a fast-moving intraday chart will accumulate a useful sample size in days; a slow higher-timeframe anchor will take considerably longer.
🛠️ SETTINGS
⚓ Anchoring — Session / Week / Month / Custom Bar, source price
📏 Bands — Band 1 and Band 2 standard-deviation multipliers, Band 2 visibility toggle
🎯 Touch Statistics — Touch Tolerance, Rejection Distance, Reversion Distance, Outcome Window
🎨 Visualization — independent Band 1 / Band 2 touch marker toggles, Dot or Triangle marker style, marker size, VWAP and band line widths, independent fill transparency per band tier
🎨 Colors — VWAP line, Band 1 lines, Band 2 lines, upper/lower touch markers, Price Above/Below VWAP indicator, and full dashboard color control (background, border, header, row styling)
🖥️ Dashboard — show/hide, position — current VWAP value, price position, all four band stats, and both break-reversion stats in one place
📝 NOTES
Statistics accumulate from when the indicator is added to the chart and reset only when explicitly cleared by reloading. A Custom Bar anchor never resets on its own, it measures continuously from the point you chose. Band 2 statistics take meaningfully longer to build a useful sample than Band 1, simply because price reaches ±2σ far less often than ±1σ.
⚠️ DISCLAIMER
This is an analytical and visualization tool. It does not generate trade signals and does not constitute financial advice. Historical rejection and reversion rates do not guarantee future performance. Indicador

Session block profileEvery part of the trading day has a personality. See yours in one table.
Description
Splits the trading session into fixed-length blocks and, for each block, keeps a rolling history of what that part of the day has done over the last N sessions. Three descriptive measures per block: how large its range tends to be relative to the average block, how much volume it tends to carry relative to the average block, and how directional it tends to be, measured as the average of the block's body over its range.
How it calculates
Each bar is assigned to a block from its minute of the day in the chosen time zone. A block's high, low, open, close, and volume accumulate on confirmed bars. When the first confirmed bar of a different block or a different day arrives, the completed block is written into its rolling history and that block's means are recomputed once. Range and volume indices are each block's mean divided by the average across all blocks with enough history, so 1.00 is an average block. Body ratio is the mean of |close - open| divided by (high - low) for the block, so 0 is a doji and 1 is a full-body bar.
How to read it
Range and volume shade toward green as they rise above the average block. Body shades toward amber as blocks become more directional. The current block's label is amber. Alternate blocks can be shaded on the chart so the grid is visible against price. This is a description of what each part of the day has tended to do. It is not a forecast.
Repainting
Closed blocks do not repaint. History is written only when a block completes. The current block is marked but its partial values are not shown as a statistic.
Originality and attribution
Session statistics by time of day are a familiar idea. What is original here is the block-keyed rolling history with cached per-block means, the three-measure normalization against the session's own average block, and the heat-table presentation. This is not derived from and does not reuse code from any existing published script.
Honest limitations
The session must start and end on the same calendar day in the chosen time zone. Sessions that cross midnight are not supported.
A partial first day in chart history contributes a partial block. The minimum-sessions setting exists to absorb that.
Half days, holidays, and early closes pollute a block's history for as many sessions as the lookback.
Range and volume are relative to the average block within this session window, so the indices are only comparable inside one configuration.
Body ratio is not a trend measure. A block can have a high body ratio and still be a small, meaningless move.
Nothing here is a signal. A high-range block is not a direction. Indicador

Realized volatility term structureVolatility has a curve too. See whether the short end is screaming or sleeping.
Description
Measures realized volatility of bar returns over five horizons at once, from short to long, and draws the resulting curve at the right edge of the pane so you can see its shape rather than a single number.
How it calculates
Realized volatility at each horizon is the population standard deviation of log returns over that many bars, scaled by the square root of the number of bars in a year for the current timeframe, shown as a percentage. The plotted history is horizon one divided by horizon five. The curve is drawn as four connected segments through five points placed just past the last bar, each point's height equal to that horizon's volatility divided by the longest horizon's.
How to read it
Above 1.0 the short end is running hotter than the long end, which is what a fresh shock looks like. Below 1.0 the short end is quieter than the long end, which is what compression looks like. The pane shades amber while the short end is elevated. The curve at the right edge is normalized to the longest horizon so its shape is comparable across instruments and timeframes. Each point is labeled with its horizon in bars and its annualized value.
Repainting
Closed bars do not repaint. The live bar updates until it closes. The curve at the right edge is redrawn on the last bar only.
Originality and attribution
Realized volatility over a window is standard. What is original here is presenting it as a term structure: five horizons measured together, the short-to-long ratio tracked through time, and the live curve drawn on the chart as connected points. This is not derived from and does not reuse code from any existing published script.
Honest limitations
Realized volatility is backward looking by construction. The short end reacts within a few bars. The long end takes as many bars as its horizon to fully reflect a change.
Annualization is a display convention. The trading-minutes-per-day and days-per-year inputs only scale the percentages shown.
On timeframes above daily the annualization assumes 52 weekly or 12 monthly bars per year.
The elevated and subdued thresholds are conventions, not calibrations.
Five horizons is a choice. The curve between them is a straight line.
Nothing here is a signal. An elevated short end is not a direction. Indicador

Range Compression Percentile - Hour RankedThis indicator gives no directional signal. It answers a single question: will the amplitude of the coming hours be large enough to be worth paying a round turn?
What makes it different
Intraday amplitude on a futures contract varies by a factor of 3 to 4 across the trading day. Any absolute threshold — "range below 50 points means compression" — therefore mostly measures what time it is, not the state of the market. A quiet 10:00 in New York and a busy 02:00 can show the same raw range while meaning opposite things.
This script ranks the current range as a percentile against the history of the same hour of the day. That hour-for-hour ranking is the part I have not seen elsewhere, and it is what makes the reading comparable at any time of day.
How it is calculated
The range of the last N bars (default 78, which is 6h30 on a 5-minute chart, one full RTH session) is measured as (highest high − lowest low) / close, expressed in basis points so it is comparable across instruments and across price levels.
Once per elapsed hour, that value is stored in a circular buffer belonging to that hour of the day. Each of the 24 hours keeps its own history, 120 observations by default — roughly six months of sessions.
The current range is then ranked against that hour's stored history. The result is a percentile from 0 to 100, plotted as a histogram and coloured by quintile.
A second reading divides the current range by a user-supplied round-turn cost, giving an amplitude-to-cost ratio.
What the measurements show
Tested on MNQ 5-minute data (12 months, 317 sessions) and GC 5-minute data (5.6 years, 1,737 sessions). Range of the following 2 hours, grouped by the quintile this indicator reports, computed causally — ranking only against hours already elapsed, exactly as the script does live:
MNQ: 39.3 / 43.4 / 47.0 / 53.8 / 64.4 bp from Q1 to Q5
GC: 35.2 / 37.9 / 41.0 / 44.2 / 59.8 bp from Q1 to Q5
Monotonic on both instruments. The bottom quintile runs at roughly 0.6x the amplitude of the top quintile.
The effect also survives a control for the last hour's range, which is the amplitude predictor already widely known: adding the compression indicator to a regression already containing the one-hour range gives it a coefficient of −10.65 bp (t = −8.65) on MNQ and −4.58 bp (t = −7.27) on gold, with hour-of-day fixed effects and standard errors clustered by session.
The result runs against the common belief. Compression does not announce expansion here. It announces more quiet.
What it does not do
It carries no directional information, and I would rather state that plainly than let the histogram suggest otherwise. On the same samples, the signed return of the 2 hours following a compression is indistinguishable from zero (MNQ −0.47 bp, t = −0.55). A range breakout traded as a symmetric bracket loses about the same amount whether traded with the break or against it (−0.241 R versus −0.258 R) — two opposite directions losing the same amount is what no information looks like.
Use it to decide whether conditions are worth trading, never which way.
How to use it
Bottom quintile (red, below 20): the next hours are likely to stay quieter than usual for this time of day. Fixed costs buy less movement.
Top quintile (green, above 80): wide amplitude relative to this hour.
The amplitude-to-cost ratio is the absolute check, and it is independent of the percentile. A market can be compressed for its hour and still offer plenty of room. Both readings are shown because they answer different questions.
Settings
Range window: number of bars in the measured range. 78 is the value the effect was measured on.
Closed bars only: freezes the range on the previous bar so the value stops moving inside the forming bar.
Reference time zone: used only to split the day into hours.
Observations kept per hour, and minimum before displaying: control how much history is required before a percentile is shown.
Round-turn cost in basis points: commission plus slippage against notional. Reference points measured on micro futures: MNQ 0.98, MES 1.89, MYM 2.06, MGC 3.00 to 3.44 depending on the price of gold. This figure depends on price and is never constant over time, so it is an input rather than a constant.
Notes and limitations
No repainting. The percentile is computed only against hours that are over and closed.
The indicator needs history before it displays anything: 20 observations for a given hour by default, so about 20 sessions.
The numbers quoted above come from two instruments over the periods stated. They are measurements on that data, not a guarantee of future behaviour.
Designed and measured on 5-minute futures charts. On other timeframes or asset classes the window length should be reconsidered. Indicador

Trading Sessions [EDGE]Trading Sessions .
A continental trading-session engine that marks the four global sessions - Pacific, Asia, Europe, USA - in both Forex and Stocks mode, and shows at a glance which session is live, how long until each one opens or closes, and where price sits relative to each session open. Built for intraday traders who structure the day around session opens and want a single, timezone-correct view of the session clock.
How it works:
Every session is defined in the local business hours of its region and detected with an IANA timezone name (Australia/Sydney, Asia/Tokyo, Europe/London, America/New_York), so daylight-saving transitions are resolved automatically - the windows shift with each region's own clock and never need a manual seasonal adjustment. Detection is restricted to Monday through Friday. Two market modes share the same four continental sessions with hours native to each market type: in Forex mode they map to the Sydney, Tokyo, London and New York dealing desks; in Stocks mode they map to the region's anchor cash market - ASX Sydney (Pacific), a combined Tokyo/Hong Kong window (Asia), LSE London (Europe) and NYSE/Nasdaq (USA).
For each active session the script tracks a live high and low, drawing a range box that updates every bar and a horizontal line at the session open. The dashboard reads live clock time in each session's own timezone, so its open and close countdowns stay correct through every daylight-saving change, and it reports each session open price together with the current price's signed percent distance from it. All context is anchored to price - session boxes and open lines - plus the dashboard; there is no background shading.
What it calculates:
- Session state - which continental sessions are open right now, marked with a dot and a session-colored row in the dashboard
- Countdown - time until each session opens (when closed) or closes (when running), in the session's own timezone
- Session range box - the live high-to-low band of each session, kept on the chart as a prior-session reference
- Session open price - the price at which each session opened, shown in the dashboard
- Open Δ% - the current price change from the session open as a signed percent, green above the open and red below
- Session open line - a horizontal level at each session open, a widely watched institutional reference for retests
- Europe/USA overlap flag (Forex) - a dashboard note during the four-hour overlap, the deepest liquidity window of the day
Key features:
- Two market modes - Forex and Stocks - selectable from a single input, each with its own native session hours
- Four continental sessions - Pacific, Asia, Europe, USA - with per-session visibility toggles and editable hours
- Automatic daylight-saving handling through IANA timezones; no manual seasonal switching
- Combined Asia stock session spanning Tokyo and Hong Kong as one continuous window
- Live dashboard with active-session highlighting, per-session open/close countdowns, session open price and the signed percent change from it, with configurable position and text size
- Session range boxes and session open price lines, both fully colorable, with a configurable history depth to limit chart clutter
- Alerts for every session open and close, plus the Europe/USA overlap start
- Intraday-only operation with a clear on-panel notice on daily and higher timeframes
Who it's for:
Intraday and short-horizon traders who structure the day around session opens - Asia-range and London-breakout players, New York-open traders, and index or futures traders who track the Pacific-to-USA handover. The tool answers the questions that matter at the open: which session is driving price now, how long until the next one turns over, and how far price has travelled from each session open - a clean, timezone-correct session clock without the visual noise of overlapping session tools. Indicador

Premarket OTT TriggerPremarket OTT Trigger
Premarket OTT Trigger is a multi-timeframe indicator designed to identify important premarket price zones using a 15-period OTT and then use those zones for structured break-and-retest setups after the market opens.
The concept is simple:
Higher timeframe = Find the setup
Lower timeframe = Find the entry
During premarket, the indicator looks for the most recent candle that crosses or touches the OTT. That candle is automatically boxed from its high to low, with a 50% midline, and the box extends to the right throughout the trading session.
If another qualifying premarket candle appears later, the older box is removed and the newest candle becomes the active zone.
Why Look for an OTT Cross?
A symbol with a premarket candle crossing or interacting with the OTT may be showing increased price activity and the potential for meaningful movement during the session.
This does not guarantee a move, but it can help identify symbols worth adding to a watchlist.
The resulting box creates a clearly defined trading area with three important levels:
Box High
50% Midline
Box Low
Instead of entering randomly, traders can use these levels to wait for price to show direction.
Break & Retest Method
A simple approach is to use the 30-minute timeframe to identify the box and the 5-minute timeframe for entries.
Bullish Setup
Wait for price to break above the box high.
Do not chase the initial breakout.
Allow price to pull back and retest the top of the box.
If the old resistance level holds as support and the 5-minute chart shows bullish confirmation, this can provide a potential long setup.
Break Above → Retest → Hold → Long
Bearish Setup
Wait for price to break below the box low.
Allow price to retest the broken level from underneath.
If the old support level acts as resistance and the 5-minute chart shows bearish confirmation, this can provide a potential short setup.
Break Below → Retest → Reject → Short
If price remains inside the box, the idea is simply to wait for direction.
AAPL Example
In the AAPL example shown, the 30-minute timeframe was used to establish the premarket OTT box, while the 5-minute chart was used for trade execution.
The higher timeframe provided the important premarket structure, while the lower timeframe provided a more precise view for the breakout, retest, and entry.
This is the core idea behind the indicator:
OTT Interaction → Potential Movement → Defined Zone → Break → Retest → Entry
Features
Selectable indicator timeframe
15-period OTT
Adjustable OTT percentage
Adjustable premarket session
Wick Touch, Body Cross, or Close Cross detection
Automatic most-recent premarket box
Automatic daily reset
Box High, Low, and 50% Midline
Dynamic box colors
Solid, Dashed, or Dotted box borders
Customizable midline style
Optional candle-close confirmation
Box extends through the trading session
Important
The OTT cross is not intended to predict direction by itself.
Its purpose is to help identify symbols that may be showing meaningful premarket activity and create a defined trading zone where entries, invalidation, and risk can be planned more clearly.
The trader still waits for price to confirm direction through the break and retest.
30M for structure.
5M for execution.
Let price confirm the trade.
This indicator is intended as a structure and confirmation tool and should be combined with proper risk management, position sizing, and your own trading plan.
For educational purposes only. Not financial advice.
Credits: This indicator incorporates the Optimized Trend Tracker (OTT) concept originally developed by Anıl Özekşi. Credit is also given to Kıvanç Özbilgiç for bringing OTT implementations to the TradingView/Pine community. This script extends the concept into a multi-timeframe premarket zone and break-and-retest framework.
Indicador

Daily ATR Projection [EDGE]Daily ATR Projection .
Projects the previous daily close plus and minus 0.5 and 1.0 ATR(D) as five horizontal levels on the current chart, and shows the same levels together with a live ATR% amplitude reading in a compact dashboard. Built for intraday traders who want a fixed, non-repainting map of how much room the day still has before the session has statistically exhausted its average range.
How it works:
The indicator requests the previous completed daily bar via request.security(sym, "D", [close , atr_expr ], lookahead = barmerge.lookahead_on). The two values it pulls — previous daily close and previous daily ATR — are always finalised bar data, so the projection never repaints during the intraday session. From those two numbers it computes four projected levels: previous close plus and minus 0.5 x ATR(D) and plus and minus 1.0 x ATR(D). The fifth line is the previous daily close itself.
On every last bar the five levels are (re)anchored using xloc.bar_time so they extend the requested number of bars to the right of the current bar, without being clipped by empty space in the chart layout. When the smoothing method is changed the ATR expression is recomputed inside a single helper so RMA, SMA, EMA and WMA all share the same request.security call.
What it calculates:
- Prev Close — previous daily close, drawn as the middle reference line.
- +100% — previous close + 1.0 x ATR(D), the upper edge of the expected daily range.
- +50% — previous close + 0.5 x ATR(D), the mid upside marker.
- -50% — previous close - 0.5 x ATR(D), the mid downside marker.
- -100% — previous close - 1.0 x ATR(D), the lower edge of the expected daily range.
- 1 ATR, % — the previous daily ATR expressed as a percentage of the previous daily close, i.e. today's average expected amplitude.
- Distance-to-price row — signed distance from each of the four ATR levels to the current close, so the trader can see how much of the daily potential is still available in each direction.
Key features:
- Non-repainting daily ATR — data is pulled from the previous completed D1 bar; intraday bars never see values that have not been finalised.
- Adjustable smoothing — RMA (Wilder), SMA, EMA or WMA on the daily True Range.
- ATR multiplier — 1.0 keeps the classic envelope, 0.5-2.0 for tighter or wider projections.
- Right-extension control — line reach is configured in bars of the current timeframe, so the levels stay visible on any chart scale.
- Toggle for the middle line — turn off the previous daily close if a separate PDC indicator is already loaded.
- Compact dashboard with six anchor positions (top / bottom / middle, left / centre / right) and four text sizes.
- Two-row value grid — absolute level values on one row, signed distance to current close on the row below.
- Live 1 x ATR(D) amplitude reading with an inline tooltip mapping the reading to volatility regimes (low / normal / elevated / extreme).
- Meaning-encoded colour scale — deep green and deep red for the outer plus / minus 100% boundaries, softer green and red for plus / minus 50%, neutral grey for the previous close. Every colour is exposed as input.color and can be overridden.
- All input labels, tooltips and dashboard captions in English.
Who it's for:
Intraday and short-horizon swing traders who plan entries against the previous daily close and want a fixed, statistically grounded map of the day's realistic upside and downside potential. Useful for session-based playbooks (open, mid-day, close), for measuring how much of the average day has already been printed before committing to a continuation trade, and as a discipline overlay for fade traders who prefer to avoid taking reversal setups after price has already consumed the full daily amplitude. Indicador

[Kpt-Ahab] Poor Man's Orderflow Simple AlgoPilotImportant Notice and Risk Warning
The published settings were selected solely based on historical data for the asset and timeframe shown.
The displayed result may be random or over-optimized and cannot automatically be transferred to other assets, timeframes, or future market conditions. Even with the presented settings, the strategy may cause significant losses at any time, including the complete loss of the allocated strategy capital.
This script is intended exclusively for analysis and testing purposes. It does not constitute investment advice or a trading recommendation.
Description
This script uses reused and adapted code components from ** Auto RiskManagement & Backtest System 2.1b** and the ** Poor Mans Orderflow Simulator **.
These components have been combined into a standalone strategy that integrates simplified orderflow signals with position management, risk management, and backtesting functions.
How It Works
The strategy uses a simplified approximation of orderflow. It evaluates the relationship between candle body size and candle range, relative volume, candle direction, and recurring absorption and impulse events.
It does not use actual bid/ask, footprint, Level 2, or order book data.
Depending on the selected signal mode, direct breakouts, confirmed absorption clusters, impulse candles, or combinations of these conditions may generate long and short signals.
Position and Risk Management
The script supports, among other features:
* Long and short positions
* Fixed or trailing stop-loss levels
* Multiple partial profit targets
* Breakeven after the first profit target
* Optional additional entries
* Further entries may also be disabled after the specified total number of losing trades has been reached or when the maximum permitted drawdown is exceeded.
* Internal or external trading signals
* Automatic parameters based on asset class and timeframe
Additional entries and simulated leverage may significantly increase the risk of loss.
Backtest Limitations
Strategy Tester results are based exclusively on historical market data. Real-world results may differ significantly due to commissions, spreads, slippage, liquidity, price gaps, and execution delays.
Past performance is not a reliable indication of future results.
Position Closing Settings
The **Open Position Signals** setting determines how new signals are handled while a position is already open:
* **Wait-End-Deal:** All indicator signals are ignored until the current position has ended.
* **Wait-Signal-Close:** Only explicit signals for closing a long or short position are processed.
* **Wait-Reversal:** An opposing entry signal may also close the current position.
Several closing conditions are available for the integrated orderflow logic. For example, a position may be closed by an opposing impulse, a combination of a cluster and an impulse, or a confirmed opposing entry signal.
Further trading may also be restricted after a specified number of losing trades or when the maximum permitted drawdown is reached.
Trailing Stop, Breakeven, and Liquidation Line
The strategy supports both a fixed stop-loss and a trailing stop. The selected percentage represents the direct price distance from the average entry price and is not automatically adjusted by the simulated leverage.
In trailing mode, the stop is only moved in a direction that is favorable to the position. If the average entry price changes due to an additional entry, the existing stop is adjusted accordingly.
The stop may optionally be moved to the average entry price after the first profit target has been reached. A stop mode must be enabled for this function to operate.
The displayed liquidation line is only an internal estimate based on the simulated position and account values. It may differ significantly from the actual liquidation calculation used by a broker or exchange.
Using External Indicators
An external numerical signal source may be used instead of the integrated Poor Man’s Orderflow Simulator.
The external indicator must provide a selectable plot series containing the following values:
* **+1:** Long or buy signal
* **−1:** Short or sell signal
* **+2:** Close short position
* **−2:** Close long position
All other values, including `na`, produce no new signal.
The external indicator must output the required numerical values through a selectable plot. This plot can then be selected under **External Source**.
Whether and how an external signal is processed while a position is open also depends on the selected **Open Position Signals** setting.
-----------------------------------
Wichtiger Hinweis und Risikowarnung
Die veröffentlichten Einstellungen wurden ausschließlich anhand historischer Daten für das dargestellte Asset und den verwendeten Zeitrahmen gewählt.
Das Ergebnis kann zufällig oder überoptimiert sein und lässt sich nicht automatisch auf andere Assets, Zeitrahmen oder zukünftige Marktphasen übertragen. Auch mit den dargestellten Einstellungen kann die Strategie jederzeit erhebliche Verluste verursachen und das eingesetzte Strategiekapital vollständig verlieren.
Dieses Skript dient ausschließlich zu Analyse- und Testzwecken und stellt keine Anlageberatung oder Handelsempfehlung dar.
Beschreibung
Dieses Skript verwendet wiederverwendete und angepasste Codebestandteile aus Auto RiskManagement & Backtest System 2.1b und dem Poor Mans Orderflow Simulator .
Die Komponenten wurden zu einer eigenständigen Strategie verbunden, die vereinfachte Orderflow-Signale mit Positions-, Risiko- und Backtestfunktionen kombiniert.
Funktionsweise
Die Strategie verwendet eine vereinfachte Annäherung an Orderflow. Sie wertet das Verhältnis von Kerzenkörper und Handelsspanne, relatives Volumen, Kerzenrichtung sowie wiederkehrende Absorptions- und Impulsereignisse aus.
Dabei werden keine echten Bid-/Ask-, Footprint-, Level-2- oder Orderbuchdaten verwendet.
Abhängig vom gewählten Signalmodus können direkte Ausbrüche, bestätigte Absorptionscluster, Impulskerzen oder Kombinationen dieser Bedingungen Long- und Short-Signale erzeugen.
Positions- und Risikomanagement
Das Skript unterstützt unter anderem:
Long- und Short-Positionen
feste oder nachlaufende Stop-Loss-Marken
mehrere Teilgewinnziele
Breakeven nach dem ersten Gewinnziel
optionale zusätzliche Einstiege
Drawdown-Begrenzung und Begrenzung nach einer festgelegten Anzahl an Verlusttrades
interne oder externe Handelssignale
automatische Parameter nach Assetklasse und Zeitrahmen
Zusätzliche Einstiege und ein simulierter Hebel können das Verlustrisiko deutlich erhöhen.
Einschränkungen des Backtests
Die Ergebnisse des Strategietesters basieren ausschließlich auf historischen Kursdaten. Reale Ergebnisse können durch Gebühren, Spread, Slippage, Liquidität, Kurslücken und Ausführungsverzögerungen erheblich abweichen.
Vergangene Ergebnisse sind kein verlässlicher Hinweis auf zukünftige Ergebnisse.
Schließungseinstellungen
Über **Open Position Signals** wird festgelegt, wie neue Signale während einer bereits geöffneten Position behandelt werden:
* **Wait-End-Deal:** Alle Indikatorsignale werden bis zum Ende der Position ignoriert.
* **Wait-Signal-Close:** Nur ausdrückliche Signale zum Schließen einer Long- oder Short-Position werden berücksichtigt.
* **Wait-Reversal:** Zusätzlich kann ein entgegengesetztes Einstiegssignal die aktuelle Position schließen.
Für die integrierte Orderflow-Logik stehen verschiedene Schließungsbedingungen zur Verfügung. Eine Position kann beispielsweise durch einen gegensätzlichen Impuls, eine Kombination aus Cluster und Impuls oder ein bestätigtes entgegengesetztes Einstiegssignal geschlossen werden.
Zusätzlich kann der weitere Handel nach einer festgelegten Anzahl an Verlusttrades oder beim Erreichen des maximal erlaubten Drawdowns begrenzt werden.
Trailing-Stop, Breakeven und Liquidationslinie
Die Strategie unterstützt einen festen Stop-Loss sowie einen nachlaufenden Trailing-Stop. Der eingestellte Prozentwert beschreibt dabei den direkten Abstand zum durchschnittlichen Einstiegspreis und wird nicht automatisch durch den simulierten Hebel verändert.
Im Trailing-Modus wird der Stop nur in eine für die Position günstigere Richtung nachgezogen. Verändert sich der durchschnittliche Einstiegspreis durch einen zusätzlichen Einstieg, wird auch der bestehende Stop entsprechend angepasst.
Optional kann der Stop nach dem Erreichen des ersten Gewinnziels auf den durchschnittlichen Einstiegspreis verschoben werden. Hierfür muss ein Stop-Modus aktiviert sein.
Die angezeigte Liquidationslinie ist lediglich eine interne Schätzung auf Basis der simulierten Positions- und Kontowerte. Sie kann deutlich von der tatsächlichen Liquidationsberechnung eines Brokers oder einer Börse abweichen.
Verwendung externer Indikatoren
Anstelle des integrierten Poor-Man’s-Orderflow-Simulators kann eine externe numerische Signalquelle verwendet werden.
Hierfür muss der externe Indikator eine auswählbare Plot-Serie mit den folgenden Werten ausgeben:
* **+1:** Long- beziehungsweise Kaufsignal
* **−1:** Short- beziehungsweise Verkaufssignal
* **+2:** Short-Position schließen
* **−2:** Long-Position schließen
Bei allen anderen Werten oder bei `na` wird kein neues Signal ausgeführt.
Der externe Indikator muss die benötigten Zahlenwerte direkt über einen auswählbaren Plot bereitstellen. Anschließend wird dieser Plot unter **External Source** ausgewählt.
Ob und wie ein externes Signal während einer geöffneten Position verarbeitet wird, hängt zusätzlich von der gewählten Einstellung unter **Open Position Signals** ab. Estratégia

EMA/SMA Classics V1.0 by SRTEMA/SMA Classics V1.0 by SRT
The EMA/SMA Classics indicator was designed to answer one simple question:
"Which side of the market currently has the structural advantage?"
Instead of flooding the chart with buy and sell arrows, this indicator focuses on market structure, trend alignment, and high-quality price action, allowing traders to make their own execution decisions with greater confidence.
Whether you trade Forex, Indices, Commodities or Crypto, this indicator combines multiple market concepts into a clean workflow while remaining highly configurable through both EMA and SMA combinations.
What This Indicator Includes
• Flexible EMA / SMA Engine
Unlike traditional moving average indicators that are locked to one MA type, every moving average in this indicator can independently be configured as either:
EMA
SMA
Default settings:
MA 1 : 7
MA 2 : 40
MA 3 : 150
MA 4 : 200
You may use the default configuration or customise the periods to fit your own trading methodology.
• Dynamic Moving Average Stack Detection
The indicator continuously evaluates whether the visible moving averages are properly stacked.
Bullish Stack
Fast MA > Medium MA > Slow MA
Bearish Stack
Fast MA < Medium MA < Slow MA
When the moving averages lose their proper order, the market is treated as neutral instead of forcing a directional bias.
This helps reduce many false trend signals that occur during consolidations.
• ATR-Based MA Spacing Filter
One common problem with MA strategies is entering when all moving averages have already compressed together.
This indicator measures the spacing between moving averages using ATR.
When the moving averages become too compressed, trend quality deteriorates.
The spacing filter helps identify these lower-quality environments before momentum fully develops.
• Ladder Structure
One of the core concepts inside this indicator is the Ladder System.
Instead of only observing moving averages, the indicator also evaluates the market using multiple dynamic support and resistance structures.
Resistance
R9
R40
R70
R100
R150
Support
S9
S40
S70
S100
S150
These levels automatically update with market structure and are used to generate an additional Ladder Bias.
When both the moving averages and Ladder Bias agree, market structure is generally stronger than relying on moving averages alone.
• Flush Dot System
The indicator displays visual Flush Dots beneath or above candles whenever trend alignment exists.
Small Green Dot
Bullish MA alignment.
Small Red Dot
Bearish MA alignment.
Large Green Dot
Moving Average alignment + Bullish Ladder confirmation.
Large Red Dot
Moving Average alignment + Bearish Ladder confirmation.
The larger dots represent stronger structural agreement across multiple components.
• KeyBar Detection
The indicator automatically identifies two important price action patterns.
Engulfing Bars
Bullish Engulfing (EBull)
Bearish Engulfing (EBear)
These are filtered using ATR and minimum body size to avoid insignificant candles.
Long Tail Bars (LTB)
Bullish Long Tail Bars
Bearish Long Tail Bars
These identify strong rejection candles with defined tail proportions and body positioning.
An optional body-size filter is also available for traders wanting stricter candle selection.
Daily Pivot (DP)
Automatically plots the previous day's pivot.
Useful as:
Dynamic support
Dynamic resistance
Intraday reaction level
Weekly Pivot (WP)
Automatically plots the previous week's pivot.
Many swing traders use weekly pivots as major reaction zones throughout the trading week.
RSI Momentum Alerts
The indicator includes two independent RSI event types.
RSI Breakout
Signals when RSI breaks into extreme momentum territory.
Bullish breakout
Bearish breakout
RSI Retracement
Designed to identify momentum continuation after RSI exits an extreme condition while confirming with the RSI Moving Average.
These alerts can be useful for traders looking to participate after momentum has begun to recover instead of chasing extremes.
Information Panel
A compact table summarises the current market condition.
Displays:
Moving Average Bias
Ladder Bias
Long Tail Bar presence
This provides a quick snapshot without needing to inspect every component individually.
How To Use This Indicator
This indicator is not designed to generate automatic Buy or Sell signals.
Instead, it acts as a Market Context Indicator.
A typical workflow may look like this:
Step 1
Observe whether the moving averages are properly stacked.
A clean stack generally indicates directional order.
Step 2
Check whether the Ladder Bias agrees with the moving averages.
When both align, the market structure is generally stronger.
Step 3
Watch for KeyBars.
Examples include:
Bullish Engulfing
Bearish Engulfing
Bullish Long Tail Bar
Bearish Long Tail Bar
These often represent meaningful reactions within the prevailing structure.
Step 4
Use Daily Pivot and Weekly Pivot as areas where price may react.
These levels should be considered areas of interest rather than guaranteed reversal zones.
Step 5
Monitor RSI alerts for momentum shifts.
Momentum signals are generally more useful when they occur in the same direction as the prevailing market structure.
Suitable Timeframes
Although the indicator can be applied to multiple chart intervals, it generally performs best on:
M15
M30
H1
H4
Daily
The moving averages, Ladder System, and KeyBar detection adapt naturally across different timeframes.
Difference Between EMA/SMA Classics & H1 EMA/SMA + Higher Timeframe Analysis (Classic)
Although both indicators belong to the same ecosystem, they serve different purposes.
EMA/SMA Classics
Designed as a general-purpose structural trend indicator.
Features include:
Flexible EMA/SMA stacking
Ladder System
Flush Dots
Engulfing Bars
Long Tail Bars
Daily Pivot
Weekly Pivot
RSI Alerts
It can be used on virtually any timeframe and is ideal for traders who prefer to analyse the chart directly.
H1 EMA/SMA + Higher Timeframe Analysis (Classic)
The H1 version is a significantly more advanced market context engine.
In addition to everything above, it introduces:
Dedicated H1 Bias Engine
H4 Trend Analysis
Daily Trend Analysis
Higher Timeframe Bias Aggregation
H1TF Composite Bias
Overall Market Verdict Engine
Multi-layer Bias Table
Higher Timeframe Confirmation Workflow
Rather than focusing solely on the current chart, the H1 version continuously evaluates whether multiple timeframes are aligned before presenting an overall market verdict.
If the EMA/SMA Classics indicator answers:
"What is my current chart doing?"
Then the H1 version answers:
"What is the broader market structure telling me across multiple timeframes?"
The two indicators are complementary and can be used together depending on your preferred trading workflow.
Disclaimer
This indicator is designed to assist with market structure analysis and decision-making. It does not provide financial advice or guarantee profitable trades. Always combine indicator signals with sound risk management, personal analysis, and appropriate position sizing. Indicador

H1 EMA/SMA + Higher Timeframe Analysis (Classic) V1.0 by SRT# H1 EMA/SMA + Higher Timeframe Analysis (Classic) V1.0 by SRT
## Overview
H1 EMA/SMA + Higher Timeframe Analysis (Classic) V1.0 by SRT is a complete market context indicator designed to help traders read trend, structure and execution quality from a single chart.
Instead of relying on one indicator alone, this script combines multiple layers of market information into one unified framework:
• H1 Moving Average Bias Engine
• Higher Timeframe (H4 & Daily) Trend Confirmation
• Ladder Market Structure Analysis
• Dynamic Daily & Weekly Pivot Levels
• VWAP Bias Filter
• Engulfing & Long Tail Bar (LTB) Detection
• RSI Breakout & Retracement Alerts
• Composite Bias Dashboard
• Smart Alert System
The objective is simple:
Reduce subjectivity by helping traders identify when multiple independent factors agree before looking for trade opportunities.
This indicator is designed for traders who prefer trading with trend and market structure rather than relying on a single crossover or oscillator.
---
## Main Features
### ① H1 Bias Engine
The H1 Bias Engine evaluates the alignment of up to four configurable EMA/SMA lines.
Unlike traditional MA crossover indicators, this engine considers:
• Moving average order
• Price position relative to the moving averages
• MA spacing quality
• Trend strength
Bias is classified into:
• Strong Bullish
• Bullish
• Neutral
• Bearish
• Strong Bearish
An ATR-based spacing filter automatically ignores signals when moving averages become compressed, helping reduce false trend readings during consolidation.
---
### ② Higher Timeframe Bias
The script automatically evaluates both:
• H4 Trend
• Daily Trend
using a dedicated EMA40 / EMA150 / SMA200 structure.
These two higher timeframes are combined into a Higher Timeframe (HTF) Bias.
This allows traders to quickly determine whether H1 signals are aligned with the broader market direction.
---
### ③ Ladder Market Structure
The Ladder System measures how support and resistance levels evolve over multiple lookback windows.
Support Levels
S9
S40
S70
S100
S150
Resistance Levels
R9
R40
R70
R100
R150
The relative positioning of these levels produces a Ladder Bias ranging from:
Strong Bullish
Bullish
Neutral
Bearish
Strong Bearish
This provides an additional market structure confirmation independent of moving averages.
---
### ④ Composite H1TF Bias
One of the core components of the indicator.
H1TF combines:
• H1 Moving Average Bias
• Ladder Bias
to generate a stronger consensus trend.
Rather than reacting to a single condition, H1TF requires agreement between trend and structure before producing stronger directional confidence.
---
### ⑤ Final Verdict Engine
The Final Verdict combines:
Higher Timeframe Bias
*
H1TF Composite Bias
Only when both higher timeframe trend and H1 composite trend strongly agree will the dashboard produce:
Strong Bullish
or
Strong Bearish
This helps traders focus on higher probability market conditions instead of reacting to every market fluctuation.
---
### ⑥ Key Bar Detection
The indicator automatically detects two important price action patterns.
Bullish / Bearish Engulfing Bars
Long Tail Bars (LTB)
Each signal includes:
ATR size validation
Minimum body filters
Tail quality checks
Momentum confirmation
These are designed to highlight significant candles instead of every basic engulfing or pin bar.
---
### ⑦ Daily & Weekly Pivot Levels
Built-in pivot calculations include:
Daily Pivot (DP)
Weekly Pivot (WP)
These levels provide additional context for potential support, resistance and reaction zones.
---
### ⑧ VWAP Bias
The indicator includes a built-in VWAP filter.
Price above VWAP
Bullish
Price below VWAP
Bearish
This offers another layer of institutional-style market context that complements the moving average analysis.
---
### ⑨ RSI Momentum Alerts
Four RSI-based alerts are included.
Bullish RSI Breakout
Bearish RSI Breakout
Bullish RSI Retracement
Bearish RSI Retracement
These alerts are designed to identify momentum expansion as well as potential continuation opportunities after retracements.
---
### ⑩ Smart Alert System
The alert engine supports multiple event types.
H1 Bias changes
Higher Timeframe Bias changes
H1TF Composite changes
Ladder Bias changes
Bullish Engulfing
Bearish Engulfing
Bullish Long Tail Bar
Bearish Long Tail Bar
Optional filters allow alerts to trigger only when aligned with:
H1TF
Higher Timeframe
Strong Bias only
This helps reduce unnecessary alert noise.
---
## Reading the Bias Dashboard
The dashboard summarizes the complete market picture.
Daily
Daily Trend
H4
H4 Trend
HTF
Combined Higher Timeframe Trend
H1
Current H1 Moving Average Bias
Ladder
Market Structure Bias
H1TF
Combined H1 Trend
VWAP
Current VWAP Position
Verdict
Final Consensus
The strongest trading environments generally occur when multiple components point in the same direction.
---
## Typical Workflow
A simple workflow may look like this:
1. Check the Final Verdict.
2. Confirm H1TF agrees with the Higher Timeframe.
3. Observe whether VWAP supports the direction.
4. Wait for a qualifying Engulfing Bar or Long Tail Bar.
5. Use Daily Pivot, Weekly Pivot and Ladder levels for trade management.
This approach encourages waiting for confluence rather than entering solely because one indicator changes direction.
---
## Notes
This indicator is intended as a market context and decision-support tool.
It does not predict future prices and should not be considered a standalone trading system.
Like any technical tool, it performs best when combined with sound risk management, proper trade planning and disciplined execution.
---
Thank you for using H1 EMA/SMA + Higher Timeframe Analysis (Classic) V1.0 by SRT
I hope this indicator helps simplify chart analysis and encourages traders to focus on market structure, trend alignment and disciplined decision making.
— SRT
Indicador

AlgoStorm Institutional Session Structure (ISS)AlgoStorm Institutional Session Structure (ISS)
A complete intraday auction-structure engine that maps global session boxes (Asia, London, New York), the Globex overnight range, the Initial Balance with day-type extension targets, the Opening Range, and an automated overnight-inventory classification of the RTH open — directly onto your intraday charts.
The AlgoStorm Institutional Session Structure (ISS) indicator is designed for index futures and intraday traders who read the market through the auction lens: where overnight inventory built, whether the open printed inside or outside that inventory, whether the Initial Balance is containing rotation or the day is extending toward trend, and which session built the reference high or low everyone now trades against. It answers those questions structurally instead of drawing decorative boxes.
TIMEFRAME REQUIREMENT — READ BEFORE LOADING
This is an intraday tool. It refuses to run on 1D charts and above, and the chart timeframe should stay at or below the Opening Range length (the Opening Range and Initial Balance locks resolve at bar granularity). All session windows are DST-aware through a configurable IANA timezone, defaulting to New York time.
Technical Architecture: Fixed-Pool Session Engine
Session-structure indicators commonly rebuild their drawings on every bar, bloating chart performance and churning objects. ISS uses a different execution model:
Per-Session Box Engines: Each session runs its own tracking engine with a private box history. The active box updates its high/low boundary in place as the session develops; boxes older than the history cap (default five days, configurable to twenty) are evicted automatically.
Time-Window Lock Pipeline: The overnight range, Initial Balance, and Opening Range each accumulate in staging registers, then lock permanently the moment their window closes — the overnight at the RTH open, the IB and OR when their configurable minute-windows complete. Locked levels cannot move for the rest of the day.
Extension Mathematics: Extension targets use the classic day-type formula, extension(m) = IB low + m × IB range above the market and IB high − m × IB range below it, with 1.5× and 2.0× defaults. A 1.5× tag means price has traveled 150% of the IB range from the opposite IB boundary.
Zero-Churn Drawing Pool: Every level line and label is created exactly once at initialization and repositioned in place afterward. No per-bar create/delete cycles, no garbage-collection artifacts.
Label Anti-Overlap Engine: Right-edge labels (ON, IB, extensions, OR) are sorted by price each bar and automatically spaced apart whenever two or more sit within a configurable minimum gap (default 0.05% of price). Level lines always stay locked to the true price — only the label text position shifts to stay readable. On by default; fully optional.
Confirmed-Bar Alert Gate: Every alert condition is gated on confirmed bar closes inside RTH. Nothing repaints, and no alert can fire intra-bar and then vanish.
Features & Functionality
Session Boxes: Asia, London, and New York boxes with running high/low, dotted session-open line, and session label. Defaults cover the full sessions (18:00–03:00, 03:00–09:30, 09:30–16:00 New York time); killzone-style alternatives are documented in the input tooltips.
Overnight Range Lock: Globex high/low accumulated through the overnight window and held through the trading day — the reference frame for gap and inventory reads.
Initial Balance + Extension Targets: First 60 minutes of RTH (configurable 15–120) with configurable extension multiples for day-type classification: containment inside the IB, 1.5× tests, or 2× trend extension.
Opening Range: First 15 minutes of RTH (configurable 1–60) — the breakout reference for the open drive.
Overnight Inventory Read: At the RTH open, the engine classifies the print: above the ON high, upper half of the ON range, lower half, or below the ON low — the gap-risk context before the first rotation completes.
Session State Table: Active session, ON high/low, open-vs-ON classification, IB range (shows "forming…" while building, then the locked H/L) with a separate breakout status (inside IB vs. breakout ▲/▼), OR range and status, and which IB extensions have been tested — the whole auction state in one glance.
Alert Suite: Eight conditions — Opening Range breakout up/down, Initial Balance breakout up/down, overnight high/low break, and upper/lower reach of the second IB extension multiple (default 2.0×, trend-day behavior). The first multiple (default 1.5×) is tracked live in the state table but does not carry its own alert.
Honest limitations: ISS is structural context, not a signal system — no entries, no exits, no arrows . Intraday levels draw for the current day only by design; historical context comes from the session boxes. If you also run our Institutional Key Levels (IKL) script, keep IKL's Initial Balance, Opening Range, and Overnight toggles off so nothing double-plots — ISS is the time-anchored view, IKL is the right-edge level strip.
Open-source under CC BY-NC-SA 4.0. Educational tool — not financial advice. Indicador

Daily Range Exhaustion - ADR Probability MapAn intraday trader spends the whole session asking one question without ever measuring it: is there still room left in this move, or is the day already finished. Daily Range Exhaustion measures it.
The script records the completed range of every past day on the symbol you have open, and uses that sample to answer four things about the day in progress.
HOW MUCH OF THE DAY IS SPENT
Today's range is compared against the average daily range of the last 5, 10 or 20 days. The panel shows the result as a percentage. At 40 percent the day still has room in either direction. At 110 percent the day has already delivered more than an ordinary day and every further extension is, statistically, an outlier rather than the base case. The chart background tints once 100 percent is passed.
WHERE A FULL DAY COULD STILL REACH
Two levels are drawn:
Upside projection, today's low plus the average daily range. This is the highest point a statistically ordinary day could still print without becoming unusual.
Downside projection, today's high minus the average daily range.
Both compress as the session develops. Early in the day they sit far apart. By the afternoon they have squeezed toward price, and the distance left to each one is exactly the room the day has left. The shaded areas between price and each projection are that remaining room, made visible.
THE ODDS OF EXTENDING ANYWAY
Ranges are not a hard ceiling, so the panel reports how often the ceiling actually broke. Three lines show the share of past days whose range exceeded 100, 125 and 150 percent of the current average. On most liquid instruments roughly a quarter to a third of days exceed 100 percent, but far fewer reach 150 percent. Those numbers are the honest context for the exhaustion reading: they tell you whether a stretched day is rare or routine on this particular symbol.
WEEKDAY BREAKDOWN
A single average across all days hides a real effect. Many instruments have a quiet Monday and a violent Thursday, and judging Monday against a blended average will make it look exhausted when it is behaving normally. The panel breaks the sample down by weekday, shows the average range of each one, and expresses it as a percentage of the overall average. Today's weekday is highlighted.
HOW TO USE IT
As a filter on entries. Taking a fresh breakout when the day has already spent 120 percent of its average range is a different trade from taking the same breakout at 45 percent. The setup may be identical, the room available is not.
As target context. If the upside projection is 12 points away and your target is 30 points, the day would have to become a statistical outlier for that target to fill.
As mean reversion context. A day that hits the projection level and stalls has, by definition, reached the edge of its usual distribution.
As session planning. Check the weekday row before the session opens to know whether to expect a wide day or a narrow one.
NOTES ON THE DATA
The sample is built from the chart itself, so it needs history loaded. The panel shows a Building sample message and stays hidden until the minimum day count is reached, rather than showing statistics based on six observations.
Only intraday timeframes are supported. On a daily chart or higher the concept has no meaning, and the panel says so instead of printing misleading numbers.
Older days are dropped once the sample cap is reached, so the statistics follow the current volatility regime instead of averaging in a market from two years ago.
Days are bounded by the exchange session of the symbol. On instruments that trade nearly around the clock the day boundary is a convention, not a natural break, which slightly inflates the ranges of days that straddle a rollover.
WHAT IT IS NOT
There are no entry or exit signals here, and none are planned. This is context. A completed range is not a reversal signal, and an unfinished range is not a reason to expect continuation. Trends routinely spend two or three average ranges in a session, which is precisely why the extension odds are shown rather than hidden.
This is an analysis tool, not financial advice. Past distributions do not guarantee future ones. Use it alongside your own risk management and position sizing. Indicador

Session Range Completion ClockThis indicator measures WHEN, inside a chosen intraday session, that session's range is actually
built. It answers a question that session tools normally skip: by a given time of day, how much of
the day's eventual range is typically already spent, and has the extreme that will define the day
usually already printed?
It draws no levels, marks nothing on price, and produces no signals. It is a measurement
instrument that reports descriptive statistics over the sessions in your loaded history.
THE UNDERLYING PRINCIPLE
A session's range is not built at a constant rate, and how it is built differs by symbol, by
session and by contract. The script assumes nothing about the shape - it measures it on whatever
instrument and window you point it at.
"How much range is left" and "is the extreme already in" are two different statistics, and the
script keeps them separate. For every completed session in the loaded history it records the
running high and low at the end of each time bucket, then waits for the session to close so the
FINAL range is known. It then attributes, for each bucket:
- the fraction of the final range that had been traversed by the end of that bucket;
- whether the session's high had already been made at or before that bucket;
- whether the session's low had already been made;
- whether both were already in place, meaning the range was finished and everything afterwards
happened inside it;
- the traversed range expressed in units of daily ATR or of the previous day's range, which makes
the figure comparable across volatility regimes.
These are accumulated across sessions and reported as means and frequencies.
HOW TO READ THE TABLE
The table is drawn once, on the last bar of the chart. Each row is a point in time, labelled with
the clock time at the end of that bucket.
"n" is the number of sessions contributing to that row. "Range built" is the mean percentage of
the session's final range already traversed. "High set" and "Low set" are the percentage of
sessions in which that extreme was already established. "Both set" is the percentage of sessions
in which the entire range was already complete; that column is shaded by value. "Range/unit" is
the mean range so far in the normalization unit selected in the inputs, which is named in the
bottom-right cell.
If the session contains more buckets than the row limit, buckets are sampled at an even stride so
the table still ends on the session's final bucket.
The pane also plots two lines during a live session: the current session's range so far, and the
mean range so far of all prior qualifying sessions at the same point in the session, both in the
same unit. That is a like-for-like comparison at equal elapsed session time. It is not a
projection and the script does not extend either line forward.
On a daily or higher chart the table prints a message instead of statistics: the whole measurement
is defined on intraday bars and there is nothing to compute.
WHAT IT DOES NOT DO
It does not predict where price will go, does not identify breakouts, and does not mark levels. A
high "Both set" figure at a given time means only that historically, on this symbol and this
session, the range was usually already complete by then. It is a frequency over past sessions, not
a statement about today, and nothing in the script says whether acting on it would be a good idea.
METHOD, AND WHY IT DOES NOT REPAINT
A session is folded into the statistics only after it has closed, so the session in progress never
contributes to its own statistics.
Historical values are never recalculated. The statistics accumulate forward in time, which means
the historical-mean line on early bars was computed from a smaller sample than the same line on
recent bars. That is deliberate; the alternative would be a curve that silently rewrites its own
past.
The daily normalization unit comes from a single bundled request on the daily timeframe. The
requested expression is offset by one bar and the request uses lookahead, which is the pair the
Pine Script documentation specifies for confirmed higher-timeframe values: the offset discards the
daily bar that is still forming and returns the one before it, which was already final. Historical
and realtime bars therefore receive the same value. This matters more here than it looks, because
the unit is latched once at session start and then used for that whole session - a unit that
differed between live and reloaded charts would give a session two different "Range/unit" figures
depending on when you looked at it.
Time buckets are anchored to the declared session start time rather than to the first bar
observed. This keeps the time-of-day axis stable on illiquid symbols, on sessions that run through
midnight, and on continuous 24-hour sessions where there is no gap between sessions to detect. A
session string containing more than one range, such as 0900-1130,1230-1500, is treated as a single
window running from the first start to the last end; buckets falling inside the break carry the
pre-break state forward, which is what you want, because the range does not reset over lunch. An
optional day mask such as 0930-1600:23456 is respected.
SETTINGS
Session and Session time zone define the window. Use the exchange's own time zone so buckets stay
aligned across daylight-saving changes.
Bucket size should be a multiple of the chart timeframe. A bucket narrower than the chart
timeframe contains no bars of its own and simply carries the previous bucket's state forward.
Minimum session completeness excludes half-days, early closes and partially loaded history, which
would otherwise depress the late-session figures. Lower it if a market you are studying
legitimately has short sessions.
Normalise range by chooses between daily ATR and the previous day's range. ATR is smoother; the
previous day's range reacts faster.
ORIGINALITY
The session and time-of-day category on this platform is overwhelmingly made of level-drawing
tools: opening-range boxes, session high/low lines, session shading. Those draw where. Very little
published measures when, and the two are different objects - this script plots nothing on price at
all.
There is a small existing family of scripts that chart the distribution of the hour at which the
daily high or low prints, and the "High set" and "Low set" columns overlap with that idea. This is
not a reskin of any of them: the accumulator here is cumulative by elapsed session time rather
than a histogram of one timestamp, it is folded only on session close, it is keyed to a
user-supplied session string with mid-session-break handling and a day mask, and it is combined
with final-range-fraction and volatility normalization. No code is borrowed from any published
script.
LIMITATIONS
Requires an intraday chart timeframe.
The sample is whatever history the chart has loaded, which on lower timeframes may be only a few
hundred sessions - check "n" before reading anything into a row.
Results are sensitive to the chart timeframe, because the exact bar on which an extreme prints is
resolution-dependent. Coarser timeframes will place extremes in later buckets than they truly
occurred.
The "Range/unit" column can be based on a smaller sample than the percentage columns, because the
earliest sessions in the loaded history have no completed daily bar to normalize against and are
skipped for that column only.
Sessions spanning a daylight-saving transition can be misattributed by one hour for a single day.
On non-standard chart types - Heikin Ashi, Renko, Kagi, Point and Figure, Range - the highs and
lows are synthetic, so the statistics describe the synthetic series rather than traded prices.
The statistics describe the loaded history only and carry no assumption that the distribution is
stable over time.
Source is open and commented. Indicador

Intraday Price Path Signature - London New York Tokyo WindowsOverview
Intraday Price Path Signature is a time-window price-action study for traders who want to examine how price movement develops inside selected intraday focus periods, including windows commonly monitored around the Tokyo/Asia, London and New York opens.
A conventional session highlighter mainly answers when a regional session is active. This indicator addresses a different question: how was price travel distributed and directed inside the selected window?
Each enabled window is divided into four equal clock-time phases, P1 through P4. The script measures the amount, direction and efficiency of price travel in each phase, classifies the completed sequence, and compares its phase concentration with prior occurrences of the same named window.
The result is a compact price-path signature rather than a broad session background, a set of session levels, or a buy/sell signal. It can be used to research London, New York, Tokyo/Asia or custom focus windows sometimes described by traders as kill zones, without assuming that any time window guarantees a particular outcome.
What makes this different
Most session tools focus on time identification through background shading, open/close markers, session ranges or active-session status. This script focuses on the internal formation of price movement inside a narrower research window.
Its main analytical differences are:
- Four-phase decomposition of every enabled window.
- True-range-style gross price travel that includes gaps between consecutive sampled bars.
- Directional-efficiency filtering so a phase is not called upward or downward merely because it finishes slightly above or below its start.
- A deterministic completed-window classification based on path efficiency, direction alignment, phase concentration and direction changes.
- Independent rolling comparisons for each named window and each matching phase.
- A completed phase strip that states the full P1-P4 sequence directly on the chart.
- A fixed panel that keeps live analytical context away from the candle area.
Core calculation
For each bar inside a focus window, gross bar travel is calculated as:
Gross bar travel = max(high - low, abs(high - previous sampled close), abs(low - previous sampled close))
The first sampled bar uses its own high-low range. This is a bar-based, true-range-style approximation of movement. It includes gaps, but it does not reconstruct the exact tick-by-tick path inside a candle.
The accumulated travel is divided among four equal clock-time phases:
Phase share = phase gross travel / completed-window gross travel
A phase share identifies which quarter of the configured time window contained the greatest portion of measured price travel. It is not a volume measure.
Phase direction is filtered by directional efficiency:
Phase directional efficiency = abs(phase close - phase open) / phase gross travel
When efficiency reaches the configurable threshold, the phase is classified as upward or downward according to its net displacement. When it does not, the phase is classified as rotational. This distinguishes an efficient directional move from a phase that travels extensively but finishes near its starting point.
The completed window also receives a path-efficiency value:
Window path efficiency = abs(window close - window open) / completed-window gross travel
Completed path classifications
A completed window is assigned one descriptive classification. When more than one condition is true, the first matching classification in the following priority order is used:
- Persistent rise or Persistent fall: sufficient window path efficiency and enough phase travel aligned with the completed direction.
- Rotational path: the phase sequence contains the configured number of directional changes and does not qualify as persistent.
- Front-loaded rise or Front-loaded fall: the first two phases contain the configured share of total travel.
- Late acceleration up or Late acceleration down: the final two phases contain the configured share of total travel.
- Phase concentration: one phase contains the configured dominant share of total travel.
- Evenly distributed: the difference between the largest and smallest phase shares remains within the configured tolerance.
- Mixed path: no earlier classification is satisfied.
These labels describe the completed structure under the selected thresholds. They are not forecasts, probabilities or trade recommendations.
Reading the completed phase strip
The default chart annotation is a two-line phase strip for each completed focus window. An example is:
● ASIA P1↑ P2↔ P3↓ P4↑
Front-loaded rise · Peak P2 35.8%
The first line shows the phase sequence:
- P1 through P4 identify the four equal clock-time phases.
- ↑ means the phase completed with sufficient upward directional efficiency.
- ↓ means the phase completed with sufficient downward directional efficiency.
- ↔ means the phase was rotational or did not meet the directional-efficiency threshold.
- · means the phase was not sufficiently observed.
The second line states the completed path classification and identifies the phase containing the largest share of gross price travel. The strip color identifies the configured window. By default, Asia is cyan, London is amber and New York is pink.
Completed strips are anchored to the final bar of their own window and rendered in front of the price chart. Their bodies extend to the left of the anchor so later bars to the right are less likely to pass underneath a historical strip.
The default Auto opposite close placement puts an upward-closing window below its protected price envelope and a downward-closing window above it. Automatic clearance considers the completed-window range, twelve preceding bars, opening and closing gaps, sampled internal gaps, the first bar after completion, local bar range, ATR and a small window-specific lane offset.
This system is designed to reduce candle overlap during normal chart use, including gap conditions. Because labels have a fixed screen-space size while chart scale and zoom remain user-controlled, extreme chart compression can still change the apparent distance between a label and nearby bars. Additional clearance is available in the settings.
Reading the fixed panel
The default bottom-left panel displays only enabled windows and keeps live detail away from the candles.
FOCUS shows the window icon, short code and configured local hours.
STATUS shows whether the window is live, closed or waiting. A live row also shows current completion progress.
PATH identifies the current phase and developing direction sequence while a window is live. After completion, it shows the most recent path classification.
PULSE shows four activity blocks representing the relative gross-price-travel share of P1 through P4. Taller block characters indicate a larger share. PULSE is a price-travel distribution, not volume or order flow.
CTX shows the developing price range during a live window. After completion, it shows the peak phase, its share and, when available, its empirical percentile. A diamond followed by a number is the percentile rank of that peak phase against the same phase of earlier occurrences of the same named window.
Independent historical comparison
Asia P1 is compared only with earlier Asia P1 observations. London P3 is compared only with earlier London P3 observations. New York, London Close and Custom maintain their own independent histories. Data from different named windows or different phase positions is not mixed.
The default rolling baseline contains 24 eligible completed windows and requires at least six prior samples before displaying percentiles. The current completed observation is ranked before it is added to its own history, so it does not inflate its own percentile. Tied values use a mid-rank treatment.
These percentiles are descriptive empirical ranks from the available rolling sample. They are not probabilities of future direction, continuation or reversal.
The following observations are excluded from the rolling baseline:
- A window first encountered after its configured start time because chart history began partway through it.
- A completed window with fewer than the required number of observed phases.
- A window with no measurable gross price travel.
- A window sampled on a chart environment that does not meet the selected timeframe or chart-type requirements.
Default focus windows
Asia Open: 09:00-10:00, Asia/Tokyo, enabled.
London Open: 08:00-10:00, Europe/London, enabled.
New York Open: 09:30-11:00, America/New_York, enabled.
London Close: 15:00-16:30, Europe/London, disabled by default.
Custom Focus: 12:00-13:00, Etc/UTC, disabled by default.
The default day mask is Monday through Friday. Each window has its own IANA timezone, so London and New York follow their selected local daylight-saving rules. These times are configurable research references, not universal exchange, broker or instrument schedules.
Display modes and customization
Phase strip is the publication default. It shows completed phase strips and the fixed panel without broad session shading.
Phase strip + adaptive lens adds a very light live background lens whose hue and transparency respond to the current phase direction and concentration.
Research detail enables optional legacy pulse blocks, block captions and larger research summaries.
Panel only removes bar-anchored chart annotations and leaves the fixed panel.
Users can adjust window names, codes, icons, hours, days, timezones, colors, panel placement, strip clearance, retention limits, analytical thresholds, historical lookback, minimum sample count, visual modes and alerts.
Suggested use
This indicator is intended for intraday research. Five-minute charts generally provide the clearest balance between phase detail and readability. The default maximum timeframe is 15 minutes and can be changed by the user.
Possible research questions include:
- Did most movement occur early or late in the selected window?
- Was the path persistent, rotational, evenly distributed or dominated by one phase?
- Did the largest phase have an ordinary or unusual share relative to recent matching windows?
- Do different instruments show different path signatures around the same local open?
- Does a custom focus period behave differently from the standard Asia, London or New York defaults?
The study can be applied to liquid intraday markets where time-of-day behavior is relevant, including FX, index products, futures, equities and cryptocurrencies. Users should adapt the configured times to the instrument and data feed being studied.
Alerts
Optional informational alerts are available for focus-window start, focus-window completion and unusually high phase concentration relative to the selected historical percentile threshold. Alerts describe an observed state. They are not entry or exit signals.
Limitations and data behavior
- The calculation uses chart bars, not tick data, and cannot reconstruct the exact intrabar route taken by price.
- PULSE measures price travel, not traded volume, liquidity or order flow.
- Historical percentiles depend on the amount and quality of chart history currently available.
- Missing bars, illiquid periods and data-feed differences can change phase sampling.
- Holidays, early closes, exchange-specific breaks and broker-specific schedules are not detected automatically.
- Live panel values develop as new bars arrive and are not final until the window completes.
- Completed phase strips are created from information available when the window ends. The script does not use future bars or lookahead data.
- No higher-timeframe price request is used; calculations are based on the current chart bars and configured local times.
- A standard chart type is required by default. Transformed chart types can alter measured paths and are therefore disabled unless the user overrides the requirement.
- Classification results depend on the selected thresholds. Changing inputs recalculates historical results under the new configuration.
- Automatic label clearance reduces overlap but cannot control every possible screen layout, zoom level or manual chart-scale compression.
What this indicator does not do
- It does not generate buy or sell signals.
- It does not provide entries, exits, targets, stops or position sizing.
- It does not predict the next phase or the next session.
- It does not claim a win rate, accuracy rate or profitability improvement.
- It is not a strategy or a backtest system.
- It is not financial advice.
Use the output as descriptive context alongside independent analysis and risk management. Indicador

Previous Day / Week / Month Highs & LowsPrevious Day / Week / Month Highs & Lows.
A precision multi-period key-level tool that automatically draws previous-period highs and lows from the Daily, Weekly and Monthly timeframes — plus optional midpoints, an optional grid of psychological round-number levels around price, and a compact right-side info table with distance-to-price for every visible level. Built for intraday, scalping and swing traders who want a clean, opinionated read of the reference levels that institutional desks actually watch.
How it works:
The indicator pulls the previous completed candle from D, W and M via request.security and anchors each level line at the exact open time of that source bar — so a Weekly line starts on last week's Monday, not on the current week's first bar. Lines stay live and extend to the right through the chart's future offset area, so the reference points from yesterday, last week and last month are always visible on the current bar. The optional round-number grid re-anchors to price on every bar, so the closest N round levels above and below are always in view.
What it calculates:
- Previous Day High / Low + optional Midpoint (PDH, PDL, PD MID)
- Previous Week High / Low + optional Midpoint (PWH, PWL, PW MID)
- Previous Month High / Low + optional Midpoint (PMH, PML, PM MID)
- Psychological round-number grid centered on the current price, with adjustable step and count
- Live distance from the current close to every enabled level (in %)
Key features:
- Per-period visibility toggles: enable exactly the levels you use, hide everything else
- Configurable history depth — keep 1 to 20 previous daily / 1 to 12 weekly / 1 to 6 monthly sessions on the chart
- Auto-hide only when the chart timeframe strictly exceeds the level period: Daily levels stay on 1D, Weekly stay on 1W, Monthly never hide
- Lines anchored at the source bar (open time of the previous D/W/M candle), not at the first bar of the new period — you see the actual range the level came from
- Label anti-collision system: each label sits on its own horizontal slot in the right-offset area, with configurable Label Spacing — PDH / PWH / PMH texts never overlap even when their prices are close together
- Compact right-side info table with three columns (level name, price, +/- % distance to close), positioning across 6 chart corners, three text sizes, adjustable background transparency
- Three line styles (Solid / Dashed / Dotted) applied independently to main lines, midpoints and round levels
- Adjustable line width, label size and label visibility for a clean or a dense look
- Line extension modes: Right (default), Both, or None
- Fully customizable color per period — defaults follow a heat-scale palette (Daily = yellow, Weekly = orange, Monthly = red — nearest to furthest horizon)
- Round-number step tuned per asset class (BTC / ETH / FX / index / equities)
- Built-in alerts: PDH / PDL touched, same for weekly and monthly
- Auto-adapts to any instrument and any chart timeframe
Who it's for:
Intraday, scalping and swing traders — SMC / ICT, price-action, order-flow, or classical technicals — who want the exact levels institutional desks pin their orders around, cleanly drawn, without the visual noise of a dozen overlapping tools. Indicador

Indicador

Market Structure + Swing Levels [AFD]Market Structure + Swing Levels organizes confirmed swing highs and
swing lows into configurable price Zones. Its default ATR mode sizes each
individual Zone from volatility at the Swing origin Bar; Tick, Point, and
Currency modes provide fixed-distance alternatives. It then describes
confirmed continuation Breaks, direction-changing Shifts, and the initial
direction assignment without trade instructions or predictive claims.
## Publication and license
- Publication type: Open-source.
- Pine version: 6.
- License: Mozilla Public License 2.0 (MPL 2.0).
- The open-source publication setting, this description, and the MPL 2.0
notice in the Pine source header must remain aligned.
The source is available for inspection and modification under MPL 2.0. This
summary identifies the applicable license; the notice in the Pine source
header remains the authoritative license reference.
## Capabilities
- Confirms Swing Highs and Swing Lows using the same selected strength on both
sides of the candidate Bar.
- Shows classifications by default: `H`, `HH`, `EH`, and `LH` for highs, and
`L`, `HL`, `EL`, and `LL` for lows.
- Builds ATR-, Tick-, Point-, or Currency-width Zones around confirmed Swings.
- Merges transitively overlapping same-side Zones into exact-union clusters.
- Evaluates Structure on confirmed Bars using selectable Close or Body
clearance.
- Lets Zone breaks use that Structure rule or an inclusive High/Low Touch of
the far edge.
- Retains broken Zones by default with configurable memory and color.
- Reports current direction, latest Structure event, active Zones, and
nearest-Zone distance in the Dashboard.
- Provides four fixed Structure alert conditions plus an optional combined
dynamic alert that can include Zone breaks.
## How to use it
1. Select a Preset Profile or choose Custom and set Swing Strength. The default
Swing profile uses a strength of 7 Bars on each side.
2. Choose the Zone Width Mode and width appropriate for the chart.
3. Choose how Structure confirms a clearance. Close is the default; Body
requires both the Open and Close to clear the reference.
4. Zone Break Basis follows the Structure rule by default. Touch (High/Low)
instead breaks a Zone when the wick reaches or passes its far edge.
5. Swing High and Swing Low Zone labels start at the oldest Swing Origin
represented by each Zone. Select Right Edge when current-Bar alignment is
preferred.
6. Swing High and Swing Low text have separate color controls. Both default to
white and also color the matching Swing classification labels. Zone Age,
Break, Shift, and Dashboard text also start white.
7. The Dashboard starts with all five rows visible. Disable nearest-Zone
distance when only Direction, Last Event, and Zone counts are needed.
8. Show Broken Zones starts on with a 20-Bar memory. Turn it off for an
active-Zones-only chart.
9. Zone Age starts off. When enabled, its unit starts in Days.
## How to interpret Zone cluster counts
The `×N` suffix is a cluster membership count. `Swing High ×3` means three
confirmed Swing High Zones are represented by that merged cluster.
It does not mean price tested one exact price three times. Zones merge when
their price bands overlap or meet at an edge. Merging is transitive, so one
connected Zone can bridge two other Zones even when those outer Zones do not
directly overlap each other. The displayed cluster preserves the full union of
those connected bands, and `×N` reports how many confirmed Swing Zones
contributed to it.
## Broken Zones
Show Broken Zones is the explicit on/off control:
- On by default — the Zone freezes at its break-confirmation Bar, changes to
Broken Zone Color, and remains visible for the selected Broken Zone Memory.
- Off — a Zone is deleted as soon as it breaks.
- Up to 20 broken Zones are retained. If more accumulate before their memory
expires, the oldest retained Zone is removed first.
This display choice does not change how Zone breaks are detected and does not
change alert behavior.
## Limitations and evidence
- Swings require the selected number of Bars on both sides, so confirmation
occurs after the origin Bar.
- ATR Zone width uses volatility from the Swing origin Bar.
- Currency-width mode creates no Zone when the symbol does not provide a valid
Point Value.
- Active Zones are capped at 40 per side. When the cap is reached, the oldest
active Zone on that side is removed first.
- Hours and Days shown for Zone Age are timeframe-based approximations and do
not correct for session gaps.
- Cluster membership describes connected Zone bands, not repeated reactions at
one exact price.
- Repository checks pass for the working source. TradingView compilation and
runtime verification of the latest working source have not yet been
recorded.
- This indicator is educational chart context and does not provide trade
instructions. Indicador
