OPEN-SOURCE SCRIPT
ICT Daily Liquidity Sweep [PineGen AI]

ICT Daily Liquidity Sweep [PineGen AI]
OVERVIEW
This strategy trades liquidity sweeps in the style of ICT (Inner Circle Trader) concepts. It marks the Asian session range each day, then looks for price to sweep above or below that range — or above/below the previous day's high/low — and reverse back inside it. A sweep followed by a close back inside the range is treated as a potential liquidity grab, and the strategy enters in the direction of the reversal.
Entries are only considered during a configurable time window (London/NY hours by default), which is when these liquidity-sweep setups are most commonly discussed in ICT-based trading approaches.
HOW IT WORKS
Asian range: the script tracks the high and low of the Asian session (00:00–08:00 UTC by default, adjustable) and locks the range once the session ends.
Sweep detection: a long setup requires price to trade below the Asian low or the previous day's low and close back above it within the trading window. A short setup is the mirror condition against the Asian high or previous day's high.
Risk and exits: stop-loss is placed beyond the sweep wick with a configurable buffer. Two take-profit levels are set at user-defined risk-reward multiples (TP1 partial close, TP2 full close). A hard time-based exit closes any open position at a configurable hour to avoid holding through low-liquidity periods.
Position sizing: quantity is calculated from account equity and a user-defined risk percentage per trade, not a fixed lot size.
SETTINGS
BACKTEST ASSUMPTIONS
Default backtest settings use a starting capital of 10,000, 10% of equity per trade, a 0.01% commission per side, and 2 ticks of slippage. These are configurable in the Properties tab and should be adjusted to match your actual broker/instrument costs before drawing conclusions from the results — commission and slippage assumptions materially affect strategy performance, especially on lower timeframes.
[INSERT PERFORMANCE SUMMARY HERE ONCE BACKTEST IS RUN OVER FULL AVAILABLE HISTORY WITH 100+ CLOSED TRADES — total trades, win rate, profit factor, max drawdown, net profit, and the symbol/timeframe/date range tested. Do not publish with a sample under 100 trades.]
IMPORTANT NOTES
This strategy does not repaint — orders are processed on bar close and higher-timeframe data is pulled with lookahead disabled. Backtest results are hypothetical and do not account for real-world factors such as latency, partial fills, or changing market conditions, and past performance is not indicative of future results. This script is provided for educational purposes and is not financial advice. Always forward-test on a demo account before considering live use, and adjust the commission/slippage settings to reflect your actual trading costs.
OVERVIEW
This strategy trades liquidity sweeps in the style of ICT (Inner Circle Trader) concepts. It marks the Asian session range each day, then looks for price to sweep above or below that range — or above/below the previous day's high/low — and reverse back inside it. A sweep followed by a close back inside the range is treated as a potential liquidity grab, and the strategy enters in the direction of the reversal.
Entries are only considered during a configurable time window (London/NY hours by default), which is when these liquidity-sweep setups are most commonly discussed in ICT-based trading approaches.
HOW IT WORKS
Asian range: the script tracks the high and low of the Asian session (00:00–08:00 UTC by default, adjustable) and locks the range once the session ends.
Sweep detection: a long setup requires price to trade below the Asian low or the previous day's low and close back above it within the trading window. A short setup is the mirror condition against the Asian high or previous day's high.
Risk and exits: stop-loss is placed beyond the sweep wick with a configurable buffer. Two take-profit levels are set at user-defined risk-reward multiples (TP1 partial close, TP2 full close). A hard time-based exit closes any open position at a configurable hour to avoid holding through low-liquidity periods.
Position sizing: quantity is calculated from account equity and a user-defined risk percentage per trade, not a fixed lot size.
SETTINGS
- SL Buffer (pips) — distance beyond the sweep wick for the stop
- Risk % — percentage of equity risked per trade, used to size position
- TP1 / TP2 R:R — take-profit distances as a multiple of initial risk
- TP1 Close % — portion of the position closed at TP1
- Window Start / End (UTC) — the hours during which new entries are allowed
- Labels / Session backgrounds — visual toggles only, no effect on signals
BACKTEST ASSUMPTIONS
Default backtest settings use a starting capital of 10,000, 10% of equity per trade, a 0.01% commission per side, and 2 ticks of slippage. These are configurable in the Properties tab and should be adjusted to match your actual broker/instrument costs before drawing conclusions from the results — commission and slippage assumptions materially affect strategy performance, especially on lower timeframes.
[INSERT PERFORMANCE SUMMARY HERE ONCE BACKTEST IS RUN OVER FULL AVAILABLE HISTORY WITH 100+ CLOSED TRADES — total trades, win rate, profit factor, max drawdown, net profit, and the symbol/timeframe/date range tested. Do not publish with a sample under 100 trades.]
IMPORTANT NOTES
This strategy does not repaint — orders are processed on bar close and higher-timeframe data is pulled with lookahead disabled. Backtest results are hypothetical and do not account for real-world factors such as latency, partial fills, or changing market conditions, and past performance is not indicative of future results. This script is provided for educational purposes and is not financial advice. Always forward-test on a demo account before considering live use, and adjust the commission/slippage settings to reflect your actual trading costs.
สคริปต์แบบโอเพนซอร์ส
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
🚀 PineGen AI — the dedicated Pine Script AI tool. Describe any strategy, get 100% bug-free, compiler-checked Pine Script v6 code in seconds.
Try it free: pinegen.ai/
Try it free: pinegen.ai/
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน
สคริปต์แบบโอเพนซอร์ส
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
🚀 PineGen AI — the dedicated Pine Script AI tool. Describe any strategy, get 100% bug-free, compiler-checked Pine Script v6 code in seconds.
Try it free: pinegen.ai/
Try it free: pinegen.ai/
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน