OPEN-SOURCE SCRIPT
已更新 PD LLT replica (Python parity)

Automated Premium/Discount areas paired with a Logical Liquidity Target (LLT).
This is an independent, clean-room Pine v6 implementation of the premium/discount + LLT workflow (concept popularized by PD LLT and Trader Kane's Lab Model). No code was copied - it was written from scratch to mirror my own Python backtest module, so the chart drawings and the Python engine can be verified against each other bar by bar.
HOW IT WORKS
1. Dealing range = the latest CONFIRMED swing high + swing low pair (fractal pivots, "Pivot strength" input). Each newly confirmed pivot rotates the range to the latest pair. Optional "Growing area" mode rotates only when a pivot extends beyond the current extreme.
2. Every range is split at its 50% midpoint into a PREMIUM area (upper half) and a DISCOUNT area (lower half).
3. EQ cross: the close at range activation sets the baseline side; a flip of that side through the 50% Mid is the cross (up = bullish, down = bearish).
4. LLT: the first swing that CONFIRMS after the cross, on the cross side, becomes the Logical Liquidity Target (blue = bullish target, pink = bearish target).
5. Delivery: price touching the LLT fades the areas and prints a white diamond. Superseded (older) ranges keep tracking their LLT until delivery.
6. Alerts: "Mid Hit up/down" (50% cross) and "LLT Hit".
LOOK-AHEAD SAFETY
A swing of strength s is only drawn s bars after it prints - no level appears before the market could know it.
TIPS
- Default Pivot strength = 5 on intraday charts; lower it on higher timeframes.
- Enable "Growing area" if you prefer ranges that only expand on new extremes.
- Reduce "Older PD areas kept on chart" for a cleaner view.
This is an independent, clean-room Pine v6 implementation of the premium/discount + LLT workflow (concept popularized by PD LLT and Trader Kane's Lab Model). No code was copied - it was written from scratch to mirror my own Python backtest module, so the chart drawings and the Python engine can be verified against each other bar by bar.
HOW IT WORKS
1. Dealing range = the latest CONFIRMED swing high + swing low pair (fractal pivots, "Pivot strength" input). Each newly confirmed pivot rotates the range to the latest pair. Optional "Growing area" mode rotates only when a pivot extends beyond the current extreme.
2. Every range is split at its 50% midpoint into a PREMIUM area (upper half) and a DISCOUNT area (lower half).
3. EQ cross: the close at range activation sets the baseline side; a flip of that side through the 50% Mid is the cross (up = bullish, down = bearish).
4. LLT: the first swing that CONFIRMS after the cross, on the cross side, becomes the Logical Liquidity Target (blue = bullish target, pink = bearish target).
5. Delivery: price touching the LLT fades the areas and prints a white diamond. Superseded (older) ranges keep tracking their LLT until delivery.
6. Alerts: "Mid Hit up/down" (50% cross) and "LLT Hit".
LOOK-AHEAD SAFETY
A swing of strength s is only drawn s bars after it prints - no level appears before the market could know it.
TIPS
- Default Pivot strength = 5 on intraday charts; lower it on higher timeframes.
- Enable "Growing area" if you prefer ranges that only expand on new extremes.
- Reduce "Older PD areas kept on chart" for a cleaner view.
發行說明
- bug fixes開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。