OPEN-SOURCE SCRIPT

Kalman Auction Ribbon [JOAT]

5 604
Kalman Auction Ribbon is an open-source Pine Script v6 overlay that builds a six-layer adaptive ribbon from a zero-lag source and Kalman-style velocity smoothing. The goal is to show trend alignment, slope strength, deviation zones, and confirmed retest behavior in one restrained chart layer.

The script focuses on auction behavior around a dynamic ribbon. When the ribbon layers align and slope together, the state becomes directional. When price stretches beyond the deviation envelope and then returns, the script can mark supply or demand zones for later retests.

syot kilat

Core Concepts

1. Zero-Lag Source

The source is adjusted by comparing current price with a half-length historical value. This produces a more responsive input for the ribbon calculations.

Pine Script®


2. Kalman-Style Velocity Estimate

Each ribbon layer uses a compact velocity smoother that maintains an estimate and speed component. The speed term helps the estimate respond to directional movement without relying on future bars.

Pine Script®


3. Six-Layer Ribbon Alignment

The script calculates six different ribbon lengths. Alignment and slope scores are combined into a trend score from -100 to +100. This score controls the ribbon color and dashboard power reading.

4. Deviation Zones

Upper and lower deviation levels are built around the ribbon midpoint using ATR. If price pushes beyond a deviation level and closes back inside, the script creates a compact supply or demand zone.

5. Retest Logic

Retest signals occur when price interacts with a live zone or the ribbon itself while the ribbon state remains directional. These signals are confirmed on closed bars.

Features

  • Six-layer adaptive ribbon: Multiple Kalman-style layers reveal alignment and spread
  • Velocity weighting: Gain input changes how aggressively the smoother responds
  • Deviation envelope: ATR-based upper and lower zones around the ribbon midpoint
  • Soft supply and demand boxes: Created only on confirmed deviation rejection behavior, with overlap suppression so the chart does not stack redundant boxes
  • Labeled deviation boxes: Supply and Demand Deviation boxes include midpoint guide lines and fade after invalidation
  • Confirmed buy/sell markers: Compact BUY and SELL dots appear only after confirmed ribbon or zone retest behavior
  • Trend-state candles: Optional bar coloring by ribbon state
  • Dashboard: Shows state, power, distance, and retest status
  • Alerts: Confirmed buy, confirmed sell, lower deviation zone, and upper deviation zone


Input Parameters

Core:
  • Source: Price source used by the ribbon
  • Base Length: Main length from which all ribbon layers are derived
  • Velocity Weight: Strength of the speed component
  • Deviation ATR Length: ATR length for deviation zones
  • Deviation Width: ATR multiplier for the envelope


Zones:
  • Show Deviation Zones: Toggles supply and demand boxes
  • Zone Extension Bars: How far active boxes extend to the right
  • Maximum Zones Per Side: Caps active supply and demand boxes


Signals:
  • Show Confirmed Buy/Sell: Toggles compact confirmed signal dots
  • Signal Spacing Bars: Minimum spacing between signal markers
  • Zone Extension Bars: Forward box extension length
  • Maximum Zones Per Side: Object cap for zone storage


Visual:
  • Palette: Selects the color pair
  • Show Ribbon: Toggles ribbon plots and fill
  • Trend-State Candles: Enables candle coloring
  • Dashboard: Shows the top-right panel


How to Use This Indicator

Step 1: Read Ribbon Alignment
A strongly stacked ribbon with a high dashboard power value indicates directional alignment. A mixed ribbon shows a less decisive state.

Step 2: Watch Deviation Zones
Zones are created when price rejects beyond an ATR deviation envelope. These boxes represent areas where price stretched away from the ribbon and returned.

Step 3: Use Retests With Context
Retest dots identify confirmed interactions with the ribbon or zones. They should be evaluated with trend state, market structure, and risk placement.

Indicator Limitations

  • Kalman-style smoothing is reactive and does not know future price direction
  • Strong news bars can move through deviation zones without meaningful retests
  • Object limits require older zones to be removed when the maximum is exceeded
  • The ribbon can compress during range conditions and produce mixed readings


Originality Statement

Kalman Auction Ribbon is original in its combination of zero-lag preprocessing, six independent Kalman-style layers, ATR deviation boxes, and confirmed retest tracking. It uses public Pine primitives in a custom structure and does not paste or disguise another author's source.

Disclaimer

This script is provided for educational and informational use only. It is not financial advice or a recommendation to buy or sell any financial instrument. Trading involves substantial risk of loss. Ribbon states and zones can fail during unusual volatility or thin liquidity. Always use independent analysis and proper risk management.

-Made with passion by jackofalltrades

Penafian

Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.