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. اقرأ المزيد في شروط الاستخدام.