OPEN-SOURCE SCRIPT

QuantumPips Session Trend Structure

67
QuantumPips Session Trend Structure is an indicator built to help you read session structure and spot higher-quality breakout → retest opportunities when trend and momentum conditions agree.

It does three main things:
  1. Maps sessions (Asia / London / New York) with live High/Low boxes
  2. Adds trend direction using EMA bias (50/200 + optional slope)
  3. Prints BUY/SELL labels only after a clean breakout + retest sequence, optionally filtered by volume, range expansion (ATR), and candle body strength


Educational tool only — not financial advice. Always manage risk.

What you’ll see on the chart
Session boxes (structure)


The indicator draws a box for each session and updates the session High/Low while the session is active.
Default settings (Timezone Europe/London):

  • Asia: 00:00–09:00
    *London: 08:00–17:00
    *New York: 13:00–22:00

Optional: vertical dotted lines at session starts.

EMA bias (direction)

Two EMAs are plotted:

  • EMA Fast (50)
    *EMA Slow (200)


Bias is:

  • Bullish: EMA50 above EMA200 (and optionally EMA50 rising)
  • Bearish: EMA50 below EMA200 (and optionally EMA50 falling)


This is designed to reduce counter-trend signals.

The core idea (simple)

Each major session often reacts to the previous session’s range.

This script uses that concept by selecting a reference range:

  • During London, reference = Asia High/Low
  • During New York, reference = London High/Low
  • During Asia (optional), reference = New York High/Low

The panel shows Ref Range, which is just:
Ref Range = Reference High − Reference Low


Signal logic: Breakout → Retest (with confluence)

A signal is only considered when you are inside a session you enabled (Asia/London/NY toggles).

BUY (Long)

  1. Trend bias is Bullish
  2. Price closes above the reference High (breakout)
  3. Price returns to retest near the broken High (ATR tolerance)
  4. Optional: retest candle must close back up (confirm-close)
  5. Optional confirmations pass (volume / expansion / body)


SELL (Short)

  1. Trend bias is Bearish
  2. Price closes below the reference Low (breakout)
  3. Price returns to retest near the broken Low (ATR tolerance)
  4. Optional: retest candle must close back down (confirm-close)
  5. Optional confirmations pass (volume / expansion / body)


This approach is meant to avoid “first-touch” entries and focus on structured moves.

Filters (optional, but useful)
Volume Spike Filter


Requires elevated participation:
volume ≥ SMA(volume) × multiplier
(Volume varies by market/data feed; use discretion on symbols where volume is not meaningful.)

Range Expansion Filter (ATR)

Requires a candle with enough “energy” to avoid weak breakouts:
(high − low) ≥ ATR × range multiplier

Strong Body Filter (optional)

Filters wick-heavy candles around key levels:
body % of candle range ≥ threshold

Side Panel (Top Right) — how to read it
Session

Shows the active session: Asia / London / New York / Off

EMA Bias

Shows: Bullish / Bearish / Neutral

Ref Range

Shows the size of the reference session range being used for the current session:

  • London uses Asia range
  • NY uses London range
  • Asia (optional) uses NY range


Volume

Shows status of the volume filter:

  • High = passes
  • Normal = fails
  • Off = filter disabled


Expansion

Shows status of the ATR expansion filter:
  • Yes = passes
  • No = fails
  • Off = filter disabled


Body

Shows status of the strong-body filter:
  • Yes = passes
  • No = fails
  • Off = filter disabled


Confluence Example
لقطة

Recommended starting settings

If you want fewer, higher-quality setups:
  • Enable London + New York
  • Keep EMA bias ON
  • Volume filter ON (1.2–1.5×)
  • Expansion ON (0.8–1.0× ATR)
  • Body filter optional (0.55–0.70)
  • Confirm-close ON


If you want more signals:

  • Lower volume multiplier (1.1–1.2×)
  • Lower expansion (0.6–0.8× ATR)
  • Body filter OFF


Best timeframes (TF) to use

Best overall: 5m, 15m, 30m
Best Pairs for Sessions: EURUSD, GBPUSD, GBPJPY, USDJPY, XAUUSD

إخلاء المسؤولية

لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.