The Fluid Trader sessionsTHE FLUID TRADER SESSIONS 🌊
The Fluid Trader Sessions indicator provides a clean, automated overlay of major macroeconomic trading windows. Built for precision and clarity, it tracks the Asia, London, and US sessions, dynamically plotting session highs and lows while actively filtering out swept liquidity levels to keep your charts clutter-free.
CORE FEATURES ⚡
🌍 AUTO-DST SYNCHRONIZATION: Built with native timezone logic (New York, London, Tokyo), the indicator automatically adapts to summer and winter time changes (Daylight Saving Time). Your session windows are always dead-accurate without any manual offset adjustments.
📰 US PRE-MARKET (NEWS) WINDOW: Specifically isolates the highly volatile 08:30 - 09:30 EST window (US News/Pre-Market open) with dedicated candle coloring, giving you a clear visual edge right before the US equities cash open.
🎯 DYNAMIC SESSION HIGHS & LOWS: Automatically tracks and plots the highest high and lowest low of the active Asia, UK, and US sessions.
🛡️ SMART SWEEP DETECTION: Once a historical session extreme is swept (broken) by current price action, the indicator automatically deletes the corresponding line and label. This ensures your chart only displays untouched, relevant liquidity pools.
🐾 LIVE RANGE TRACKING: Displays real-time, developing session boundaries using dotted lines, which automatically finalize into solid, fixed lines the moment the session closes.
🕯️ TARGETED CANDLE COLORING: Visually segments market phases with customizable candle colors for Asia, UK, and US sessions, allowing you to read the market rhythm at a glance.
🚀 PERFORMANCE OPTIMIZED: Includes a built-in pruner to limit the number of active historical lines (preventing chart lag) and a weekend filter for traditional market traders.
A CLEARER WAY TO TRADE. 💧
Awareness | Timing | Discipline | Execution インジケーター

Multi Cycle Session Boxes
Multi Cycle Session Boxes is an overlay tool that frames freely defined time windows with a box that grows with the price inside it.
It is built for anyone who keeps drawing the same rectangle over the same hours — a trading session, the run-up to a weekly close, a month, a season — and would rather have that window marked on every repetition without touching the chart again.
The principle is a plain comparison: each session holds a start point and an end point, and while the current bar falls between them the box tracks the highest high and the lowest low reached since the window opened.
There is no indicator arithmetic behind this; the entire calculation is calendar arithmetic carried out in a timezone of your choosing, which is what allows the same window to repeat on a daily, weekly, monthly or yearly cycle.
Seven such sessions run independently of one another, each with its own cycle, its own window and its own colors.
Timezone
Timezone: the timezone all seven sessions are evaluated in; Exchange follows the timezone of the symbol itself.
SESSION 1 (present seven times, SESSION 1–SESSION 7, each instance identically structured)
Show boxes: switches the session on or off.
Repeat: the cycle the window repeats on — Daily, Weekly, Monthly or Yearly.
It also decides which of the time fields below are evaluated.
Session 1 Time (Start:End)
Month: first and last month of the window, evaluated in Yearly only.
Day: first and last day of the window, evaluated in Weekly, Monthly and Yearly. In Weekly the day is counted from 1 for Monday to 7 for Sunday, otherwise it is the day of the month.
Hour: first and last hour of the window.
Minute: first and last minute of the window.
Session 1 Graphic
Fill: color of the box area.
Border: switches the border on or off, and sets its color and its width.
A box opens on the first bar that falls inside the window and is redrawn with every bar that follows: its upper edge sits at the highest high reached since the window opened, its lower edge at the lowest low, and its right edge moves along with the last bar still inside.
Once the window closes the box stays where it is, so what builds up on the chart is a record of what each repetition of that window actually contained.
Every session keeps its last seventy boxes and removes the oldest as new ones open, which keeps all seven of them together within what the platform allows a single script to draw.
The end of a window is exclusive: a window ending at 15:30 contains the bar before it, not the 15:30 bar itself.
A window whose end lies before its start is not discarded but crosses the boundary of its cycle instead, which is how an overnight session from 22:00 to 06:00 remains a single box.
If start and end are set to the same point, the window is open at all times and each box then spans one full cycle before the next one begins.
In Weekly the two day fields count only up to seven, and higher values are read as Sunday.
In Monthly and Yearly a day the calendar month does not have is never reached: an out-of-range start skips that repetition altogether, an out-of-range end carries the box through to the end of the month.
One point worth knowing before the first attempt: a window can only be resolved as precisely as the chart's timeframe permits.
A window from 12:00 to 15:30 needs bars that fall inside those hours — on a daily chart no bar begins at 12:00, so nothing is drawn there.
This indicator is intended solely for market analysis and does not constitute investment advice or a guarantee of success.
Use it at your own discretion and risk; past results are not indicative of future performance.
インジケーター

Market Mood | Session RangeMarket Mood | Session Range helps traders understand how much a market has moved during each trading session, how that movement compares with previous sessions, and whether today’s range is expanding faster or slower than usual.
The indicator combines session boxes with a compact dashboard covering Frankfurt, London, New York, Sydney, and Tokyo. Each session is calculated independently, including when sessions overlap.
The dashboard presents four core readings:
• MOVE SO FAR — The distance between the highest and lowest prices recorded since the session opened. This measures the session’s range so far, rather than the net change from its opening price or the total distance traveled by price.
• AVG. MOVE — The average range of previous completed sessions of the same type. London is compared with previous London sessions, New York with previous New York sessions, and so on. The default averaging period is 20 completed sessions and can be adjusted.
• AVG. USED — The current session’s movement divided by its historical average, expressed as a percentage. For example, a current movement of 15 pips against an average of 30 pips produces a reading of 50%. Readings above 100% mean the session has exceeded its average range.
• TODAY’S ACTIVITY — A comparison with historical movement at the same elapsed time within the session. This adds time context to the current range.
For example, suppose London has moved 20 pips after its first hour, while previous London sessions averaged 12 pips at that same point. Today’s movement is approximately 167% of the usual first-hour movement.
The activity column classifies this comparison as:
• Slower — Below 80% of the usual movement at that time.
• Usual — Between 80% and 120%, inclusive.
• Faster — Above 120% of the usual movement at that time.
These thresholds are configurable. They describe relative range expansion; they are not probabilities, trend signals, or measures of trading profitability.
Activity assessment starts after 15 minutes by default and updates on confirmed candle closes. “Starting” appears during the initial waiting period. “Learning” appears when there are not enough historical observations at the matching elapsed time. The comparison requires five completed sessions, or the selected averaging period if it is shorter than five. Hovering over an activity value reveals the supporting comparison.
Movement units adapt to the instrument:
• Forex pairs use pips, with an optional custom pip-size setting.
• Non-forex instruments, including metals, indices, energy markets, and cryptocurrencies, use percentages.
For non-forex instruments, session movement is calculated as:
Session Movement (%) = (Session High − Session Low) ÷ Session Opening Price × 100
Each historical session is measured against its own opening price before the percentage average is calculated. A 0.50% movement against a historical average of 1.00% therefore represents 50% of the average used.
Session schedules are configurable in each city’s local time. Location-based timezones automatically account for daylight-saving changes where applicable. The clock display timezone can be set separately.
Display settings include session colors, boxes, opening lines, historical drawings, text size, and dashboard position. The default dashboard shows active sessions. Detailed view also includes closed sessions and their available averages. Hiding a session’s chart drawings does not disable its calculations.
Optional alerts notify users when a session reaches 80%, 100%, or 120% of its average range. Each enabled threshold triggers once per session, on a confirmed candle close. If several thresholds are reached on the same candle, they can appear together in the alert.
The indicator uses completed sessions for historical averages and excludes incomplete sessions from those averages. The current session’s reference average remains fixed throughout that session. Available chart history determines how many past sessions can be included.
Use standard time-based candles from 1 to 60 minutes, with candle boundaries aligned to the configured session times. Missing bars or misaligned boundaries can cause a session to be marked as partial. The optional live-update mode allows movement readings to change during the forming candle; activity assessments and alerts remain close-confirmed.
Market Mood | Session Range provides context for session movement. An average is not a maximum: exceeding 100% does not imply that price must stop or reverse. Faster activity also does not indicate whether price will rise or fall.
インジケーター

