PROTECTED SOURCE SCRIPT
Cập nhật APS - Sweeps & BOS

This indicator identifies pivot highs and lows, detects liquidity sweeps, and marks Break of Structure (BOS).
Key Features:
1) Pivot Detection :
The script uses configurable left and right bar parameters to identify significant pivot highs and lows, marking them with "X" labels on the chart. These pivots represent potential areas where price may react.
2) Sweep Detection :
A sweep occurs when price temporarily moves beyond a previous pivot level but closes back inside, suggesting a liquidity grab or stop hunt. The indicator draws horizontal lines connecting the original pivot to the sweep location and labels these events. Sweeps often precede reversals as they collect liquidity before moving in the opposite direction.
3) Break of Structure (BOS) :
BOS events are marked when price closes beyond a previous pivot level, indicating a potential shift in market structure. Bullish BOS occurs when price closes above a pivot high, while Bearish BOS occurs when price closes below a pivot low. These can signal continuation moves or trend changes.
4) Previous Day High/Low (PDH/PDL):
The indicator tracks the previous session's high and low (based on 6 PM ET session breaks, which auto-adjusts for DST) and displays whether these levels have been breached. It also calculates and displays a 50% equilibrium line between PDH and PDL.
5) Higher Timeframe Context :
A table in the top-right corner shows whether the higher timeframe close is in premium (above equilibrium) or discount (below equilibrium) territory. The HTF automatically adjusts based on your current timeframe.
6) Customization Options:
Adjustable pivot sensitivity (left/right bars)
Configurable sweep lookback period
Customizable colors, line styles, and label sizes for all elements
Toggle visibility for any component
Optional alerts for sweeps and BOS events
How to Use:
Sweeps near support/resistance often indicate liquidity grabs before reversals
BOS events can confirm directional bias changes
Use PDH/PDL levels as reference points for intraday trading
Consider HTF context when taking trades (discount zones for longs, premium zones for shorts)
Important Notes:
This indicator is designed for educational purposes and market analysis. Past patterns do not guarantee future results. Please follow proper risk management. https://www.tradingview.com/x/SJaTbeVV/
Key Features:
1) Pivot Detection :
The script uses configurable left and right bar parameters to identify significant pivot highs and lows, marking them with "X" labels on the chart. These pivots represent potential areas where price may react.
2) Sweep Detection :
A sweep occurs when price temporarily moves beyond a previous pivot level but closes back inside, suggesting a liquidity grab or stop hunt. The indicator draws horizontal lines connecting the original pivot to the sweep location and labels these events. Sweeps often precede reversals as they collect liquidity before moving in the opposite direction.
3) Break of Structure (BOS) :
BOS events are marked when price closes beyond a previous pivot level, indicating a potential shift in market structure. Bullish BOS occurs when price closes above a pivot high, while Bearish BOS occurs when price closes below a pivot low. These can signal continuation moves or trend changes.
4) Previous Day High/Low (PDH/PDL):
The indicator tracks the previous session's high and low (based on 6 PM ET session breaks, which auto-adjusts for DST) and displays whether these levels have been breached. It also calculates and displays a 50% equilibrium line between PDH and PDL.
5) Higher Timeframe Context :
A table in the top-right corner shows whether the higher timeframe close is in premium (above equilibrium) or discount (below equilibrium) territory. The HTF automatically adjusts based on your current timeframe.
6) Customization Options:
Adjustable pivot sensitivity (left/right bars)
Configurable sweep lookback period
Customizable colors, line styles, and label sizes for all elements
Toggle visibility for any component
Optional alerts for sweeps and BOS events
How to Use:
Sweeps near support/resistance often indicate liquidity grabs before reversals
BOS events can confirm directional bias changes
Use PDH/PDL levels as reference points for intraday trading
Consider HTF context when taking trades (discount zones for longs, premium zones for shorts)
Important Notes:
This indicator is designed for educational purposes and market analysis. Past patterns do not guarantee future results. Please follow proper risk management. https://www.tradingview.com/x/SJaTbeVV/
Phát hành các Ghi chú
Added color customization to bearish BOS
bullish BOS
bearish Sweep
bullish Sweep
Mã được bảo vệ
Tập lệnh này được đăng dưới dạng mã nguồn đóng. Tuy nhiên, bạn có thể sử dụng tự do và không giới hạn – tìm hiểu thêm tại đây.
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ã được bảo vệ
Tập lệnh này được đăng dưới dạng mã nguồn đóng. Tuy nhiên, bạn có thể sử dụng tự do và không giới hạn – tìm hiểu thêm tại đây.
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.