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!
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.