Auto Range Detector [QuantAlgo]🟢 Overview
The Auto Range Detector is a structural analysis tool built for traders who work around consolidation. It automatically scans every bar across multiple window sizes, tests each candidate against a set of independent structure filters, and draws a box where price rotated between two boundaries and stayed contained by them. Every stage is volatility normalized against the symbol's own history, so one configuration behaves consistently on a five minute crypto chart and a daily equity chart alike. Whether you fade the edges, trade the resolution, or simply want the ranges on your chart drawn the way you would draw them by hand, the indicator turns raw price into confirmed structures, marked breakouts, and a definition of "range" that you have complete control over on any asset and any interval.
🟢 How It Works
The indicator tests up to three window sizes on every bar: the base scan length, double it, and triple it. Each window places two boundaries using the method you choose, measures the band height, and ranks that height against its own history on the symbol and interval, so the volatility gate reads as a percentile of what the market normally produces. The window then has to pass four independent structure tests: enough midline crossings per bar to establish two sided rotation, enough bars reaching each boundary, a regression slope flat enough to show a stable mean, and enough closes held between the boundaries. The longest window that clears every test defines the range.
Once a structure qualifies, the left edge walks backwards through earlier history for as long as price stayed inside the band, and lands only on a bar held within the boundaries wick and all, so a box begins on a candle that belonged to the structure. The range stays provisional until it has spanned a minimum number of bars, and a provisional structure that breaks is cleared without a marker, leaving only structures that held on the chart. A break is confirmed on a close or a wick beyond the boundary, with an ATR buffer that filters marginal clears.
🟢 Key Features
▶ Multi-Scale Detection
The scan tests up to three window sizes on every bar: the base length, double it, and triple it, with the longest qualifying window defining the range. Boundary Basis then decides where the two edges sit and how range height is measured. Percentile band trims outlying wicks so no single spike defines the box, with the percentile itself adjustable. Absolute extremes places the edges on the extreme wicks and measures peak to trough. Body extremes works from opens and closes only, which suits instruments with erratic wicks such as thin crypto pairs. Signal Timing governs whether everything waits for the bar to close or evaluates the forming bar, and ATR Length sets the volatility unit every distance in the script is expressed in.
▶ Structure Filters
Five settings decide whether a candidate window is a range. Compression Percentile is the volatility gate, ranking band height against the symbol's own history so the threshold means the same thing on any instrument. Min Rotation Rate requires midline crossings per bar, which is what separates a genuine range from a reversal that happens to span the same distance. Min Boundary Touches requires both sides to be visited more than once, so a single spike high paired with a single spike low does not qualify, with Touch Definition and Touch Tolerance controlling what registers as a visit. Max Drift limits how far the mean of the window may tilt. Min Containment requires a share of closes to sit between the boundaries, rejecting structures where price only passed through the zone. Every test has its own control, so the definition can be set to tightly held rectangles or to looser rotational structures.
▶ Range Behavior
Range Anchoring decides where the left edge lands once a structure qualifies. Scan window only draws the box across the window the filters evaluated. Extend to containment walks the edge backwards through earlier bars that stayed inside the band, up to an adjustable ceiling, so the box covers the full consolidation. Minimum Range Bars holds a new structure provisional until it has run long enough, and a provisional structure that breaks is cleared without a marker. Absorb Overshoot lets a boundary take in a marginal wick rather than closing the box on it. Break Confirmation and Breakout Buffer decide what ends the range, on a close or a wick, and how far past the boundary price must clear. Cooldown Bars and Max Range Age govern what happens after a range resolves.
▶ Deviation Merging
Optional handling for a break that closes back inside the range. With this enabled, the broken structure is held open briefly and a close back between the boundaries revives it: the box resumes from its original left edge, the breakout marker is withdrawn, and the excursion is marked at its extreme, leaving one continuous structure with a failed break inside it rather than a breakout followed by a fresh box over the same price. Left disabled, every break is final.
▶ Range Visualization
Each structure is drawn as a gradient shaded box that fades from the boundaries toward equilibrium, with an optional midpoint line and quartile levels marking where a rotation is already extended. A live tag reports whether the structure is forming or confirmed, how many bars it has held, and its height as a percentage of price. Breakout markers print below the bar on an upside break and above it on a downside break.
▶ Built-in Alerts
Ready-made alert conditions fire when a new range is detected, when one breaks to the upside or downside, on any range break, and when a failed break returns price inside the structure.
▶ Color Presets
Six presets (Classic, Aqua, Cosmic, Cyber, Neon, Custom) drive the bullish and bearish pair, with the range color held separate so a live structure always reads as neutral against whichever pair is active. Custom mode exposes individual color pickers. Every border, line, fill, and label is contrast corrected against the chart background automatically, so a color close to your background lifts far enough to read while shading stays light enough to keep price action visible.
インジケーター

Consolidation Ranges [ITA]🟠 OVERVIEW
Consolidation Ranges finds the places where price stopped trending and went sideways, draws the range while it forms, marks the bar that closes outside it, and then keeps watching to see whether that breakout actually held.
Finding a sideways range is the easy half. Every tool in this category draws the box and marks the breakout, and then stops, which is where the trader's real problem starts. The most common complaint about trading ranges is that the breakout fails and price comes straight back in, and almost nothing measures how often that happens.
So this one waits. After a breakout it gives price a set number of bars to stay outside. Close back inside within that window and the breakout is marked Failed. Stay out and it is marked Held. The running count of both sits in the corner.
🟠 CONCEPTS
* Consolidation - A stretch of bars whose full high to low span stays inside a chosen multiple of ATR. Measuring the range in ATR rather than in points means the same setting behaves the same way on a quiet symbol and a volatile one.
* Range Widening - While price stays inside, the box grows to contain each new bar, but only while the result is still narrow enough to count as a range. Without that limit a slow drift never breaks out, it just drags the box along with it.
* Breakout - The first close outside the box. The close matters rather than the wick, because a wick outside a range is the thing that most often reverses.
* Confirmation Window - The number of bars a breakout is given to prove itself.
* Held and Failed - What actually happened. Held means price stayed outside for the whole window. Failed means it closed back inside the range it had just left.
🟠 FEATURES
🔹 Range width measured in ATR, so one setting works across symbols and timeframes rather than needing to be retuned for each
🔹 The box builds live as the range develops and locks on the bar that breaks it
🔹 Breakouts marked in both directions at the price where the close happened
🔹 Every breakout followed to an outcome and labelled Held or Failed
🔹 A running count of held against failed breakouts, with the rate, for the symbol and timeframe on screen
🔹 Separate alerts for a break up, a break down, a failed breakout and a held breakout
🔹 If the settings are strict enough that nothing is found, the chart says so and names the two inputs to change, rather than leaving you looking at an empty chart unable to tell a quiet symbol from a bad setting
🟠 HOW TO USE
Set Range Length first. It decides how significant a consolidation has to be before it is drawn at all. Twenty bars is a reasonable starting point on any timeframe. Raise it for fewer and larger ranges.
Max Width is the second control. If nothing is being found on a volatile symbol, raise it. If the whole chart is boxes, lower it.
Then read the count in the corner before anything else. It is telling you whether breakouts on this symbol and timeframe have been worth taking. A symbol where most breakouts failed is not a symbol to trade breakouts on, and that is worth knowing before the next one rather than after it.
Bars To Confirm decides how patient the measurement is. A short window counts quick reversals as failures. A longer one only counts a breakout as failed if price genuinely came back.
🟠 CONCLUSION
Drawing the range is the part every tool does. The part that decides whether the range was worth trading is what happened after the break, and that is what this one records. インジケーター

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. インジケーター

Percent Range Tool
Percent Range Tool is an overlay indicator that lays a percentage scale over the chart, measured from the current close.
It's built for anyone who thinks in percentage distances rather than in absolute prices — for judging how far a move would have to carry, for setting targets and stops in percentage terms, or for comparing symbols whose price levels have nothing in common.
Rather than working from fixed percentage steps that have to be reset for every symbol and every timeframe, the scale sizes itself: it takes the highest high and the lowest low within a lookback window, measures how far each of them sits from the current close, and lets the wider of the two distances stand for one hundred percent. Everything in between is divided into equal steps.
A single length input therefore governs the entire scale, while its placement and its color stay adjustable.
Calculation
Length: number of bars searched for the highest high and the lowest low.
Appearance
Offset: distance in bars between the current bar and the right-hand end of the levels.
Extend Levels to the Left: carries every level to the left across the whole chart.
Line Color: color of the lines and of their labels.
Label Size: font size of the percentage labels.
The indicator draws twenty horizontal lines, ten above the close and ten below it, each labelled with its percentage at the right-hand end.
The outermost pair marks the full distance the market covered within the lookback window; from there the levels step inward in equal increments, and their alternating lengths and line styles make the steps easy to count at a glance.
Since only the wider of the two distances sets that outer edge, the nearer of the two extremes lands somewhere inside the scale rather than on an edge of its own.
On higher timeframes the scale often runs wider than one hundred percent, because the distance to the high is open-ended while the distance to the low can never exceed one hundred percent — a price cannot fall further than to zero.
The levels that would land at or below zero are left out entirely, so on those charts fewer lines appear below the close than above it.
The whole block sits to the right of the last candle, in the empty space beyond the current bar rather than over the price action itself, so depending on how much room the chart leaves on the right it may take some scrolling before the levels come into view.
Extended to the left, they run back across the chart instead, which places every percentage beside the bars it refers to — the staggered lengths then no longer have any effect, and the steps are told apart by line style alone.
Only the current state is drawn.
Nothing is placed on past bars and there is no history to scroll back through: with every new bar the lookback window moves on, and both the close and the two extremes it is measured against can change, so the levels are rebuilt and the percentages on the labels shift with them.
On the bar still forming they follow the live price and settle once that bar closes.
Because the scale is derived from the range rather than fixed, its numbers differ from symbol to symbol and from timeframe to timeframe — a quiet market produces a narrow scale, a volatile one a wide scale.
This indicator is intended solely for market analysis and does not constitute investment advice or a guarantee of success.
Use it at your own discretion and risk; past results are not indicative of future performance.
インジケーター

