PROTECTED SOURCE SCRIPT
已更新 Double Purge Theory (DPT)

The purpose of this script is to identify the Double Purge Theory-MMXM i.e. the run on liquidity on both the sell-side and the buy-side liquidity.
The simple use case behind this script is to provide additional entry confluence for your trade setups and more efficient stop loss placement on any given timeframe.
DPT in itself is a price signature that generally occurs before price makes impulsive move in the direction of the higher time frame narrative. It is not to be used as a standalone indicator for building narrative/framing bias.
How to use this script ?
1) Wait for the indicator to display the BLUE CANDLE highlight (DPT candle) that indicates the double purge has occurred. [the color is set to blue by default , you can change it by going into the settings tab]
2) The DPT should occur at/after price has tapped into a key level and is within the ICT killzones.
3) Position to frame your trade setup once you get a candle with a body close below / above the DPT candle , depending on your bias and stop loss placement at DPT candle high/low or after the body closure as mentioned in step 2.
For example :
https://www.tradingview.com/x/mqPFuDQ9/
https://www.tradingview.com/x/GqMZfv7O/
The simple use case behind this script is to provide additional entry confluence for your trade setups and more efficient stop loss placement on any given timeframe.
DPT in itself is a price signature that generally occurs before price makes impulsive move in the direction of the higher time frame narrative. It is not to be used as a standalone indicator for building narrative/framing bias.
How to use this script ?
1) Wait for the indicator to display the BLUE CANDLE highlight (DPT candle) that indicates the double purge has occurred. [the color is set to blue by default , you can change it by going into the settings tab]
2) The DPT should occur at/after price has tapped into a key level and is within the ICT killzones.
3) Position to frame your trade setup once you get a candle with a body close below / above the DPT candle , depending on your bias and stop loss placement at DPT candle high/low or after the body closure as mentioned in step 2.
For example :
https://www.tradingview.com/x/mqPFuDQ9/
https://www.tradingview.com/x/GqMZfv7O/
發行說明
What is new in DPT V2 update : 1) Added alerts for DPT, now you can set alerts to go off whenever DPT occurs :
Go to TradingView and open your chart.
Click on the "Alerts" icon (🔔) in the top panel.
Click "Create Alert".
In the Condition dropdown, select the DPT indicator.
Choose "Any alert function call".
Select alert frequency (e.g., once per bar).
Set your preferred notification method (popup, email, webhook, etc.).
Click Create.
2) Bias selection :
This will let users select the sweep they want to filter , if a user selects bullish bias , only bullish sweeps will be shown and if user selects bearish bias then, only bearish sweep shall be shown.
You still have the option to view both.
發行說明
1) Added time filter to only detect and show DPTs during the time range user specifies. 2) The sweeps logic has been changed to show only the sweep of DPT candle based on stats.
發行說明
Time Filtering : i) Optional time-based filtering (EST time zone).
ii) Two customizable time slots.
iii) Default slots: 2-5 AM & 8-11 AM EST (can be disabled to capture 24/7 sweeps).
Visual Elements
i) Blue candles (color set by default) = DPT pattern detected
ii) Colored lines = Sweep levels (customizable length, color, style, thickness).
iii) Probability labels = Shows success rate at each sweep.
iv) Statistics table = Real-time performance metrics.
Probability Labels
🟢 Green = >51% success rate (high probability)
🟠 Orange = 40-51% success rate (medium)
🔴 Red = <40% success rate (low probability)
Only shows after minimum sample size reached.
Updates in real-time with historical data.
Statistics Table
Displays:
Bullish sweep success rate
Bearish sweep success rate
Overall success rate
Sample size (total sweeps analyzed)
Color-coded percentages (Green/Orange/Red)
Fully customizable position, size, colors, transparency
Show/hide probability labels
Size options (Tiny/Small/Normal/Large)
Minimum sample size threshold (default: 10)
Auto color-coding based on performance
Time Filter
發行說明
Fixed bug which was breaking stats when time filter was on but slot 1 was disabled. 發行說明
Removed Stats tableSweeps will retain probability labels
Added alerts for when
i) DPT candle is detected
ii) Sweep of DPT candle
發行說明
Added more information to probability labels 發行說明
Removed probability and stats since it was not providing meaningful edge發行說明
Bug fixes受保護腳本
此腳本以閉源形式發佈。 不過,您可以自由且不受任何限制地使用它 — 在此處了解更多資訊。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
受保護腳本
此腳本以閉源形式發佈。 不過,您可以自由且不受任何限制地使用它 — 在此處了解更多資訊。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。