OPEN-SOURCE SCRIPT
PD Location Screener (NY Session)

PD Location Screener (NY Session) – Premium / Discount / Equilibrium Bias
This open-source overlay indicator is a lightweight visual screener that shows where current price is located relative to the **previous day's range** (PD high/low/midpoint), helping traders quickly identify:
- Discount zones (below 25% of PD range → potential buy bias)
- Premium zones (above 75% of PD range → potential sell bias)
- Equilibrium / neutral (near midpoint → balanced / choppy)
Core Concept
Many intraday traders use the previous day's range as a reference framework:
- Price below the midpoint (especially in the lower 25%) is considered **discount** → undervalued relative to yesterday → higher probability of mean-reversion buys or continuation if momentum builds
- Price above the midpoint (especially in the upper 25%) is considered **premium** → overvalued → higher probability of mean-reversion sells or fading
- Near the midpoint → equilibrium → often choppy or awaiting directional catalyst
This script adds a **NY session filter** (default 08:30–16:00 NY time) so the PD range calculation only includes bars during active New York hours — useful for avoiding thin Asian-range noise and focusing on high-liquidity period behavior.
Why this is useful
- Provides instant visual context for bias without cluttering the chart
- Helps filter trades: e.g., look for longs in discount + bullish structure, shorts in premium + bearish structure
- Session filter makes it particularly effective for NY/London overlap strategies (forex, indices, gold, futures)
How It Works
1. Tracks daily high/low only during NY session (optional toggle)
- Resets at new day
- Updates only when inSession = true
2. Calculates:
- Midpoint = (PD High + PD Low) / 2
- PD Range = PD High – PD Low
- Discount threshold = PD Low + 25% of range
- Premium threshold = PD Low + 75% of range
3. Bias flags:
- Discount: close < midpoint → green triangle below bar
- Premium: close > midpoint → red triangle above bar
4. Optional last-bar label:
- "DISCOUNT ZONE" (green)
- "PREMIUM ZONE" (red)
- "EQUILIBRIUM" (gray)
Visual Output
- Green triangle below bar → price in discount (buy bias area)
- Red triangle above bar → price in premium (sell bias area)
- Last-bar label (toggleable) showing current location
How to Use
- Best on **5m–1h timeframes** for intraday trading (forex majors, indices, gold, futures)
- Recommended pairs: EURUSD, GBPUSD, XAUUSD, NAS100, ES1!, NQ1!
- Typical workflow:
1. Wait for price to reach discount zone + bullish price action / structure → consider longs
2. Wait for premium zone + bearish price action → consider shorts
3. Avoid entries near equilibrium unless strong breakout catalyst
- Combine with:
- Order blocks, FVGs, liquidity sweeps
- Higher-timeframe trend filter
- Session open/high/low
- Toggle "Use NY Session Only" off if you want full 24h range (e.g., crypto or Asian-focused pairs)
Inputs
- Use NY Session Only: true = only NY hours count toward PD range (recommended)
- NY Session: default "0830-1600" (adjust if broker timezone differs)
- Show Location Labels: toggle last-bar text label
Publishing Recommendation
- Publish with a clean chart (e.g., 15m–1h XAUUSD or EURUSD during NY session)
- Show a period where price moves from discount → equilibrium → premium (triangles visible)
- No extra indicators/drawings needed
This is a simple, educational location bias tool — fully open-source. It highlights relative value zones — not trade signals. Trading involves significant risk of loss. Use discretion and proper risk management.
Feedback welcome — especially suggestions for adding PD open or 50% retracement lines!
This open-source overlay indicator is a lightweight visual screener that shows where current price is located relative to the **previous day's range** (PD high/low/midpoint), helping traders quickly identify:
- Discount zones (below 25% of PD range → potential buy bias)
- Premium zones (above 75% of PD range → potential sell bias)
- Equilibrium / neutral (near midpoint → balanced / choppy)
Core Concept
Many intraday traders use the previous day's range as a reference framework:
- Price below the midpoint (especially in the lower 25%) is considered **discount** → undervalued relative to yesterday → higher probability of mean-reversion buys or continuation if momentum builds
- Price above the midpoint (especially in the upper 25%) is considered **premium** → overvalued → higher probability of mean-reversion sells or fading
- Near the midpoint → equilibrium → often choppy or awaiting directional catalyst
This script adds a **NY session filter** (default 08:30–16:00 NY time) so the PD range calculation only includes bars during active New York hours — useful for avoiding thin Asian-range noise and focusing on high-liquidity period behavior.
Why this is useful
- Provides instant visual context for bias without cluttering the chart
- Helps filter trades: e.g., look for longs in discount + bullish structure, shorts in premium + bearish structure
- Session filter makes it particularly effective for NY/London overlap strategies (forex, indices, gold, futures)
How It Works
1. Tracks daily high/low only during NY session (optional toggle)
- Resets at new day
- Updates only when inSession = true
2. Calculates:
- Midpoint = (PD High + PD Low) / 2
- PD Range = PD High – PD Low
- Discount threshold = PD Low + 25% of range
- Premium threshold = PD Low + 75% of range
3. Bias flags:
- Discount: close < midpoint → green triangle below bar
- Premium: close > midpoint → red triangle above bar
4. Optional last-bar label:
- "DISCOUNT ZONE" (green)
- "PREMIUM ZONE" (red)
- "EQUILIBRIUM" (gray)
Visual Output
- Green triangle below bar → price in discount (buy bias area)
- Red triangle above bar → price in premium (sell bias area)
- Last-bar label (toggleable) showing current location
How to Use
- Best on **5m–1h timeframes** for intraday trading (forex majors, indices, gold, futures)
- Recommended pairs: EURUSD, GBPUSD, XAUUSD, NAS100, ES1!, NQ1!
- Typical workflow:
1. Wait for price to reach discount zone + bullish price action / structure → consider longs
2. Wait for premium zone + bearish price action → consider shorts
3. Avoid entries near equilibrium unless strong breakout catalyst
- Combine with:
- Order blocks, FVGs, liquidity sweeps
- Higher-timeframe trend filter
- Session open/high/low
- Toggle "Use NY Session Only" off if you want full 24h range (e.g., crypto or Asian-focused pairs)
Inputs
- Use NY Session Only: true = only NY hours count toward PD range (recommended)
- NY Session: default "0830-1600" (adjust if broker timezone differs)
- Show Location Labels: toggle last-bar text label
Publishing Recommendation
- Publish with a clean chart (e.g., 15m–1h XAUUSD or EURUSD during NY session)
- Show a period where price moves from discount → equilibrium → premium (triangles visible)
- No extra indicators/drawings needed
This is a simple, educational location bias tool — fully open-source. It highlights relative value zones — not trade signals. Trading involves significant risk of loss. Use discretion and proper risk management.
Feedback welcome — especially suggestions for adding PD open or 50% retracement lines!
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.