Tail Range Percentile Radar [Pineify]Tail Range Percentile Radar
Overview
Tail Range Percentile Radar separates candle rarity from candle shape. Four aligned scan lanes compare true range, real body, upper wick and lower wick with their own recent histories. It describes anatomy, not the next move.
Problem Definition
An ATR multiple measures distance from an average, but the same multiple can occur in very different distributions. A long range may also be mostly gap, body or wick. A wick-to-body ratio alone is unstable near a doji and says nothing about historical rarity. Ask two questions: is this component unusual, and does it occupy enough of this candle to matter?
Design Rationale
Separate ranks preserve anatomy hidden by one volatility score. The candidate is excluded from its reference window so an extreme cannot alter its own baseline. Half-weight ties avoid treating repeated tick sizes as distinct observations. A minimum high-low share rejects historically rare but visually trivial parts. Averaging all four ranks was rejected because a large body could mask an exceptional wick; retaining four lanes costs screen space but preserves the reason for each event.
Key Features
Four prior-only percentile populations with explicit zero handling.
Independent range and share-qualified body or wick flags.
A confirmed anatomy strip, three close-only alerts and optional statistics.
How It Works
TR is the largest of high-low, the distance from high to the previous close, and the distance from low to the previous close. Body is absolute close-open; wicks are the distances from the body edges to high and low. Each magnitude is rounded to the symbol's tick size. Its rank is 100 times the count of smaller prior values plus half the equal values, divided by N. Zero parts receive zero. All N preceding bars must have valid OHLC and previous-close data; invalid coverage leaves every lane blank.
A flag needs rank at or above Q. Body and wick flags additionally need their configured share of high-low; a zero high-low gives zero shares. Tail flags do not require extreme TR. The displayed type prioritizes dual tail, upper tail, lower tail, directional body, gap-led range, then range only. Gap-led requires extreme TR and at least 35% of TR outside high-low. Component flags remain independent of this display priority.
How Multiple Indicators Work Together
The four measurements are one candle decomposition, not unrelated trading signals. Rank supplies historical context; share supplies geometric relevance; their conjunction supplies body and tail flags. TR retains total movement, including movement beyond high-low relative to the previous close. Without share, tiny parts can be highlighted; without separate ranks, unusual anatomy disappears inside a single range score.
Trading Ideas and Insights
An upper-tail event identifies an unusually large upper wick, not proven selling pressure or a short entry. A lower tail is equally descriptive. Compare a tail inside ordinary TR with a range event dominated by a body: the patterns answer different anatomy questions. Clusters invite chart review but do not establish reversal odds.
Unique Aspects
Relative to an ATR threshold or candle ratio, the added mechanism is a prior-only, tie-aware four-population comparison with geometric qualification and explicit mixed-tail precedence. It preserves tail rarity even when total range is ordinary. Zero suppression prevents absent wicks from becoming exceptional merely because a reference sample contains many zeros.
How to Use
Read the lanes from top to bottom: gold TR, purple body, orange upper wick, teal lower wick. Each uses its own zero baseline and equal height for 0-100; stacked positions are not a shared numeric axis. Dashed rails mark Q, vivid columns show qualifying components and dots confirm them at close. Use the table or Data Window for actual ranks and anatomy codes. The diamond strip marks the selected closed-bar type.
Customization
Start with N=200, Q=95, wick share=20% and body share=55%; these are design starting points, not optimized settings. Shorter N responds sooner but uses fewer comparisons; higher Q or shares rejects more bars. The statistics window defaults to 100 chart bars. Its rates use eligible closed bars, with sample coverage shown; overlapping flags can sum above 100%. Guides, tips, strip, table and four colors are configurable.
Assumptions and Limitations
Use standard OHLC charts; synthetic candles change the meaning of anatomy. Price scale changes, splits, session gaps, stale bars and regime shifts can distort the raw-size reference. No volume or order-flow data is used. Rank 95 is a sample comparison, not a 5% future probability; it also does not measure how far beyond history a new maximum lies. At least N valid prior observations plus previous-close coverage are needed. Live ranks, shading and table type can change intrabar; tips, strip and alerts require close. Alerts apply to every qualifying closed bar, so consecutive bars can each alert and dual tails can trigger both tail alerts. Choose once per bar close. Parameters, chart history and feed revisions can change results. There is no entry, exit, profitability or reversal model.
Conclusion
The range percentile radar distinguishes unusual total movement from unusual candle parts while keeping rarity and shape separate. Use it as a compact explanation of observed tail volatility, with independent decision rules.
インジケーター

[Chrona] Opening Range Breakout Opening Range Breakout
An opening-range tool for instruments that have an opening auction. It draws the
first 15 and 30 minutes of a session as a range, marks the candle that broke it,
and projects targets measured from the broken level.
WHAT IT DRAWS
- The 15-minute and 30-minute opening range of each enabled session, as a box
whose high and low freeze when the range closes. The right edge keeps
following the last printed bar until the session ends, so the box grows with
price and never extends past it.
- An optional midline through the range.
- A tag on the candle that confirmed the break — above it on an upside break,
below it on a downside one, so the side carries the direction.
- 1R and 2R targets for the 30-minute range, measured from the broken level.
- Right-axis price tags for the levels and targets of whichever session is open.
- Optional pre-market ranges: the same opening-range construction run on the
lead minutes before a session opens.
Four sessions run independently — Asia, London, New York and COMEX — each
evaluated in its own timezone.
ORIGINALITY AND UTILITY
Multi-session opening ranges are common. These are the parts that are not, and
they are the reason this exists rather than a settings preset of something else:
- The range is built from one-minute intrabars, not from chart bars. On a
15-minute chart a chart-bar implementation cannot see inside the first bar, so
its "15-minute range" is whatever the first candle happened to be. This one
requests 1-minute data and measures the real first 15 and 30 minutes, so the
box is the same box on a 1-minute chart and on an hourly one.
- Three break-confirm modes — touch, chart close, and a 5-minute close — and the
5-minute close is computed natively from time("5") buckets rather than
requested from a higher timeframe. A higher-timeframe request returns the
developing value while the bar is still forming, which is how a break appears
and then un-appears. Nothing here repaints.
- Targets are anchored to the broken level, not to the range. A level-anchored
1R sits one range-width from the level price; a range-anchored one drifts with
whichever edge is used to measure it. The two disagree on every trade, and the
level is the price actually broken.
- Each session carries its own timezone, so daylight saving is resolved per
region rather than by one global offset. London shifting a week before New
York does not move the New York range.
- Nothing is hardcoded to 09:30. Instruments with no equity open work by typing
their real hours: XAUUSD has no cash open at all, and COMEX gold's pit open is
08:20 New York time.
- The pre-market range is derived from its parent session's own window rather
than configured separately, so the two cannot drift apart when either is
edited, and its levels stay live through the parent session — the range forms
before the open and the break lands after it.
- The break tag exists because of a specific blind spot: on a 1- or 2-minute
chart you cannot see where the 5-minute bar closed. The tag marks the candle
that carried that close.
METHOD
For each enabled session the script takes the session window you set, in that
session's timezone, and masks it to weekdays. It collects one-minute highs and
lows from the session open and freezes the extremes at 15 and 30 minutes. A
break is tested against the frozen level in the confirm mode you choose. Once
broken, targets are placed at one and two range-widths from the level, and a
retest is reported when price returns to within a tenth of a range-width of it.
Everything is evaluated on confirmed bars.
ALERTS
Break up, break down, both-sides-broken, and level retest, per session and per
range. Alerts are armed in the settings, but the script's alert calls do nothing
until TradingView has an alert of its own on this indicator with the condition
"Any alert() function call".
Two things about TradingView alerts worth knowing: they fire on the realtime bar
only, never on bars that already printed, so a break that happened before the
alert existed leaves no alert behind; and TradingView saves a copy of the script
when the alert is created, so an alert keeps running the version it was made
from. Re-create alerts after updating.
REPAINT
Nothing repaints. Every value is read on confirmed bars, higher-timeframe
requests are not used, and the 5-minute confirm lands one chart bar after the
5-minute close by construction rather than being back-dated.
LIMITATIONS
- The range needs one-minute data. How far back that data is available varies by
timeframe and by your TradingView plan, so on a lower plan the historical
boxes stop earlier than they do on a higher one. "Prior days to keep" defaults
to 1, which keeps this within the recent sessions most of the time.
- On a 1-minute chart and below there is no lower timeframe to request, so the
script falls back to the chart bars themselves — which at those timeframes are
already at or finer than 1-minute resolution.
- Sessions are only as correct as the hours you give them. The defaults are
reasonable for index futures; other instruments need their real hours typed in.
- An opening range assumes an opening. On instruments that trade continuously
with no auction, the pre-market range in particular is a borrowed idea rather
than a measured one.
This is an analysis tool, not financial advice.
インジケーター

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. インジケーター

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. インジケーター

The Magnet ModelThe Magnet Model — Opening Range Volume Profile
The Magnet Model ORVP is designed to turn the opening auction into a simple, repeatable map of where volume established value and where those levels may continue to matter throughout the trading session. It will automatically map the key volume-based levels established during New York opening range.
Instead of manually drawing a Fixed Range Volume Profile each morning, the indicator automatically builds the opening profile and identifies the Point of Control (POC), Value Area High (VAH), and Value Area Low (VAL). Once the opening range is complete, these levels extend to the right, allowing traders to monitor how price interacts with them throughout the session.
Key Features
Automatic 9:30–9:46 AM New York Opening Range Volume Profile
Automatically calculates VAH, POC, and VAL
70% Value Area by default
VAH, POC, and VAL automatically extend to the right
Shaded Value Area between VAH and VAL for quick visual reference
Current ORVP is highlighted pink
Previous ORVP zones can use different colors to distinguish sessions
Adjustable number of historical ORVPs displayed
Clean date labels such as 8/31 ORVP
Adjustable profile rows and profile width
Customizable colors, line widths, and line styles
Optional Overlap Detection Deletion to automatically remove older ORVP zones that overlap the newest value area
Designed to maintain a clean chart while preserving important historical opening-range levels
How It Can Be Used
The ORVP provides a structured framework for evaluating the market after the opening range has formed.
VAH, VAL, and POC can serve as important areas to monitor for:
Acceptance and rejection
Support and resistance
Breakouts and failed breakouts
Retests
Potential price magnets
Continuation or reversal opportunities
Historical ORVP levels can also remain on the chart, allowing traders to identify when price returns to areas of value established during previous sessions.
Best Used With Confluence
While The Magnet Model ORVP is powerful on its own, it can become even more effective when combined with other high-quality market references and confirmation tools.
Consider looking for confluence with VWAP, Simple Moving Averages (SMAs), Initial Balance (IB), key session levels, and order flow.
Some of the strongest areas of interest can develop when multiple independent levels or signals align with an ORVP VAH, VAL, or POC, providing additional context for potential support, resistance, acceptance, rejection, and directional movement.
The goal is not to trade an ORVP level blindly, but to use it as part of a broader framework of confluence.
Overlap Detection
When Overlap Detection Deletion is enabled, the indicator compares each newly completed value area with older ORVP zones.
If an older VAH-to-VAL value area overlaps the newest value area, the older profile is automatically removed.
This optional feature helps reduce chart clutter and keeps the focus on distinct opening-range value areas.
Default Configuration
Opening Range: 9:30–9:46 AM New York
Value Area: 70%
Profile Rows: 100
VAH / VAL / POC: Black, 2-width lines
Current Value Area: Pink, 20% opacity
Historical Value Areas: Differentiated by color
Send me a message with any questions or requests.
For educational and informational purposes only. This indicator does not provide financial advice or guarantee future market behavior. インジケーター

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. インジケーター

