PROTECTED SOURCE SCRIPT
已更新 Simple Fractals with Wick Filter & BOS

This advanced fractal indicator combines traditional Williams Fractal analysis with sophisticated wick filtering and Break of Structure (BOS) detection to identify high-probability reversal points and structural breaks in price action.
🔍 How It Works
Fractal Detection: Uses the classic Williams Fractal methodology to identify swing highs and lows. A fractal high occurs when a candle's high is greater than N periods before and after it. Similarly, a fractal low occurs when a candle's low is lower than N periods on both sides.
Wick Filtering: Only displays fractals where the rejection wick meets a minimum threshold, ensuring the fractal represents genuine price rejection rather than minor fluctuations.
Break of Structure (BOS): Monitors when strong candles close beyond previous fractal levels within a specified lookback period, indicating potential trend changes or continuation patterns.
⚙️ Parameter Guide
📊 Visual Elements
🔔 Alerts
The indicator includes built-in alerts for:
🔍 How It Works
Fractal Detection: Uses the classic Williams Fractal methodology to identify swing highs and lows. A fractal high occurs when a candle's high is greater than N periods before and after it. Similarly, a fractal low occurs when a candle's low is lower than N periods on both sides.
Wick Filtering: Only displays fractals where the rejection wick meets a minimum threshold, ensuring the fractal represents genuine price rejection rather than minor fluctuations.
Break of Structure (BOS): Monitors when strong candles close beyond previous fractal levels within a specified lookback period, indicating potential trend changes or continuation patterns.
⚙️ Parameter Guide
- Periods (Default: 7) - Controls fractal sensitivity
- Wick Threshold (Default: 0.4 / 40%) - Minimum wick size relative to total candle range
- BOS Lookback Bars (Default: 90) - How far back to monitor fractal levels for potential breaks
- Strong Candle Body % (Default: 0.5 / 50%) - Minimum body size required to trigger BOS, Higher values reduce false signals but may miss some valid breaks
📊 Visual Elements
- Colored Dots: Small circles mark validated fractals
- Top Wick Fractals: Customizable color (default red) above bars
- Bottom Wick Fractals: Customizable color (default green) below bars
- BOS Lines: Dotted horizontal lines connecting fractal origin to break point
- Green Lines: Bullish BOS (price closes above fractal high)
- Red Lines: Bearish BOS (price closes below fractal low)
- Faded Fractals (Optional): Shows all fractals that didn't meet wick requirements for comparison
🔔 Alerts
The indicator includes built-in alerts for:
- High fractal formation with sufficient wick
- Low fractal formation with sufficient wick
版本注释
Add Session Filter Inputs:use_session_filter: Boolean to enable/disable the session filter
session_time: Time range input (default "0930-1600" NY time)
版本注释
Add Fair Value Gap Detection after BOS appeared.FVG Settings:
- Show Fair Value Gaps: Enable/disable FVG detection
- FVG Extend Bars: How many bars to extend the FVG box (default 3)
- FVG Check Period After BOS: How many bars after BOS to look for FVGs (default 5)
- Custom colors for bullish and bearish FVGs
版本注释
Key RSI Filter Features AddedRSI Filter Inputs:
- Use RSI Filter for BOS: Enable/disable RSI filtering (default OFF)
- RSI Period: Period for RSI calculation (default 4)
- RSI Overbought Level: Threshold for bullish BOS (default 80)
- RSI Oversold Level: Threshold for bearish BOS (default 20)
This filter helps identify BOS signals that occur from extreme RSI conditions, potentially continuation of the strong trend
版本注释
Key Fix AppliedNow when a candle breaks a fractal level but doesn't meet the strong candle or RSI criteria, the level is removed and no BOS is marked. The indicator won't continue searching for future candles to validate that same break.
版本注释
Key Supertrend Filter Features AddedSupertrend Filter Inputs:
- Use Supertrend Filter for BOS: Enable/disable Supertrend filtering (default OFF)
- Supertrend Timeframe: Choose timeframe for Supertrend calculation (default current chart)
- Supertrend Factor: Multiplier for ATR calculation (default 3.0)
- Supertrend ATR Period: Period for ATR calculation (default 10)
Supertrend Filter Logic:
- Bullish BOS: Only triggers when Supertrend is bullish (direction < 0)
- Bearish BOS: Only triggers when Supertrend is bearish (direction > 0)
- Filter Disabled: When off, all BOS signals show normally
受保护脚本
此脚本以闭源形式发布。 但是,您可以自由使用它,没有任何限制 — 在此处了解更多信息。
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。
受保护脚本
此脚本以闭源形式发布。 但是,您可以自由使用它,没有任何限制 — 在此处了解更多信息。
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。