OPEN-SOURCE SCRIPT
Auction Shelf Ledger [forexobroker]

Auction Shelf Ledger [forexobroker] maintains a running ledger of defended price levels by clustering confirmed pivots into shelves and scoring each shelf by how many times it has been touched and how much volume accumulated there. When price tests a strong shelf and rejects it, the indicator trades away from that defended liquidity. The unique angle is treating repeated pivot touches plus volume as evidence of a real auction battleground rather than drawing a fresh line on every pivot.
🔶 ALGORITHM
1. ATR (default 14) is computed for adaptive distance scaling.
2. Confirmed pivot highs and lows (default pivot length 6) are detected with full left/right confirmation.
3. Each new pivot is registered against the ledger: if it falls within the cluster tolerance (default 0.5 x ATR) of an existing shelf, that shelf is reinforced (touch count and volume sum grow, price re-centered); otherwise a new shelf is created.
4. The ledger is capped at the max shelves tracked (default 8); the oldest shelf is shifted out when full.
5. The nearest shelf whose touch count meets the strong threshold (default 2) is selected as the active level.
6. A reject buffer (default 0.15 x ATR) defines the test zone; price entering it then closing back away marks a rejection up or down.
7. A rejection arms a persistent directional bias that holds until the opposite rejection fires; entries then time off a reclaim EMA (default 9) within that bias.
🔶 SIGNAL LOGIC
- Buy: in rejection-only mode, a fresh upward shelf rejection; otherwise active rejection bias is bullish AND close crosses over the reclaim EMA, AND session filter passes AND position is not already long AND cooldown bars elapsed AND barstate.isconfirmed.
- Sell: in rejection-only mode, a fresh downward shelf rejection; otherwise active rejection bias is bearish AND close crosses under the reclaim EMA, AND session filter passes AND position is not already short AND cooldown bars elapsed AND barstate.isconfirmed.
Only fires once a strong shelf has been tested and rejected to set the active bias.
🔶 INPUTS
- Shelves group: pivot length for detecting raw pivots; default 6.
- Cluster Tol x ATR: distance within which pivots merge into one shelf; default 0.5.
- Min Touches (strong): touches required before a shelf is tradable; default 2.
- Max Shelves Tracked: ledger capacity; default 8.
- Reject Buffer x ATR: test-zone width around a shelf; default 0.15.
- ATR Length: volatility reference for all scaling; default 14.
- Signal Logic group: entry reclaim EMA default 9, rejection-only mode default off, cooldown bars default 5.
- Filters and Visual groups: session restriction (default 0000-2400), shelf lines, dashboard, 3-layer glow, colors.
🔶 ALERTS
ASL Buy, ASL Sell, ASL Any Signal, ASL Shelf Test, ASL Reject Up, ASL Reject Down, ASL New High Pivot, ASL New Low Pivot, ASL Strong Shelf, ASL Ledger Full, ASL At Shelf, ASL Webhook JSON.
🔶 LIMITATIONS
- Pivots are confirmed, so shelves print with pivot-length lag and are not drawn in real time at the extreme.
- A shelf needs several touches to become tradable; early chart history may have no strong shelf yet.
- Defaults are tuned for liquid instruments; very low-volume symbols weaken the volume component of shelf strength.
- The ledger is capacity-limited, so on long ranges the oldest shelves are discarded even if still relevant.
- The non-rejection-only path uses a fast EMA cross and can produce extra entries inside a single bias.
🔶 ALGORITHM
1. ATR (default 14) is computed for adaptive distance scaling.
2. Confirmed pivot highs and lows (default pivot length 6) are detected with full left/right confirmation.
3. Each new pivot is registered against the ledger: if it falls within the cluster tolerance (default 0.5 x ATR) of an existing shelf, that shelf is reinforced (touch count and volume sum grow, price re-centered); otherwise a new shelf is created.
4. The ledger is capped at the max shelves tracked (default 8); the oldest shelf is shifted out when full.
5. The nearest shelf whose touch count meets the strong threshold (default 2) is selected as the active level.
6. A reject buffer (default 0.15 x ATR) defines the test zone; price entering it then closing back away marks a rejection up or down.
7. A rejection arms a persistent directional bias that holds until the opposite rejection fires; entries then time off a reclaim EMA (default 9) within that bias.
🔶 SIGNAL LOGIC
- Buy: in rejection-only mode, a fresh upward shelf rejection; otherwise active rejection bias is bullish AND close crosses over the reclaim EMA, AND session filter passes AND position is not already long AND cooldown bars elapsed AND barstate.isconfirmed.
- Sell: in rejection-only mode, a fresh downward shelf rejection; otherwise active rejection bias is bearish AND close crosses under the reclaim EMA, AND session filter passes AND position is not already short AND cooldown bars elapsed AND barstate.isconfirmed.
Only fires once a strong shelf has been tested and rejected to set the active bias.
🔶 INPUTS
- Shelves group: pivot length for detecting raw pivots; default 6.
- Cluster Tol x ATR: distance within which pivots merge into one shelf; default 0.5.
- Min Touches (strong): touches required before a shelf is tradable; default 2.
- Max Shelves Tracked: ledger capacity; default 8.
- Reject Buffer x ATR: test-zone width around a shelf; default 0.15.
- ATR Length: volatility reference for all scaling; default 14.
- Signal Logic group: entry reclaim EMA default 9, rejection-only mode default off, cooldown bars default 5.
- Filters and Visual groups: session restriction (default 0000-2400), shelf lines, dashboard, 3-layer glow, colors.
🔶 ALERTS
ASL Buy, ASL Sell, ASL Any Signal, ASL Shelf Test, ASL Reject Up, ASL Reject Down, ASL New High Pivot, ASL New Low Pivot, ASL Strong Shelf, ASL Ledger Full, ASL At Shelf, ASL Webhook JSON.
🔶 LIMITATIONS
- Pivots are confirmed, so shelves print with pivot-length lag and are not drawn in real time at the extreme.
- A shelf needs several touches to become tradable; early chart history may have no strong shelf yet.
- Defaults are tuned for liquid instruments; very low-volume symbols weaken the volume component of shelf strength.
- The ledger is capacity-limited, so on long ranges the oldest shelves are discarded even if still relevant.
- The non-rejection-only path uses a fast EMA cross and can produce extra entries inside a single bias.
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
🔵Gain access to our powerful tools : kestutisbalciunas.com/tradingview/
🔵Join our free telegram for updates : t.me/algotradingedge
All scripts & content provided by Forexobroker are for informational & educational purposes only.
🔵Join our free telegram for updates : t.me/algotradingedge
All scripts & content provided by Forexobroker are for informational & educational purposes only.
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
🔵Gain access to our powerful tools : kestutisbalciunas.com/tradingview/
🔵Join our free telegram for updates : t.me/algotradingedge
All scripts & content provided by Forexobroker are for informational & educational purposes only.
🔵Join our free telegram for updates : t.me/algotradingedge
All scripts & content provided by Forexobroker are for informational & educational purposes only.
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。