Session Stats I EonMetrics Session Stats by EonMetrics
Every market has session folklore: "Asia is quiet", "London sweeps the overnight range", "the New York morning makes the high or low of the day". This tool replaces the folklore with numbers — it measures how each session has actually behaved on YOUR symbol, on YOUR chart's history, and shows the result in one table.
🔶 WHAT THIS TOOL IS AND IS NOT
This is a statistics dashboard, not a signal generator. It draws no entries, no targets, and it does not predict anything. It counts what already happened, so you can judge whether a session tendency on your instrument is real or imagined. All statistics are computed from completed sessions on confirmed bars. The only element that moves intrabar is the TODAY row, which is clearly labeled LIVE while a session is still open.
🔶 WHY THESE METRICS ARE ONE SCRIPT, NOT SEVERAL
Every row of the table answers the same single question — "what does this session usually do here?" — from a different side: how much it moves (range), where it sits in the day's structure (high/low of day), which way it leans (bull close, continuation), and how much participation it carries (volume share). Splitting these apart would leave each number without the context that makes it readable. The TODAY row then compares the current session against that same measured history, which is only possible because the history and the live reading live in one engine.
🔶 WHAT IT MEASURES
For up to four configurable sessions (defaults: Asia, London, NY AM, NY PM — New York time), over up to 500 stored trading days:
- Days (n) — the sample size behind every number in that column. Small samples (under ~20) are flagged in orange, because statistics on a handful of days are weak. If a number matters to you, check its n first.
- Avg Range and Median Range — the session's range expressed as a percent of the daily ATR, so quiet and violent weeks can be averaged together honestly. The median is shown next to the average on purpose: one news day can inflate an average, but it cannot drag a median. A big gap between the two tells you the session's "typical" day is calmer than its average suggests.
- High of Day / Low of Day — how often the session contained the trading day's extreme. A star marks the most frequent session in each row.
- Bull Close — how often the session closed above its open. Near 50% means no directional lean worth talking about.
- Continuation — how often the session repeated the direction of its own previous occurrence. Above 50%: the session tends to continue its behavior day over day; below: it tends to alternate.
- Vol Share — the session's average share of the whole trading day's volume.
- TODAY — the current session's range as a percent of daily ATR, plus its percentile within that session's own history. "62% (88th)" reads: today's London has already covered 62% of a normal day's range, which is larger than 88% of past Londons in the sample.
A weekday filter (Mon-Sun checkboxes) restricts the whole sample to the days you care about — Fridays only, weekdays only, and so on.
🔶 HOW THE NUMBERS ARE BUILT
-------------------------
The trading day rolls over at 18:00 in the selected session timezone, so the Asia session that opens in the evening belongs to the day it actually shapes. The daily ATR used for normalization is built internally from those same trading days (previous completed days only), which keeps the "day" definition consistent on 24/7 markets and means the ATR value is fixed for the whole current day. The script uses no higher-timeframe data requests. Session records are written once, when the session completes on a confirmed bar, and never change afterwards.
🔶 HOW TO USE IT
1. Add it to an intraday chart (1-minute to 1-hour). Let the chart load as much history as your plan allows — more history, bigger sample.
2. Check the Days (n) row first. Then read the table column by column: which session moves, which one sets the day's extremes, which one leans.
3. Use the TODAY row during the session: a high percentile early in the window tells you this session is already unusual relative to its own history.
4. Two alerts are available: one fires when any tracked session closes, one when the live session's range first reaches your chosen percentile (default 90th) of its own history.
🔶 SETTINGS
Four session slots (on/off, name, window, color), session timezone, sample depth, daily ATR length, weekday filter, optional rows (median, continuation, volume share), table position/size/theme, background tint of the active session, and the alert percentile.
🔶 LIMITATIONS
Session statistics describe the past; they are tendencies, not guarantees, and they can change when market conditions change. On symbols without meaningful volume data the Vol Share row will be empty. The tool needs an intraday chart — on daily and higher timeframes there are no bars inside a session window to measure.
This tool is for analysis and education. It is not financial advice, and past behavior of a session does not guarantee its future behavior. Always do your own analysis and manage your own risk.
インジケーター

PineDrawExtracted from TheStrat Suite, where these components render six timeframes of levels on a single chart without running out of drawing objects. Nothing here knows anything about TheStrat, or about any strategy. It is the layer underneath: put an object at an exact price and time, keep it updated, and keep the chart readable when several of them land on the same price.
The script ends with a small demo that marks the prior bar's high and low, so you can add the library to a chart and see the primitives run before importing anything.
Library "PineDraw"
Object primitives for indicators that draw price levels: update lines,
boxes and labels in place instead of deleting and recreating them every tick, pool
labels so a busy chart stays under the object limit, and merge labels that land on the
same price so they read as one row instead of overlapping.
updateLine(ref, x1, y1, x2, y2, col, w, style)
Update a line in place, or create it if the reference is na.
Parameters:
ref (line) : Existing line, or na on the first call.
x1 (int) : Left anchor, in bar time (ms).
y1 (float) : Left price.
x2 (int) : Right anchor, in bar time (ms).
y2 (float) : Right price.
col (color) : Line color.
w (int) : Line width.
style (string) : One of line.style_solid, line.style_dashed, line.style_dotted.
Returns: The line reference. Assign it back: `myLine := updateLine(myLine, ...)`.
updateBox(ref, x1, y1, x2, y2, bg, border)
Update a box in place, or create it if the reference is na.
Parameters:
ref (box) : Existing box, or na on the first call.
x1 (int) : Left anchor in bar time (ms).
y1 (float) : Top price.
x2 (int) : Right anchor in bar time (ms).
y2 (float) : Bottom price.
bg (color) : Fill color.
border (color) : Border color.
Returns: The box reference.
clearLine(ref)
Delete a line if it exists. Assign the result back to clear your reference.
Parameters:
ref (line) : Line to remove, or na.
Returns: na, typed as a line.
clearBox(ref)
Delete a box if it exists. Assign the result back to clear your reference.
Parameters:
ref (box) : Box to remove, or na.
Returns: na, typed as a box.
newPool()
Create an empty pool. Assign to a `var` so it survives across bars.
Returns: A new LabelPool.
method reset(this)
Start a render pass. Hides any label left over from the previous pass.
Namespace types: LabelPool
Parameters:
this (LabelPool) : The pool.
Returns: The pool, for chaining.
method acquire(this, x, y, txt, useBarIndex, bg, txtCol, sz)
Take the next label from the pool, creating one only if the pool is exhausted.
Namespace types: LabelPool
Parameters:
this (LabelPool) : The pool.
x (int) : Anchor, bar time in ms when useBarIndex is false, otherwise a bar index.
y (float) : Price.
txt (string) : Label text.
useBarIndex (bool) : Anchor to bar_index instead of bar time. Use for labels that should
float at a fixed offset from the current bar rather than sit at a point in history.
bg (color) : Background color.
txtCol (color) : Text color.
sz (string) : One of size.tiny, size.small, size.normal, size.large.
Returns: The label, already positioned and styled.
newSet()
Create an empty label set for one render pass.
Returns: A new LabelSet.
method add(this, price, txt, joiner, tolerance)
Add a label at a price, merging into an existing row if one is close enough.
Namespace types: LabelSet
Parameters:
this (LabelSet) : The set.
price (float) : The price to label.
txt (string) : The text to add.
joiner (string) : Placed between merged entries, for example " + ".
tolerance (float) : How far apart two prices can be and still share a row, in price units.
Pass 0 to merge only exact ticks. syminfo.mintick is a sane floor; a fraction of
ta.atr() adapts across instruments.
Returns: The set, for chaining.
method flush(this, pool, x, useBarIndex, bg, txtCol, sz)
Draw a consolidated set through a pool, in one call.
Namespace types: LabelSet
Parameters:
this (LabelSet) : The set to draw.
pool (LabelPool) : The label pool to draw through.
x (int) : Anchor for every label in the set.
useBarIndex (bool) : Anchor to bar_index instead of bar time.
bg (color) : Background color.
txtCol (color) : Text color.
sz (string) : Text size.
Returns: The number of labels drawn.
lineStyle(style)
Map a style name to a Pine line style constant.
Parameters:
style (string) : "Solid", "Dashed" or "Dotted". Anything else returns dotted.
Returns: A line.style_* constant.
textSize(name)
Map a size name to a Pine size constant.
Parameters:
name (string) : "Tiny", "Small", "Normal" or "Large". Anything else returns small.
Returns: A size.* constant.
LabelPool
A reusable set of labels. Hold one in a `var` at the top of your script.
Fields:
items (array) : Every label ever allocated by this pool.
used (series int) : How many have been handed out in the current render pass.
LabelSet
A set of labels-to-be, grouped by price.
Fields:
prices (array) : One entry per distinct price.
texts (array) : The merged text for each price. ライブラリ

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. インジケーター

