OPEN-SOURCE SCRIPT
XAUUSD Liquidity Sweep + Engulfing (4H/2H/15m)

Key Features in This Script:
4H Bias (Trend): We use RSI on 4H to determine if the market is in a bullish or bearish trend.
2H Setup: When price sweeps below previous lows or above previous highs (liquidity sweep), we confirm it with RSI and an engulfing candle.
15m Entry: After the liquidity sweep is confirmed on the 15m chart, we check for a bullish engulfing (for buys) or bearish engulfing (for sells) with RSI confirmation.
How to Use It:
Add the Script: Copy-paste the code above into TradingView’s Pine Editor.
Apply it to the 15-minute chart for XAUUSD (Gold).
Alerts: Set up alerts when a Buy or Sell signal appears based on the conditions.
Alerts Example:
When a liquidity sweep and RSI flip happens with an engulfing candle, TradingView will notify you, helping you enter at the right time.
🚀 Next Steps:
Try it out and let me know how the alerts and signals are working for you.
If you'd like to add custom stop-loss or take-profit calculations, or include Fibonacci levels, let me know!
4H Bias (Trend): We use RSI on 4H to determine if the market is in a bullish or bearish trend.
2H Setup: When price sweeps below previous lows or above previous highs (liquidity sweep), we confirm it with RSI and an engulfing candle.
15m Entry: After the liquidity sweep is confirmed on the 15m chart, we check for a bullish engulfing (for buys) or bearish engulfing (for sells) with RSI confirmation.
How to Use It:
Add the Script: Copy-paste the code above into TradingView’s Pine Editor.
Apply it to the 15-minute chart for XAUUSD (Gold).
Alerts: Set up alerts when a Buy or Sell signal appears based on the conditions.
Alerts Example:
When a liquidity sweep and RSI flip happens with an engulfing candle, TradingView will notify you, helping you enter at the right time.
🚀 Next Steps:
Try it out and let me know how the alerts and signals are working for you.
If you'd like to add custom stop-loss or take-profit calculations, or include Fibonacci levels, let me know!
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.