OPEN-SOURCE SCRIPT

Auction Shelf Ledger [forexobroker]

1 962
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.

Thông báo miễn trừ trách nhiệm

Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.