PROTECTED SOURCE SCRIPT
CISD Clever - 126 (FVG Filter)

This Pine Script indicator, named "CISD Clever - 126 (FVG Filter)", is designed for technical analysis on financial charts (likely using TradingView). It identifies specific market structure shifts, termed CISD (Change in Sentiment/Structure Detection), and uses FVG (Fair Value Gap) as a filter to refine trading signals.
XAUUSD
BTCUSD 
BTCUSDT 
EURUSD
The indicator is built around the concepts of Smart Money Concepts (SMC), focusing on liquidity sweeps, market structure shifts, and price inefficiencies.
Here is a breakdown of its functionality and mechanics:
Core Concepts
CISD (Change in Sentiment/Structure Detection): The main trigger of the indicator. It detects a significant candle pattern that suggests a shift in market control from buyers to sellers (bearish CISD) or sellers to buyers (bullish CISD), often after liquidity has been taken.
FVG Filter (Fair Value Gap): A core SMC concept representing a price inefficiency where there is a gap between the wick of the first candle and the wick of the third candle in a three-candle sequence. This indicator uses a FVG as a filter: a CISD signal is only considered valid if a corresponding FVG is present immediately afterward.
Liquidity Sweeps: The indicator tracks previous swing points (highs/lows) as potential liquidity zones. A CISD is considered stronger if it is preceded by the price "sweeping" (wicking past) an old liquidity level within a recent lookback period.
How It Works (Step-by-Step)
Swing Point Detection: The script uses the ta.pivotlow and ta.pivothigh functions to automatically identify significant swing highs and lows over a user-defined len (Swing Period). These are stored as line objects on the chart to visualize "liquidity levels."
Liquidity Tracking: These liquidity lines are tracked and extended over time. When the price crosses one of these lines, the indicator marks that the liquidity at that level has been "wicked" (taken). Old lines expire after a set expiry_bars period.
Potential CISD Identification: The indicator monitors specific candle close/open relationships (close[1] < open[1] followed by close > open, etc.) which suggest a reversal attempt.
Noise Filtering (Tolerence): When a potential reversal pattern appears, a mathematical ratio based on price movement (tolerence input) is used to ensure the move is significant enough to qualify as a valid CISD.
FVG Filtering & Confirmation:
If a Bearish CISD is confirmed, the script checks if a Bearish FVG is immediately present (Low of candle 2 > High of candle 0). If valid, it draws a colored box (in red) representing this FVG range and flags a new active bear trend.
If a Bullish CISD is confirmed, it checks for a Bullish FVG (High of candle 2 < Low of candle 0). If valid, it draws a colored box (in green) and flags a new active bull trend.
If no FVG is present, the CISD signal is weakened or ignored.
Retest Detection: The indicator continuously monitors price action to see if the market returns to "fill" or "mitigate" the drawn FVG box.
User Customizable Inputs
Input Name Group Description
Noise Filter (tolerence) Calculations Higher values require stronger price shifts to trigger a CISD signal, reducing noise.
Swing Period (len) Calculations Determines how long the lookback is for detecting major swing highs and lows (liquidity levels).
Expiry Bars (expiry_bars) Calculations How many bars an unmitigated liquidity line remains active before being removed.
Liquidity Lookback (liquidity_lookback) Calculations The number of recent bars checked to see if an opposing swing point was taken just before the current CISD event.
Bullish/Bearish Colour Appearance Custom colors for visual elements and signals.
Candle Transparency Appearance Controls the visual appearance of drawing objects.
Summary
This is an advanced market structure analysis tool that overlays key SMC concepts onto your chart. Its primary function is to detect high-probability shifts in market direction (CISD) that are validated by existing price inefficiencies (FVG), helping traders identify potential entry points during the "retest" phase of the FVG.
The indicator is built around the concepts of Smart Money Concepts (SMC), focusing on liquidity sweeps, market structure shifts, and price inefficiencies.
Here is a breakdown of its functionality and mechanics:
Core Concepts
CISD (Change in Sentiment/Structure Detection): The main trigger of the indicator. It detects a significant candle pattern that suggests a shift in market control from buyers to sellers (bearish CISD) or sellers to buyers (bullish CISD), often after liquidity has been taken.
FVG Filter (Fair Value Gap): A core SMC concept representing a price inefficiency where there is a gap between the wick of the first candle and the wick of the third candle in a three-candle sequence. This indicator uses a FVG as a filter: a CISD signal is only considered valid if a corresponding FVG is present immediately afterward.
Liquidity Sweeps: The indicator tracks previous swing points (highs/lows) as potential liquidity zones. A CISD is considered stronger if it is preceded by the price "sweeping" (wicking past) an old liquidity level within a recent lookback period.
How It Works (Step-by-Step)
Swing Point Detection: The script uses the ta.pivotlow and ta.pivothigh functions to automatically identify significant swing highs and lows over a user-defined len (Swing Period). These are stored as line objects on the chart to visualize "liquidity levels."
Liquidity Tracking: These liquidity lines are tracked and extended over time. When the price crosses one of these lines, the indicator marks that the liquidity at that level has been "wicked" (taken). Old lines expire after a set expiry_bars period.
Potential CISD Identification: The indicator monitors specific candle close/open relationships (close[1] < open[1] followed by close > open, etc.) which suggest a reversal attempt.
Noise Filtering (Tolerence): When a potential reversal pattern appears, a mathematical ratio based on price movement (tolerence input) is used to ensure the move is significant enough to qualify as a valid CISD.
FVG Filtering & Confirmation:
If a Bearish CISD is confirmed, the script checks if a Bearish FVG is immediately present (Low of candle 2 > High of candle 0). If valid, it draws a colored box (in red) representing this FVG range and flags a new active bear trend.
If a Bullish CISD is confirmed, it checks for a Bullish FVG (High of candle 2 < Low of candle 0). If valid, it draws a colored box (in green) and flags a new active bull trend.
If no FVG is present, the CISD signal is weakened or ignored.
Retest Detection: The indicator continuously monitors price action to see if the market returns to "fill" or "mitigate" the drawn FVG box.
User Customizable Inputs
Input Name Group Description
Noise Filter (tolerence) Calculations Higher values require stronger price shifts to trigger a CISD signal, reducing noise.
Swing Period (len) Calculations Determines how long the lookback is for detecting major swing highs and lows (liquidity levels).
Expiry Bars (expiry_bars) Calculations How many bars an unmitigated liquidity line remains active before being removed.
Liquidity Lookback (liquidity_lookback) Calculations The number of recent bars checked to see if an opposing swing point was taken just before the current CISD event.
Bullish/Bearish Colour Appearance Custom colors for visual elements and signals.
Candle Transparency Appearance Controls the visual appearance of drawing objects.
Summary
This is an advanced market structure analysis tool that overlays key SMC concepts onto your chart. Its primary function is to detect high-probability shifts in market direction (CISD) that are validated by existing price inefficiencies (FVG), helping traders identify potential entry points during the "retest" phase of the FVG.
保護スクリプト
このスクリプトのソースコードは非公開で投稿されています。 ただし、制限なく自由に使用できます – 詳細はこちらでご確認ください。
免責事項
この情報および投稿は、TradingViewが提供または推奨する金融、投資、トレード、その他のアドバイスや推奨を意図するものではなく、それらを構成するものでもありません。詳細は利用規約をご覧ください。
保護スクリプト
このスクリプトのソースコードは非公開で投稿されています。 ただし、制限なく自由に使用できます – 詳細はこちらでご確認ください。
免責事項
この情報および投稿は、TradingViewが提供または推奨する金融、投資、トレード、その他のアドバイスや推奨を意図するものではなく、それらを構成するものでもありません。詳細は利用規約をご覧ください。