OPEN-SOURCE SCRIPT
Updated

Change in State of Delivery CISD [AlgoAlpha]

2 314
🟠OVERVIEW
This script tracks how price “changes delivery” after failed attempts to push in one direction. It builds swing levels from pivots, watches for those levels to be wicked, and then checks if price delivers cleanly in the opposite direction. When the pattern meets the script’s tolerance rules, it marks a Change in State of Delivery (CISD). These CISD levels are drawn as origin lines and are used to spot shifts in intent, failed pushes, and continuation attempts. A CISD becomes stronger when it forms after opposing liquidity is swept within a defined lookback.

🟠CONCEPTS
The script first defines structure using swing highs/lows. These levels act as potential liquidity points. When price wicks through a swing, the script registers a mitigation event. After this, it looks for a reversal-style candle sequence: a failed push, followed by a counter-move strong enough to pass a tolerance ratio. This ratio compares how far price expanded away from the failed attempt versus the counter-move that followed. If the ratio is high enough, this becomes a CISD. The idea is simple: liquidity interaction sets context, and the tolerance logic identifies actual intent. CISD levels and sweep markers combine these two ideas into a clean map of where delivery flipped.
snapshot

🟠FEATURES
  1. Liquidity tracking: marks swing highs/lows and updates them until expiry
    snapshot
  2. Liquidity sweep confirmation when CISD aligns with recent mitigations
    snapshot
  3. Alert conditions for all key events: mitigations, CISDs, and strong CISDs


🟠USAGE
  1. Setup: Add the script to your chart. Use it on any timeframe where swing behavior matters. Set the Swing Period for how wide a pivot must be. Set Noise Filter to control how strict the CISD detection is. Liquidity Lookback defines how recent a wick must be to confirm a sweep.
  2. Read the chart: Origin lines mark where the CISD began. A green line signals bullish intent; a red line signals bearish intent. ▲ and ▼ shapes show CISDs that form after liquidity is swept, these mark strong signals for potential entry. Swing dots show recent swing highs/lows. Candle colors follow the latest CISD trend.
  3. Settings that matter: Increasing Swing Period produces fewer but stronger swings. Raising Noise Filter requires cleaner counter-moves and reduces false CISDs. Liquidity Lookback controls how strict the sweep confirmation is. Expiry Bars decides how long swing levels remain active.

Release Notes
Thumbnail

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.