PROTECTED SOURCE SCRIPT
已更新

Simple Fractals with Wick Filter & BOS

624
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
  • 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 Added
RSI 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 Applied

Now 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 Added
Supertrend 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提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。