Consolidation Ranges & Breakout Map [MQLSoftware]Consolidation Ranges & Breakout Map reads the market's sideways regime as a measurable object. It detects compression with an authored Range Compression Index, fixes the consolidation box only after enough confirmed evidence, tracks how the box resolves — breakout, measured-move projection reached, false break, or expiry — and reports the measured base rates of those outcomes counted on the chart's own history.
This is a visual analytical tool for chart study. It does not execute trades and does not provide financial advice.
Key Features
Consolidation boxes fixed on confirmed evidence only: a candidate must hold the compression threshold for a minimum number of confirmed bars before it becomes a live range — borders never move backwards once fixed
Amber forming frame while compression is still building, so you see the candidate before it commits
Breakouts by confirmed CLOSE beyond the border plus an ATR buffer — wicks and gaps alone never trigger a breakout
Measured-move projections (1× and 1.618× the range height by default) drawn from the broken border — a geometric reference derived from the range's own size
Outcome tracking on confirmed bars: ✓ printed when the 1× projection is reached, ✕ false break when price closes back inside within the fakeout window, quiet expiry when the resolution window runs out
Range invalidation discipline: a box that "breathes" beyond its edge-update budget or outgrows the maximum width is annulled and excluded from the statistics, so pseudo-ranges never contaminate the base rates
Measured base rates in the panel: share of upside breakouts, share that reached the 1× projection, share of false breaks, median bars to 1×, median range length — each with its sample size
Higher-timeframe context band (rolling HTF high/low), optional volume-expansion quality gate, four panel modes, five confirmed-bar alerts plus one dynamic JSON alert
Core Concept — what is original here
TradingView has many box-drawing and Darvas-style tools; most fix a rectangle from a simple highest/lowest lookback and leave the interpretation to the reader. This script makes the detector itself measurable and then closes the loop by counting what actually happened. Three specific algorithmic elements:
1. The Range Compression Index (RCI). A 0–100 composite authored for this script: RCI = 100 · (0.40 · ineff + 0.35 · vc + 0.25 · cont), where ineff = 1 − min(ER, 1) is movement inefficiency (the inverse Kaufman efficiency ratio — net displacement over the evaluation window divided by the bar-to-bar path traveled), vc is volatility compression (short ATR against a 4× longer ATR window, rescaled to 0..1), and cont is containment — the share of closes inside the central 90% of the candidate box. Each component measures a different facet of "sideways": no net progress, contracting volatility, clustering closes. A candidate also has to pass a geometry gate — its width may not exceed a configurable multiple of ATR. The sensitivity presets set the RCI threshold (Low 70, Normal 62, High 55).
2. The consolidation → breakout state machine. SEEKING → FORMING → LIVE → BREAK UP / BREAK DOWN → RESOLVED / FALSE BREAK / EXPIRED, with every transition on confirmed bars only. The box is fixed only after the minimum number of confirmed compression bars. A fixed border may be widened by a wick within the edge tolerance a limited number of times — each update on a confirmed bar and counted; beyond the budget the box is invalidated and never enters the statistics. A breakout requires a confirmed close beyond the border plus the ATR buffer; a bar that pierces both borders resolves by its close; a close back inside within the fakeout window is classified as a false break (checked before the projection within the same bar, deliberately conservative). The resolution window defaults to three times the range's own duration, capped at 200 bars.
3. Measured base rates. The panel reports observed frequencies counted on this chart's loaded history: how often ranges broke upward, how often the breakout reached the 1× measured-move projection, how often the break turned out false, the median bars to 1× and the median range length — each with its sample size. Below a minimum sample the panel prints the sample gate instead of a percentage, so small-sample noise is never dressed up as a statistic. Observed frequencies, not assumptions, and no claims attached to them.
Anatomy of the Display
Live range box — steel border with a faint fill, header with the range's duration and height in ATR; midline optional
Amber dashed frame — a FORMING candidate: compression is building but the box is not yet committed
▲ / ▼ breakout markers on the confirmed breakout bar (Descriptive or Compact style)
Dashed projection lines from the broken border with 1× and 1.618× labels at the right edge
✓ 1× printed where the projection is reached, ✕ false break where price closed back inside
Translucent higher-timeframe band with the rolling HTF high/low and a timeframe tag
Panel (Off / Minimal / Normal / Large): state in plain words (SEEKING / COMPRESSING n/m / RANGE LIVE / BROKE UP / BROKE DOWN / FALSE BREAK), the live Range Compression Index with a five-block meter, range height and duration, position inside the range, and in Large mode the measured base-rate section
Notes on Repainting
All state transitions, breakout/outcome markers, statistics counters and alerts fire on confirmed bars only and never move once printed
Box borders are fixed on the confirming bar and never move backwards; the only permitted change is a forward widening within the edge tolerance, on a confirmed bar, a limited number of times
The live box's right edge, the FORMING candidate frame and the panel's live rows update intrabar — visual context, not signals
The higher-timeframe band uses one request.security call with lookahead off and reads the previous confirmed HTF value — no future data anywhere
Display inputs only gate drawing; they never change the state machine, the counters or the alerts
Typical Analysis Workflow
Watch the panel's Compression row: a rising RCI with an amber forming frame means a candidate is building
When RANGE LIVE prints, read the box header — a 40-bar range 1.2 ATR tall is a different regime than an 8-bar pause
Treat the breakout marker as a measured event, not an invitation: the base rates tell you how often breakouts on this chart reached the projection versus failed back into the box
Use the false-break share as regime context — some markets punish breakout chasing far more often than others, and the panel will say so with a sample size
Check the higher-timeframe band: a local range at the edge of the senior range is a different situation than one in the middle of it
Configuration
Range Detection — compression sensitivity preset (RCI threshold), evaluation window, minimum confirmed bars to fix a box, maximum width in ATR, containment threshold, edge tolerance and the edge-update budget
Breakout — ATR buffer for the confirmed close, fakeout window, both projection multiples, resolution window (auto = 3× range duration), optional volume-expansion gate with its multiple
Higher-Timeframe Context — band on/off, HTF (empty = auto: 4× chart timeframe capped at 1W), HTF range length
Statistics — base-rate section on/off, minimum sample to display a percentage
Visual — panel size and position, marker style (Descriptive / Compact), projections, midline, how many past ranges to keep, and the four identity colors (all inputs; dark-theme defaults)
Markets and Timeframes
Any symbol and timeframe. All thresholds are expressed in ATR and percentiles of the chart's own behavior, so the detector self-calibrates per instrument. On symbols without volume data the volume gate is ignored automatically and the panel says so. On slow timeframes (1D/1W) the sample gate will hide the percentages until enough ranges have resolved — that is the honesty rule, not a defect.
Alerts
Range confirmed · Range breakout up · Range breakout down · False break · 1× projection reached — all evaluated on confirmed bars from the same event flags that draw the markers, plus one dynamic alert() with a JSON payload (event, symbol, timeframe, box borders, break level, height in ATR). インジケーター

