OPEN-SOURCE SCRIPT
Zaktualizowano 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.
Informacje o Wersji
- bug fixesSkrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.
Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.