OPEN-SOURCE SCRIPT
Fractals & Sweep

The Fractals & Sweep indicator is designed to identify key market structure points (fractals) and detect potential liquidity sweeps around those areas. It visually highlights both Bill Williams fractals and regular fractals, and alerts the user when the market sweeps liquidity above or below the most recent fractal levels.
Fractal Recognition:
Detects both bullish (low) and bearish (high) fractals on the price chart.
Users can choose between:
Bill Williams fractal logic (default), or
Regular fractal logic (when the “Filter Bill Williams Fractals” option is enabled).
Fractals are plotted directly on the chart as red downward triangles for highs and green upward triangles for lows.
Fractal Tracking:
The indicator stores the most recent high and low fractal levels to serve as reference points for potential sweep detection.
Sweep Detection:
A bearish sweep is triggered when the price wicks above the last fractal high but closes below it — suggesting a liquidity grab above resistance.
A bullish sweep is triggered when the price wicks below the last fractal low but closes above it — suggesting a liquidity grab below support.
When a sweep occurs, the indicator draws a horizontal line from the previous fractal point to the current bar.
Alert System:
Custom alerts notify the trader when a bearish sweep or bullish sweep occurs, allowing for timely reactions to potential reversals or liquidity traps.
Fractal Recognition:
Detects both bullish (low) and bearish (high) fractals on the price chart.
Users can choose between:
Bill Williams fractal logic (default), or
Regular fractal logic (when the “Filter Bill Williams Fractals” option is enabled).
Fractals are plotted directly on the chart as red downward triangles for highs and green upward triangles for lows.
Fractal Tracking:
The indicator stores the most recent high and low fractal levels to serve as reference points for potential sweep detection.
Sweep Detection:
A bearish sweep is triggered when the price wicks above the last fractal high but closes below it — suggesting a liquidity grab above resistance.
A bullish sweep is triggered when the price wicks below the last fractal low but closes above it — suggesting a liquidity grab below support.
When a sweep occurs, the indicator draws a horizontal line from the previous fractal point to the current bar.
Alert System:
Custom alerts notify the trader when a bearish sweep or bullish sweep occurs, allowing for timely reactions to potential reversals or liquidity traps.
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้มันเป็นโอเพ่นซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันการทำงานของสคริปต์ได้ ขอแสดงความชื่นชมผู้เขียน! แม้ว่าคุณจะสามารถใช้งานได้ฟรี แต่อย่าลืมว่าการเผยแพร่โค้ดซ้ำนั้นจะต้องเป็นไปตามกฎระเบียบการใช้งานของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมที่ ข้อกำหนดการใช้งาน
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้มันเป็นโอเพ่นซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันการทำงานของสคริปต์ได้ ขอแสดงความชื่นชมผู้เขียน! แม้ว่าคุณจะสามารถใช้งานได้ฟรี แต่อย่าลืมว่าการเผยแพร่โค้ดซ้ำนั้นจะต้องเป็นไปตามกฎระเบียบการใช้งานของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมที่ ข้อกำหนดการใช้งาน