Trender [IQ]IQ Trender - TradingIQ
🔹 OVERVIEW
IQ Trender is a non-repainting trend rail built around one simple visual language:
Flat = range. Ramp = trend. Brightness = conviction.
Most trend tools try to follow every movement in price. In sideways conditions, that can leave you reading a line that bends, twitches, and changes direction inside the same noise you were trying to filter.
IQ Trender is designed to behave differently. While the market remains inside its adaptive hold zone, the rail stays deliberately flat. When the underlying trend evidence becomes strong enough, it commits to a rising or falling leg and moves in one direction until that condition genuinely changes.
The result is a clean distinction between three market states:
Holding - the rail is flat and the market is being treated as a range or consolidation.
Rising - the rail has committed to an upward leg.
Falling - the rail has committed to a downward leg.
Direction is shown by color. Conviction is shown by color intensity and glow. The Trender Radar explains the current state numerically, while the Ghost Forecast extends the rail's present trajectory into a fading uncertainty cone.
This is a trend-reading and visualization tool, not a signal service. It does not issue buy or sell calls, and it makes no claim of profitability or predictive certainty.
🔹 THE ONE-LINE MENTAL MODEL
The fastest way to read IQ Trender is to ignore the mathematics at first and watch the shape of the rail:
A flat rail means the model is holding through noise.
An upward ramp means the model has committed to a rising leg.
A downward ramp means the model has committed to a falling leg.
A stronger glow means the estimated trend is showing greater statistical conviction.
This is the same sequence demonstrated in the walkthrough: a directional leg can flatten during a pause, pullback, or consolidation, then recommit if the broader move resumes. The bearish interpretation is the mirror image - falling leg, flat hold, then a renewed falling leg if downside evidence returns.
The flat section is important. It is not a prediction that a breakout is about to happen. It is the indicator saying that current movement has not earned a directional commitment.
🔸 HOW THE ENGINE WORKS
IQ Trender combines three separate jobs: estimating the trend beneath price, deciding whether that trend is statistically meaningful, and drawing a rail that cannot wiggle backward within a committed leg.
Track the underlying trend
A robust local-linear Kalman filter estimates the level and slope beneath the candles. Unlike a conventional moving average that applies a fixed weighting pattern, this is a state-estimation model: it updates its estimate from the difference between expected and observed price.
Large isolated deviations are reduced with a robust update, so a single wick cannot directly yank the rail to a new location. The model also adapts its measurement-noise estimate as conditions change.
⬞
Measure the uncertainty
The filter calculates an innovation deviation - a live estimate of how much movement is normal relative to its current model. IQ Trender uses that value to size the hold band.
When conditions are noisy, the tolerance can widen. When conditions are calmer, it can tighten. This lets the same mental model adapt across different symbols, price levels, and timeframes without using one fixed distance everywhere.
⬞
Test for commitment and change
The estimated slope is compared with its own uncertainty to produce conviction. Hysteresis uses separate thresholds for entering and leaving a committed trend, helping prevent repeated state changes near one boundary.
A two-sided cumulative change test also monitors standardized price surprises. That evidence helps the rail distinguish a genuine opposing change from ordinary counter-movement when a leg is already active.
⬞
Draw the rail
The visible rail is a separate, slew-limited ratchet guided by the Kalman center. Once an upward leg begins, the rail can only move upward until a valid reversal or hold condition is reached. Once a downward leg begins, it can only move downward.
That monotone-within-leg behavior is what creates IQ Trender's signature geometry: flat holds connected by clean directional ramps instead of a line that bends around every candle.
🔹 THE ADAPTIVE HOLD BAND
The shaded band is the rail's live range corridor.
While the rail is holding, the band opens around it to show the volatility-adjusted area in which price can move without forcing a directional leg. When the rail commits to a trend, the displayed band eases shut onto the rail because the model has left its holding state. When the rail becomes flat again, the band gradually reopens.
The band should be read as a model tolerance, not as conventional support and resistance. Price moving within it means the model can continue to hold. Movement beyond it contributes evidence for a new leg, but it is not, by itself, a guaranteed breakout or trade entry.
🔸 COLOR, GLOW & CONVICTION
IQ Trender communicates direction and commitment through one coordinated visual system:
Rising color - active upward leg.
Falling color - active downward leg.
Holding color - neutral, flat state.
Glow intensity - visual emphasis derived from the current conviction reading.
Conviction measures how strongly the estimated slope differs from zero relative to the model's uncertainty. It is a statistical strength reading, not the probability that a trade will win.
The palette is generated in the Oklab perceptual color space. Hue, lightness, and vibrancy can be adjusted as a coordinated system, while out-of-gamut colors are compressed toward neutral instead of clipping harshly.
Accessibility controls include deuteranopia, protanopia, and tritanopia modes, plus automatic contrast correction against the chart background. A selectable contrast target helps keep the rail and directional Radar accents legible across light and dark themes.
🔹 TRENDER RADAR
The Trender Radar is the live scorecard in the corner of the chart. It reports:
State - HOLDING, RISING, or FALLING.
Conviction - normalized trend commitment from 0-100%.
Slope - the rail's current rate of change per bar.
Hold Band - the current full width of the adaptive range corridor.
Behavior - the active Speed and Pursuit combination.
With Log Geometry enabled, slope is displayed as a percentage per bar and band width is expressed as a percentage of the rail. With linear geometry, both are shown in price units.
The Radar can be moved to any chart corner or disabled entirely.
🔸 GHOST FORECAST
The Ghost Forecast is a translucent forward projection of the rail's current slope.
Its centerline extends the rail's recent trajectory. The surrounding cone widens with distance to communicate increasing uncertainty, then fades away toward the horizon. Two growth modes are available:
√h - tighter near the live bar, then gradually widening like a random-walk spread.
Linear - uncertainty expands at a constant rate.
The forecast is rebuilt only at the live edge and never painted into historical bars. It can also be displayed while the rail is holding, where its centerline remains flat.
This feature is a trajectory read, not a price target. It answers, Where is the rail currently heading if its present slope persists? It does not answer, Where will price trade?
🔹 FLIP MARKERS & ALERTS
Optional markers identify confirmed changes in rail state:
▲ - committed to a rising leg.
▼ - committed to a falling leg.
◇ - flattened back into a hold, when hold markers are enabled.
Markers are created only on confirmed bars. Once printed, they do not move.
Matching alert conditions are included for:
Trender committed to a rising trend.
Trender committed to a falling trend.
Trender flattened into a hold.
These alerts report state changes in the model. They are not automated trade recommendations and should be interpreted in the context of the symbol, timeframe, market structure, and the user's own risk process.
🔸 SPEED - THE OVERALL TEMPO
Speed changes the rail's pursuit rate and the width of its hold zone together:
Glacier - calm, structural behavior for slower or higher-timeframe reading.
Slow - patient swing behavior with a wider hold zone.
Balanced - the recommended reference setting, balancing hold and tracking.
Fast - more reactive behavior for shorter intraday movement.
Scalp - the tightest and quickest micro follower.
Slower settings generally require more displacement and move the rail more gradually. Faster settings use a tighter band and pursue price more aggressively. A faster preset is not automatically better: responsiveness and noise rejection are opposing trade-offs.
🔸 PURSUIT - HOW A COMMITTED LEG MOVES
Pursuit changes the shape of an active leg without changing the underlying trend evidence:
Steady - a constant-speed ramp established when the leg begins.
Eased - pursuit speed scales with conviction and feathers toward the estimated center.
Snap - the most decisive pursuit, with a higher movement rate and faster conviction scaling.
On slower Speed presets, Snap can appear more step-like. Steady produces the cleanest constant ramps, while Eased creates a softer approach.
🔹 HOW TO READ IQ TRENDER
Start with state
Flat rail means the model is holding. Rising or falling rail means it has committed directionally. This gives the chart an immediate range-versus-trend read before any number is considered.
⬞
Weigh the leg
Use conviction, glow, and slope together. A bright rail with firm slope represents stronger model commitment. Fading conviction says the trend estimate is becoming less distinct from noise; it does not guarantee an immediate reversal.
⬞
Watch the sequence
One useful continuation framework is:
Rising rail.
Flat hold during consolidation or pullback.
New rising marker and renewed upward rail.
The bearish sequence is the inverse. This is a way to organize market context, not a complete entry system.
⬞
Keep the forecast in its proper role
Use the Ghost Forecast to visualize current trajectory and uncertainty. Do not treat the cone edge or centerline as a promised future level.
⬞
Confirm with your own process
IQ Trender can be combined with price structure, volume, liquidity, momentum, or a trader's existing risk framework. No single state, marker, or Radar value should replace position sizing and independent confirmation.
🔸 INPUTS
Behavior
Speed
Pursuit
Source & Geometry
Price Source
Use Log Geometry
Close with Log Geometry enabled is the recommended general-purpose setup for ordinary positive price series. Log mode keeps slope and band behavior proportional across different price levels.
Rail, Band & Glow
Hold Band on/off
Band transparency
Rail Glow on/off
Glow intensity
Glow spread
Rail line width
Colors
Rising, Falling, and Holding anchors
Global hue rotation
Lightness adjustment
Vibrancy adjustment
Conviction Color response
Accessibility
Color-Blind Mode
Auto Contrast
Contrast Ratio
State Readout
Show Trender Radar
Radar location
Forecast
Ghost Forecast on/off
Horizon in bars
√h or Linear cone growth
Show While Holding
Markers
Flip Markers on/off
Optional hold markers
Marker size
🔹 NON-REPAINTING BEHAVIOR
IQ Trender is calculated causally with no future-bar lookahead.
Confirmed historical rail values and confirmed flip markers remain where they were calculated. The current, still-open bar can update as new price arrives, as any live indicator can. The Ghost Forecast is intentionally rebuilt at the live edge because it represents the rail's current slope and uncertainty; it does not rewrite historical bars.
What was confirmed in history stays confirmed. What is still live remains live.
🔸 LIMITATIONS & HONEST NOTES
IQ Trender is an indicator, not a validated trading strategy. It makes no performance, win-rate, profit, or edge claim.
Kalman filtering is still a causal estimation process. It reduces noise but cannot remove lag, uncertainty, or false transitions.
Faster settings react sooner but can respond to more noise. Slower settings filter more movement but can confirm later.
A Holding state identifies insufficient directional commitment in this model; it does not guarantee that price will remain inside a range or that a breakout is imminent.
Conviction measures the strength of the estimated slope relative to uncertainty. It is not a probability of future direction or trade success.
The Ghost Forecast extrapolates the rail, not price. It is a visual scenario if the current trajectory persists, not a target or prediction.
Alerts and markers identify model state transitions only. They should not be treated as standalone entries or exits.
Results depend on symbol behavior, timeframe, data quality, and the selected Speed/Pursuit combination.
IQ Trender is built to make one difficult market question easier to see:
Is the market still ranging, or has a trend actually committed?
One rail. Three states. No hindsight redraws.
インジケーター

ORB AI [PickMyTrade]ORB AI asks a question most opening-range tools skip: does this
breakout resemble the chart's own past breakouts that worked, or the ones that didn't?
Instead of firing on a single range-break condition, every qualified breakout is scored
across seven independent structural factors, then cross-checked against an on-chart
K-nearest-neighbour library built exclusively from this symbol's own resolved breakout
outcomes. Both numbers are shown — the rule score and the KNN vote — without either one
silently deciding the trade for you.
----------------------------------------------------------------------------------------------------------------
🔷 WHAT IT MEASURES
🔸 Opening Range
The range locks from a configurable session anchor — Exchange Session (the symbol's own
listed timezone), New York 09:30, New York 08:30 (data), London 08:00, Tokyo 09:00, or a
Custom session/timezone pair — over a configurable window (1–120 minutes). If the chart
timeframe is coarser than the chosen window, the range automatically expands to one full
bar and the dashboard notes the effective duration rather than silently misrepresenting
it.
🔸 Rule Confidence (7-factor score)
Every qualified breakout candidate is scored 0–100 across Trend, Momentum, Volume,
Volatility, Structure, Breakout Quality and Liquidity. Trend itself is a blend (35% EMA
alignment, 25% ADX, 25% higher-timeframe read, 15% slope) — the dashboard breaks out all
seven components individually so the score is never a black box.
🔸 Flow Marks — BO / RT / FBO / Sweep
BO tags the confirmed breakout bar. RT tags a retest of the broken range edge that holds
(with a running count). FBO tags a breakout that closed back inside the range — a false
breakout, not a win or loss judgement. Sweep tags a wick that pierced the range edge and
closed back inside — liquidity taken without a directional close.
----------------------------------------------------------------------------------------------------------------
🔷 THE KNN ENGINE (LORENTZIAN DISTANCE)
🔸 How the library is built
Every rule-qualified breakout gets a 6-feature fingerprint (trend, momentum, volume,
volatility, structure, breakout quality). Its outcome is then resolved forward, stop
checked first: 1R target reached before the stop = win, stop first = loss, neither
within the configurable outcome window (15–600 minutes) = discarded as undecided —
drifts are never counted as losses, so the base rate reflects only decisive breakouts.
Every qualified candidate is recorded regardless of outcome, so the library grows
without selection bias.
🔸 How a new candidate is voted
A new candidate is compared to the stored library (up to 300 records) by Lorentzian
distance. The K nearest historical analogues (3–15, default 5) vote, and the vote share
is shown on the signal label and dashboard.
🔸 Advisory vs. Gate
Advisory mode (default) displays the vote as context; it never blocks a signal, so the
set of signalling bars stays fully deterministic regardless of library state. Gate mode
(opt-in) also requires the vote to clear a minimum share before a signal fires — this
trades determinism for selectivity and is only meaningful once the library has grown
past a configurable minimum size.
🔸 Read honestly
With a 6-feature fingerprint, the nearest neighbours of a few-hundred-record library
span roughly half of each feature's range — the vote is a coarse regional tendency, not
a precise analogue match. Loading a different amount of chart history can change the
displayed vote (Advisory) or which candidates pass (Gate); this is inherent to on-chart
instance-based learning and is disclosed rather than hidden. The indicator requires a
symbol with volume data — volume-less feeds (some cash indices / spot FX) cannot render
the KNN engine.
----------------------------------------------------------------------------------------------------------------
🔷 SIGNALS AND DISPLAY
🔸 Dashboard
A compact table shows Session, Regime, ML Engine status (library size / warm-up state),
locked Range, Bias, the 7-factor Rule Confidence bar, Risk-per-Unit, the active Trade
Plan, and a Flow Marks legend. An optional Full mode expands all seven score components.
🔸 Trade Plan overlay
On a qualified signal the indicator draws an entry, stop, and take-profit levels using
one of three configurable methods: a fixed R ladder, an opening-range-width measured-move
projection, or an ATR-scaled EMA-dynamic trail. This is a reference overlay describing
one rules-based way to structure the trade *if* you choose to take it — it is not a
recommendation, and the levels are not a performance claim.
🔸 Non-repainting
Signals evaluate on confirmed closes only. Locked range levels never change once set.
Higher-timeframe reads use ` ` plus `lookahead_off`. The KNN library is built strictly
from already-resolved past outcomes — no future data is read at any point.
🔸 Alerts
19 `alertcondition()` calls cover long/short entries, false breakouts (combined and
per-direction), confidence-threshold crosses, range completion, trend-context changes,
take-profit and stop touches (combined and per-level), reversals, session-end exits,
approaching-breakout warnings, retests, and sweeps above/below the range. Recommended
alert setting: *Once Per Bar Close*.
----------------------------------------------------------------------------------------------------------------
🔷 INPUTS
🔸 Opening Range — Session anchor, custom session/timezone, range length (minutes).
🔸 Signal Engine — Minimum Rule Confidence threshold, TP method (R Ladder / OR Width
Projection / Dynamic EMA), R-ladder multiples, wide-range-OR filter.
🔸 KNN · ML Engine — Mode (Advisory / Gate / Off), K neighbours, history length,
minimum ML vote (Gate only), outcome window (minutes), Gate minimum library size.
🔸 Filters — Signal Blackout window (session-anchor timezone), max signals per
session, news filter.
🔸 Visual — Bull/bear colours, dashboard position and detail level, Zen mode (hides
text labels, keeps shapes/zones only).
----------------------------------------------------------------------------------------------------------------
🔷 REQUIREMENTS AND LIMITATIONS
Requires a symbol with volume data — the KNN engine cannot render on volume-less feeds
(some cash indices, spot FX). The KNN vote is a coarse regional tendency drawn from a
finite on-chart library, not a precise analogue match or a probability estimate; it is
advisory by default for that reason. Loading a different amount of chart history changes
the displayed vote in Advisory mode, and can change which candidates pass in Gate mode —
this is inherent to on-chart instance-based learning and is disclosed rather than hidden.
This is a decision-support toolkit: it does not place trades, and no element of the
dashboard, score, or trade-plan overlay is a claim about future performance. Always
apply independent risk management.
----------------------------------------------------------------------------------------------------------------
Built natively in Pine Script® v6. Seven-factor rule-based confluence scoring with an
on-chart, self-learning KNN engine using Lorentzian distance over resolved breakout
outcomes — no external libraries, no repainting, no lookahead.
Open source — Mozilla Public License 2.0. インジケーター

STRX - Balance RangeSTRX - Balance Range is a price-structure indicator designed to identify and track balanced trading ranges directly on the chart.
It detects periods of compression by comparing the recent price box width to ATR-based volatility, then validates the structure using persistence, edge interaction, and price position inside the range.
The script draws historical range boxes, can optionally connect consecutive ranges, and includes a compact statistics table showing the last closed range, the average of the last 10 ranges, and the average of the last 100 ranges.
This makes it useful for traders who want to study how current balance conditions compare with recent and broader market structure.
How it works:
A reference range is built from the highest high and lowest low of the previous lookback window.
The range is accepted only when its width remains compressed relative to ATR and the current price continues to behave inside that structure.
Additional filters help reduce random consolidations by requiring repeated interaction with the range boundaries and a minimum confirmation period.
How to use it:
Use the boxes to locate areas where price is rotating in balance rather than expanding directionally.
Compare the latest closed range with the 10-range and 100-range averages to judge whether current balance conditions are relatively small, typical, or expanded.
The tool is designed for structure reading and contextual analysis, not as a standalone buy/sell signal generator.
Inputs overview:
Range Length controls how many bars are used to define the reference box.
ATR Length and ATR Multiplier control how strict the volatility compression filter is.
Center Distance, Edge Touches, and Confirmation Bars refine the quality of detected ranges.
Visual options allow you to show or hide historical boxes, range markers, connection lines, and the statistics table.
Notes:
The statistics table uses closed historical ranges, so the values remain stable and easier to compare.
This indicator is intended for standard chart types and discretionary structure analysis.
It does not guarantee future performance and should be used together with your own risk management and market context reading.
インジケーター

Zone Radar [DefinedEdge]Price spends most of its time going nowhere. Zone Radar finds those stretches automatically, draws the range while it's still forming, and tells you the moment it breaks and how hard.
🎯 What it does
Zone Radar watches for price coiling inside a bounded range. When a genuine consolidation forms, it marks the zone with its support and resistance, then tracks it live. The instant price closes decisively outside the range, it flags the break and scores its strength from 0 to 100. Strong breaks get a bold label and a projected target.
It is a context and breakout tool, not a signal service. It shows you where the market is compressed and when that compression releases. What you do with that read is yours.
🧭 How a zone is found
A range only qualifies when two things are true at once:
Price stays inside an ATR normalised band for a minimum number of bars, so the width adapts to any symbol or timeframe on its own.
Price does not drift across that band from one side to the other, which filters out slow trends pretending to be ranges.
Once a zone is confirmed the box breathes to hug the real range, but it is capped at the width it formed with. That cap is what makes a breakout meaningful: a close beyond it is a true expansion out of compression, not just another bar inside the noise.
💥 Break strength (0 to 100)
Every break is graded on four things that separate a real breakout from a fake one:
Displacement how far beyond the edge it closed, in ATR
Range expansion the break bar's range against its recent average
Volume surge participation on the break (auto adjusted on symbols with no volume data, like spot FX)
Coil quality how long and tight the range was, since a longer coil breaks harder
Breaks at or above your Strong threshold get the bold badge plus a measured move target: the height of the range projected from the breakout point. Broken edges stay on the chart as polarity support and resistance for the retest.
⚙️ Under The Hood
Signals fire on the close of the breakout bar. No repainting, ever.
Fully adjustable: range length, width, break sensitivity, strength threshold, and how much history stays on the chart.
Works on any market and any timeframe. Tuned nicely for intraday out of the box.
🔔 Alerts
Zone formed, break up, break down, strong break up, strong break down. Wire any of them into your workflow.
📝 Notes
Lower timeframes produce far more zones than higher ones, so only the most recent are kept drawn to stay within platform limits. Raise the zone cap if you want more history, or drop to a higher timeframe for a cleaner chart. The ATR based settings are a starting point, not gospel. Tune them to how your instrument actually moves. インジケーター

