PROTECTED SOURCE SCRIPT
ที่อัปเดต:

Liquidity Hunt Detector PDH/PDL [SmartFoxy]

54
Liquidity Hunt Detector PDH/PDL [SmartFoxy]

The Liquidity Hunt Detector (LHD) is designed to identify and anticipate liquidity grabs around the:
• Previous Day High (PDH);
• Previous Day Low (PDL).

It builds dynamic trigger levels that highlight where price may deliver its first impulse before reaching PDH/PDL.

The Liquidity Hunt Detector (LHD) identifies high-probability reversals and continuations around the Previous Day High (PDH) and Previous Day Low (PDL).

It dynamically tracks the market’s move from the session open, builds trigger levels toward PDH/PDL, and highlights where liquidity is most likely to be taken.

When price taps a Trigger Up/Down level, the indicator generates Long/Short signals with optional confirmation from the integrated MA Ribbon, ensuring only high-quality, trend-aligned setups are shown.

When price interacts with these trigger levels, the indicator generates signals that help traders evaluate the market structure and prepare for potential entries.

Designed for Forex, Crypto, Indices, Stocks, the LHD provides a clean and intuitive structure for navigating intraday liquidity grabs, session impulses, and directional bias shifts.

The indicator is built from three fully independent modules, each of which can be used separately:
  1. Liquidity Hunt Detector (LHD)
  2. Moving Average Ribbon (MA Ribbon)
  3. Previous Day High/Low (PDH/PDL) levels


Liquidity Hunt Detector (LHD) Logic

1.1 Display LHD – Enables or disables the entire Liquidity Hunt Detector module.

1.2 Max Days – Number of previous days used to generate PDH/PDL levels.

1.3 GMT – Corrects all time-based calculations based on your broker/session timezone.

1.4 Calculation Method (Point A Logic)
1) Static Method
Point A = the session’s opening price.
Trigger lines are calculated strictly as a percentage of the move A → PDH or A → PDL.
Intraday fluctuations do not affect the calculation.
2) Dynamic Method
Point A updates using the current intraday high/low:
• If price forms a new low, Point A updates for the PDH-side calculations;
• If price forms a new high, Point A updates for the PDL-side calculations.
This produces trigger lines that reflect the true live market structure rather than a fixed opening reference.

1.5 Main OTT Time (Operational Trading Time)
This is the core time window during which the indicator:
• updates Point A;
• calculates trigger levels;
• validates PDH/PDL;
• draws AB / AC movement structure;
• generates entry signals.
Outside this window, no new signals or recalculations occur.
⚠ If your broker’s first candle opens at a non-standard time (e.g., 00:08), adjust the OTT start time to avoid visual artifacts.

1.6 Show Line A – Displays the opening price level (Point A) until the end of the OTT window.
Style, width, and color are customizable.

1.7 Show Line AB — Price Movement Toward PDH.
Static Method – Single line: A → PDH
Dynamic Method – Two segments:
• A → Daily Low;
• Daily Low → PDH.
If PDH is swept, the “B” label switches to Sweep PDH.

1.8 Show Line AC – Price Movement Toward PDL.
Static Method – Single line: A → PDL
Dynamic Method – Two segments:
• A → Daily High;
• Daily High → PDL.
If PDL is swept, the “C” label switches to Sweep PDL.

1.9 Show Trigger Up Line (LONG Trigger) – Defines the level where the Long signal can activate.
By default, at 50% of the A → PDH movement.
When price touches this line, the script may:
• show a LONG label;
• trigger an alert.
All visual parameters are customizable.

1.10 Show Trigger Up Line (LONG Trigger)
Same logic as Trigger Up, but based on A → PDL.

1.11 Show Main Zone (OTT Zone) – Visual background highlighting of the active OTT window.
Helps instantly see:
• whether signals are allowed;
• how much time remains in the trading window?
Color and opacity are adjustable.

1.12 Upper Zone (toward PDH) – Tracks the protected area towards PDH.
Updates dynamically with new highs.

1.13 Lower Zone (toward PDL) – Tracks the zone toward PDL.
Updates dynamically with new lows.

1.14 Show Labels – Displays reference labels (A, B, C, Trigger Up, Trigger Down).
Label size is customizable.

1.15 Add Price – Adds the exact price value to each label.

1.16 Change Color after Sweep PDH or PDL – After PDH or PDL is broken, the indicator automatically recolors lines and labels to visually confirm the sweep.

1.17 Show SHORT Label – Displays the SHORT entry label when all conditions for a bearish signal are met.
Style parameters are set in the previous blocks.

1.18 Alert on Bearish Trigger Down – Triggers an alert when the price activates the bearish trigger.

1.19 Show LONG Label – Displays the LONG entry label when bullish conditions are met.
Style parameters are set in the previous blocks.

1.20 Alert on Bullish Trigger Up – Triggers an alert when the price activates the bullish trigger.

1.21 Alerts Active Time – Defines a custom time interval during which trigger signals are allowed.
Even if price touches a trigger level,
❗ signals will NOT be generated outside this allowed time.
Useful for:
• avoiding Asian session signals;
• reducing noise in low-liquidity periods.

1.22 Labels and Alerts Display Mode
Two settings modes:
• On Trigger (Instant Mode) – Signals appear immediately when price touches the trigger.
• On Candle Close (Conservative Mode) – Signals form only after the candle closes beyond the trigger level.
A more conservative option.

1.23 Delay LHD Signal Until MA Ribbon Confirms Direction – If enabled, LHD signals will NOT fire until the MA Ribbon produces a matching directional signal.
Logic:
• Price hits the trigger → LHD conditions become “armed”;
• The indicator waits;
• When MA Ribbon confirms trend direction (Long/Short);
• The final LHD label + alert is generated.
This ensures LHD trades are filtered and aligned with MA-based trend confirmation.
⚠ Works only when the MA Ribbon module is active.
เอกสารเผยแพร่
Added a parameter «Hide MA Lines» that allows you to hide MA Ribbon lines.

คำจำกัดสิทธิ์ความรับผิดชอบ

ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน