OPEN-SOURCE SCRIPT
Обновлено QuantLine Auction State Engine

QuantLine Auction State Engine asks one question: what is price doing with the
edge of its prior range?
Many breakout tools mark the first trade above a rolling high or below a rolling
low. That does not distinguish a wick from acceptance, and the rolling level can
move while the event is still being judged. This script separates the process
into explicit states and locks the point-in-time range when a test begins.
States
- BAL — price remains in balance inside the prior range.
- CMP — balance with low ATR percentile: potential energy, no direction.
- T↑ / T↓ — price is testing beyond a locked range edge; acceptance is not yet confirmed.
- A↑ / A↓ — the required closes remain outside the edge and the move passes the selected efficiency and relative-volume checks.
- FA↑ / FA↓ — price returns inside after an attempted auction beyond the edge.
- RT↑ / RT↓ — the first retest holds on the accepted side of the locked edge.
How it is calculated
1. The reference range is the highest high and lowest low of prior bars. The
current bar is excluded.
2. When a close moves beyond an edge by the selected ATR distance, both edges
are locked. They cannot slide while the test is active.
3. Acceptance requires a user-selected number of closes beyond the locked edge.
4. Kaufman-style efficiency ratio separates directional travel from a noisy
path. Optional relative volume checks whether participation is above its
recent average.
5. ATR percentile identifies compression. It does not predict the direction of
the next expansion.
6. A return inside the edge marks a failed auction. After acceptance, the first
touch that closes on the accepted side marks a held retest.
State transitions and alerts occur on confirmed bars. No future bars are used,
and the active range is locked at the time of the test.
How to use it
The tool is a market-structure classifier. It can help a trader distinguish
between “price traded beyond a level” and “price was accepted beyond a level.”
It does not provide an entry, stop, target, position size, probability, or
profitability claim.
All defaults are round research hypotheses and are user-adjustable. Market
quality, fees, slippage and higher-timeframe context remain outside this script.
Educational context only. Not financial advice.
edge of its prior range?
Many breakout tools mark the first trade above a rolling high or below a rolling
low. That does not distinguish a wick from acceptance, and the rolling level can
move while the event is still being judged. This script separates the process
into explicit states and locks the point-in-time range when a test begins.
States
- BAL — price remains in balance inside the prior range.
- CMP — balance with low ATR percentile: potential energy, no direction.
- T↑ / T↓ — price is testing beyond a locked range edge; acceptance is not yet confirmed.
- A↑ / A↓ — the required closes remain outside the edge and the move passes the selected efficiency and relative-volume checks.
- FA↑ / FA↓ — price returns inside after an attempted auction beyond the edge.
- RT↑ / RT↓ — the first retest holds on the accepted side of the locked edge.
How it is calculated
1. The reference range is the highest high and lowest low of prior bars. The
current bar is excluded.
2. When a close moves beyond an edge by the selected ATR distance, both edges
are locked. They cannot slide while the test is active.
3. Acceptance requires a user-selected number of closes beyond the locked edge.
4. Kaufman-style efficiency ratio separates directional travel from a noisy
path. Optional relative volume checks whether participation is above its
recent average.
5. ATR percentile identifies compression. It does not predict the direction of
the next expansion.
6. A return inside the edge marks a failed auction. After acceptance, the first
touch that closes on the accepted side marks a held retest.
State transitions and alerts occur on confirmed bars. No future bars are used,
and the active range is locked at the time of the test.
How to use it
The tool is a market-structure classifier. It can help a trader distinguish
between “price traded beyond a level” and “price was accepted beyond a level.”
It does not provide an entry, stop, target, position size, probability, or
profitability claim.
All defaults are round research hypotheses and are user-adjustable. Market
quality, fees, slippage and higher-timeframe context remain outside this script.
Educational context only. Not financial advice.
Информация о релизе
V2 visual-state update: neon locked-range rails, auction equilibrium, confirmed TEST / ACCEPT / FAILED / RT markers, state-field tint and discovery-bar pulse. Discovery states now expire after a bounded number of bars so obsolete locked levels cannot distort the chart.Информация о релизе
V2 visual-terminal refresh. Added neon point-in-time range rails, a dynamic auction-state field, compact directional T/A/FA/RT markers, confirmed discovery-bar pulses, and a redesigned institutional HUD. A display-only 18-bar cooldown reduces label overlap; the state machine and every confirmed alert event remain unchanged. Discovery states still expire after the defined maximum window.Информация о релизе
Final V2 presentation pass. The short title is now QL Auction V2, and the public chart is replaced with a clean dark 30-minute BTC view containing only this indicator. The neon point-in-time range rails, compact directional markers, state field and institutional HUD are now immediately visible. Model and alert logic are unchanged.Скрипт с открытым кодом
В истинном духе TradingView, создатель этого скрипта сделал его открытым исходным кодом, чтобы трейдеры могли проверить и убедиться в его функциональности. Браво автору! Вы можете использовать его бесплатно, но помните, что перепубликация кода подчиняется нашим Правилам поведения.
Отказ от ответственности
Информация и публикации не предназначены для предоставления и не являются финансовыми, инвестиционными, торговыми или другими видами советов или рекомендаций, предоставленных или одобренных TradingView. Подробнее читайте в Условиях использования.
Скрипт с открытым кодом
В истинном духе TradingView, создатель этого скрипта сделал его открытым исходным кодом, чтобы трейдеры могли проверить и убедиться в его функциональности. Браво автору! Вы можете использовать его бесплатно, но помните, что перепубликация кода подчиняется нашим Правилам поведения.
Отказ от ответственности
Информация и публикации не предназначены для предоставления и не являются финансовыми, инвестиционными, торговыми или другими видами советов или рекомендаций, предоставленных или одобренных TradingView. Подробнее читайте в Условиях использования.