Volatility Regime Classifier [AFD]
**What it does**
It answers one question: *is this symbol moving more, or less, than it usually does?*
It measures how far this symbol's own bars have been travelling, ranks that against its recent history, and states the answer as a percentile from 0 to 100 plus a named tier — **QUIET**, **NORMAL**, **ELEVATED** or **EXTREME**. Alongside it you get how the recent stretch compares with the longer one, whether the reading is rising or falling, and a plain-English line saying what that amounts to.
Everything comes from the chart you have open. No VIX, no options data, no implied volatility, no other symbol, and no `request.*()` call of any kind — so it behaves the same on a currency pair, a small-cap, a future or a crypto chart, none of which have an index volatility proxy to borrow.
**How it works**
Realized volatility is measured over three rolling windows — short, mid and long — and one **Sensitivity** setting picks them: Fast 5/15/30, Normal 10/30/60, Slow 20/60/120. Fast is the default.
Four estimators, and this choice matters more than any other setting:
- **Parkinson** (default) — reads the bar's high-low range.
- **Garman-Klass** — reads the range and the open-to-close move.
- **Close-to-close** — reads the dispersion of returns.
- **ATR** — a plain N-bar average of true range. **Not Wilder's smoothing**, so it will
not match TradingView's built-in ATR at the same length. Deliberate, not a bug.
Parkinson is the default because of a specific failure of the close-to-close default it replaced. Close-to-close measures how *scattered* returns are; a chart reader measures how *far* price went. A clean one-way slide has every return pointing the same way, so its dispersion is genuinely low — and a choppy bounce covering the same ground scores higher than the slide did. Range-based estimators read what the eye reads.
The short-window reading is ranked against the last **400 bars** to give the percentile, and the tier follows from that rank with a **band around each boundary**, so a reading parked on a threshold does not flip back and forth on sampling noise. The panel tells you when the band is holding a tier back.
There is a second route into EXTREME, and it exists because a percentile is self-normalising: roughly a tenth of all bars sit in the top tier however quiet the year has actually been. So a bar is also called EXTREME when the short window reaches a set multiple of the long one, whatever its rank. The multiple differs per estimator, because the four do not put that ratio on the same scale.
On intraday charts the **session-gap return is excluded**. It spans a close and the next open, so it is not a return over one bar of trading, and leaving it in made every session open read as a volatility event that never happened. It is dropped, not zeroed.
**How to use it**
Add it and read the dashboard. It starts compact at four rows; switch **Compact dashboard** off for the full nine, which name every window, bound and setting actually in force rather than the defaults. Hover the marker at the end of the line for a glossary of every number, also built from your current settings.
- **The percentile line** in the lower pane, tier zones shaded behind it.
- **Price-chart markers** — the bar column painted when a tier you have chosen is reached, or a box spanning the whole episode. EXTREME is marked by default; QUIET, NORMAL, ELEVATED and RISING are all available, and a marked tier always beats RISING so an overlapping bar's colour is never an accident of ordering.
- **The market context box** on the price chart, at the corner you pick or off. A headline names the character of the tape — `RANGE EXPANDING`, `RANGE COMPRESSING`, `WIDE AND HOLDING` and eight others — over a line naming what to re-check, a line stating what the short-to-long ratio amounts to in words, and a standing line reading **`Size only - this says nothing about direction.`**
That last line has no off switch, and the vocabulary above it never uses the words "up or "down". `EXPANDING` is equally what a hard rally and a hard sell-off look like.
**Three alerts**, all evaluated on confirmed bars only: the regime tier changed, the short-vs-baseline state changed, and the EXTREME tier was entered.
**Repainting**
The script reads nothing but the current chart's own bars. There are no `request.*()` calls, no higher-timeframe data and no `barmerge.lookahead_on` anywhere in it, so there is no future data for it to borrow. Once a bar closes, its reading is settled and does not change afterwards.
The bar still forming is the ordinary exception, and it is worth being explicit about: its high, low and close are still moving, so the reading on it moves too, and the tier on the live bar can change before the bar is done. The three alert conditions are gated to confirmed bars for that reason. Drawn elements — the panel, the context box, the episode box — are drawn at the last bar and update with it.
**Why it is original**
It is built for the **Pine Screener**, which is unusual in this category. The first ten plots are the contract — percentile, tier code, ratio, short-vs-baseline code, acceleration tier, regime-changed flag, the two raw RV levels, the percentile's sample count, and a flag saying whether the outputs are fully defined — so you can rank or filter a whole watchlist by volatility regime instead of reading one chart at a time. Zero `request.*()` calls, and the warmup is sized to fit the Screener's 500-bar window.
The other difference is that **the regime is a number, not a colour.** The visual layer is drawn *from* the percentile and never replaces it; every tinted panel row still states its value in words, and the whole visual layer switches off without a single reported number changing.
**Limitations**
- **It says nothing about direction, and it is not a signal.** No entries, no exits, no targets, no probability, win-rate or expectancy language anywhere in the script. It describes what has already happened on the chart in front of you.
- **It needs history.** At the default Fast preset the percentile is undefined until bar 404 and shows blank until then. The size-based EXTREME route is defined from bar 30, so **a bar can legitimately show an EXTREME tier beside a blank percentile row** — the panel says which is which, and the `Outputs fully defined` plot flags it.
- **A percentile is relative to this symbol's own recent history.** QUIET on one instrument and QUIET on another are not the same absolute amount of movement. The panel carries the absolute RV level next to the rank for exactly this reason.
- **ATR here is a simple average, not Wilder's**, as above.
**Licence:** Mozilla Public License 2.0. インジケーター

Volatility Corridor - Quantized Equilibrium LevelsMost range and channel tools slide. The midline is a moving average, so it moves on every bar, and the levels drawn from it move with it. That makes them fine as a trend read and close to useless as levels, because the level you looked at ten bars ago is no longer where you left it.
Volatility Corridor does the opposite. It holds still, and then it jumps.
HOW THE CORRIDOR IS BUILT
An equilibrium anchor sits at the centre of the corridor. Once placed, it is frozen. It does not drift, it does not smooth, it does not respond to anything at all until price closes more than one volatility step away from it.
When that happens, the anchor jumps by a whole number of steps in the direction of the breach, lands at the new location, re-measures its step size from ATR at that exact moment, and freezes again.
Three bands are drawn one step apart above the anchor and three below, giving seven horizontal levels: S3, S2, S1, EQ, R1, R2, R3. Because the anchor and the step are both frozen between jumps, every one of those levels is a genuine flat horizontal line for the entire life of the corridor. Across a chart the result is a staircase of stable shelves rather than a wave, and the jump bars are marked so the history of the structure is readable at a glance.
The quantization matters. The anchor moves by whole steps, never by fractions, so successive corridors line up on a common grid instead of drifting off it. When price returns to an area it traded weeks ago, the corridor tends to rebuild on the same shelves rather than near them.
WHAT IS ON THE CHART
Seven stepline levels, thickest at the equilibrium.
Six filled bands between them, darkening toward the outer edges, so the corridor reads instantly without inspecting a single number.
Candles tinted by their position inside the corridor, running from the lower colour at the bottom edge through neutral at equilibrium to the upper colour at the top.
Background tint whenever price is trading fully outside the corridor.
Price labels on every level at the right edge, in four selectable sizes.
Jump markers at the top and bottom of the pane showing every bar the corridor re-anchored, and in which direction.
SETUPS
Two setups are defined, and either can be switched off.
Reversion. Price has pushed into the outer band and closes back inside it while still on its own side of equilibrium. The stop is the far outer level, and the targets are the levels above: equilibrium first, then the next band, then the one after that. The reasoning is that a corridor that is holding will pull price back toward its centre, and the level structure already provides the map for that journey.
Breakout. Price closes fully beyond the outer level of the corridor. The stop is the first level back inside, and the targets are projected one, two and three steps beyond the corridor edge, on the same grid the corridor itself uses.
In both cases the stop and the targets are structural levels, not multiples of risk. Nothing is placed at an arbitrary distance. The stop is where the structure would be wrong, and the targets are the next shelves on the grid.
Only one setup is tracked at a time. A new signal cannot silently replace an unresolved one.
The panel keeps a record of whether the first target or the stop was reached first, and prints collecting rather than a percentage until the sample is large enough to mean anything. That number is a narrow measurement of one mechanical rule, not a backtest, and it says nothing about what a trader who moved a stop or scaled out would have achieved.
SETTINGS
Step Size is the one dial that matters. It sets the width of a single band in ATR terms, and therefore how far price must travel to force a jump. Larger values give wider, rarer, more significant corridors. Smaller values give a tighter grid that re-anchors often.
Volatility Length sets the ATR lookback used to measure a step at each anchor. Longer is more stable.
Everything else is cosmetic: fills, candle painting, label size, level thickness, background tint.
REPAINTING
The anchor, the step size, the jumps, the setups and the alerts all evaluate on confirmed bars only. A level that is drawn is final for the life of the corridor and is never moved retroactively. The script requests no higher timeframe data.
READING IT
Equilibrium is the fair value the corridor is currently defending. Price oscillating around it is a market with no directional decision.
The outer bands are where the current corridor stops being an adequate description of price. Price reaching them means one of two things is about to happen: it is rejected and the corridor holds, or it closes through and the whole structure jumps to a new shelf. Both are tradable and both have a setup defined for them.
A corridor that survives many bars is a market that has agreed on value. A rapid sequence of jumps in one direction is a trend, and the jump markers make that sequence obvious even when the candles do not.
This is an analysis tool, not financial advice, and not a trading system. The setups are two mechanically defined patterns, and no pattern has an edge on its own. Use it with your own risk management and position sizing. インジケーター
