OPEN-SOURCE SCRIPT

Change in State of Delivery [CISD] (Zeiierman)

6 466
Overview
Change in State of Delivery [CISD] (Zeiierman) identifies genuine changes in buying and selling pressure by monitoring consecutive delivery candles and tracking when price closes beyond the opening price of the previous delivery phase.

Rather than relying solely on traditional market structure concepts such as Break of Structure (BoS) or Market Structure Shift (MSS), the indicator focuses on delivery itself, the sequence of aggressive buying or selling that drives price.

When price successfully closes beyond the opening price of the previous delivery leg, a Change in State of Delivery (CISD) is confirmed, highlighting a potential shift in market control.
ekran görüntüsü
True Delivery Engine

The indicator continuously tracks bullish and bearish delivery sequences. A delivery begins whenever consecutive candles close in the same direction.

Once a minimum number of delivery candles has formed, the indicator records:
• The opening price of the first delivery candle.
• The starting bar of the delivery sequence.
• The active delivery level.

Unlike many CISD implementations, this indicator is built around the actual delivery sequence instead of simply using arbitrary candle opens.
ekran görüntüsü
CISD Confirmation

A Change in State of Delivery is confirmed when price closes beyond the opening price of the previous delivery sequence.

Bullish CISD
• Bearish delivery completes.
• Price closes above the opening price of that bearish delivery.

Bearish CISD
• Bullish delivery completes.
• Price closes below the opening price of that bullish delivery.
ekran görüntüsü

Liquidity Sweep Detection

The indicator can optionally display liquidity sweeps around confirmed swing highs and swing lows.

A bearish liquidity sweep occurs when:
• Price trades above a previous swing high.
• Price closes back below the swing high.

A bullish liquidity sweep occurs when:
• Price trades below a previous swing low.
• Price closes back above the swing low.
ekran görüntüsü
Market Structure Shift (MSS)

For additional confirmation, the indicator can display simple Market Structure Shift events.

Bullish MSS
• Price closes above the most recent confirmed swing high.

Bearish MSS
• Price closes below the most recent confirmed swing low.
ekran görüntüsü
How It Works

Delivery Detection

The script continuously counts consecutive bullish and bearish candles.

Once the minimum delivery requirement is reached, the opening price of the delivery sequence becomes the active CISD level.

This level represents the point where the current buying or selling pressure originally began.
Pine Script®

CISD Validation

The delivery level remains active until one of two events occurs:
• Price confirms the CISD by closing beyond the delivery open.
• The setup expires after the maximum user-defined validity period.

Confirmed CISDs remain visible, while expired setups are automatically removed.

Dynamic Trend State

Each confirmed CISD updates the internal trend state.

This trend can optionally be used to:
• Color candles.
• Visually distinguish bullish and bearish market conditions.
• Generate trend shift alerts.

Repeated confirmations in the same direction are displayed using dashed CISD levels, making ongoing directional control easier to recognize.

How to Use

Identify Delivery Shifts

The primary purpose of the indicator is to detect when one side of the market successfully overcomes the previous delivery phase.

A bullish CISD shows that buyers have reclaimed control after a bearish delivery sequence. A bearish CISD shows that sellers have reclaimed control after a bullish delivery sequence.

Instead of reacting to every structural break, traders can use confirmed CISD levels to focus on cleaner shifts in market pressure.
ekran görüntüsü

Solid vs Dashed CISD Levels

Not all confirmed CISD levels are displayed the same way.

Solid CISD lines represent a new change in delivery, where market control shifts from buyers to sellers or from sellers to buyers. These are often the most significant signals, as they indicate a potential trend reversal or the beginning of a new directional move.

Dashed CISD lines occur when another CISD confirms in the same direction as the current trend. Instead of signaling a reversal, they indicate that the existing trend continues to regain control after a pullback.

In practice:

• Solid CISD → Potential change in directional control.
ekran görüntüsü
• Dashed CISD → Trend continuation after a correction or retracement.
ekran görüntüsü
This visual distinction helps traders quickly identify whether a CISD represents a fresh shift in market control or simply reinforces the current trend.

Settings
  • Show CISD: Displays active and confirmed CISD levels.
  • Minimum Delivery Candles: Minimum number of consecutive candles required before a delivery sequence becomes valid.
  • Maximum CISD Validity: Maximum number of bars a setup can remain active before expiring.
  • Minimum CISD Duration: Minimum number of bars before a CISD is allowed to confirm.
  • Show Liquidity Sweeps: Displays bullish and bearish liquidity sweep levels.
  • Sweep Swing Length: Controls the swing detection used for identifying liquidity sweeps.
  • Show MSS Dots: Displays Market Structure Shift confirmations.
  • MSS Length: Controls the pivot length used for structure detection.
  • Color Candles by CISD Trend: Colors candles using the latest confirmed CISD direction.

-----------------
Disclaimer

The content provided in my scripts, indicators, ideas, algorithms, and systems is for educational and informational purposes only. It does not constitute financial advice, investment recommendations, or a solicitation to buy or sell any financial instruments. I will not accept liability for any loss or damage, including without limitation any loss of profit, which may arise directly or indirectly from the use of or reliance on such information.

All investments involve risk, and the past performance of a security, industry, sector, market, financial product, trading strategy, backtest, or individual's trading does not guarantee future results or returns. Investors are fully responsible for any investment decisions they make. Such decisions should be based solely on an evaluation of their financial circumstances, investment objectives, risk tolerance, and liquidity needs.

Feragatname

Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.