OPEN-SOURCE SCRIPT
CISD Levels V3

CISD Levels V3 is an advanced market structure script designed to dynamically identify and trail Change in State of Delivery (CISD) levels. Built for precision, this indicator tracks the continuous flow of valid consecutive candles and instantly adapts to breakouts by establishing accurate opposing levels based on immediate historical price action.
Core Features:
Dynamic State Flipping: When the price closes through an active CISD level, the script instantly evaluates the breakout's candle sequence and drops a new opposing CISD line retroactively anchored to the correct sequence origin.
Body % Threshold Filter: Filters out market noise by allowing you to set a minimum required body size (High-to-Low percentage) for a candle to be considered "valid." A streak must contain at least two valid candles to confirm a structural sequence.
Bar-Close Confirmation: Strict barstate.isconfirmed logic prevents false mid-candle repainting. Lines only shift, flip, or extend the exact millisecond a candle officially closes.
Clean Chart History: Automatically curates your chart by saving a user-defined number of historical CISD levels while deleting old ones to prevent visual clutter.
Integrated Alerts: Built-in alert() functions for both Bullish and Bearish confirmations. Set up a single "Any alert() function call" in TradingView to receive real-time notifications exactly when the state flips.
Customizable Settings:
Adjust body size thresholds, forward line extensions, maximum historical lines displayed, and sequence lookback limits to fit your specific timeframe and trading style.
Core Features:
Dynamic State Flipping: When the price closes through an active CISD level, the script instantly evaluates the breakout's candle sequence and drops a new opposing CISD line retroactively anchored to the correct sequence origin.
Body % Threshold Filter: Filters out market noise by allowing you to set a minimum required body size (High-to-Low percentage) for a candle to be considered "valid." A streak must contain at least two valid candles to confirm a structural sequence.
Bar-Close Confirmation: Strict barstate.isconfirmed logic prevents false mid-candle repainting. Lines only shift, flip, or extend the exact millisecond a candle officially closes.
Clean Chart History: Automatically curates your chart by saving a user-defined number of historical CISD levels while deleting old ones to prevent visual clutter.
Integrated Alerts: Built-in alert() functions for both Bullish and Bearish confirmations. Set up a single "Any alert() function call" in TradingView to receive real-time notifications exactly when the state flips.
Customizable Settings:
Adjust body size thresholds, forward line extensions, maximum historical lines displayed, and sequence lookback limits to fit your specific timeframe and trading style.
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。