UK Dual-Session HighlighterOverview
This indicator is a specialized volatility-window tool designed for traders operating in UK Time (Europe/London). It specifically isolates the two highest-probability trading windows for the Nasdaq (NQ) and other US/European indices, while intentionally leaving the "Lunch Lull" period unhighlighted to help traders avoid low-liquidity "chop."
The Dual-Session Strategy
The script highlights two distinct phases of the trading day:
London Morning (09:15 – 12:00): Captures the core European institutional flow and the establishment of the morning trend.
The US Active Window (13:30 – 17:15): Covers the critical 13:30 US Economic Data releases, the 14:30 New York Open, and the high-volume London-NY Overlap.
Key Features for 2026
Timezone Locked: Hard-coded to Europe/London. You do not need to adjust your chart settings; the indicator stays accurate regardless of your local time.
Automatic DST Handling: Fully compatible with 2026 Daylight Saving transitions (GMT/BST). It automatically adjusts when the UK clocks change in March and October.
The "Lunch Lull" Filter: By leaving the 12:00–13:30 window blank, the indicator provides a visual "stop" signal during the period when London traders are at lunch and US pre-market volume is typically at its lowest.
Fully Customizable: Toggle sessions on/off and adjust colors, transparency, and specific start/end times via the Inputs menu.
Times
TimeFilterLibrary "TimeFilter"
provides utilities for dates and times
inSession(session, timezone, period)
Parameters:
session (simple string)
timezone (simple string)
period (simple string)
Returns: bool inSession Whether the current time is within the defined time session
inDateRange(startDate, endDate)
Parameters:
startDate (int)
endDate (int)
Returns: bool inRange Whether the current time is within the defined date range
isWeekDay(weekDay, timezone)
Parameters:
weekDay (int)
timezone (simple string)
Returns: bool isWeekDay Whether the provided day is the current day of the week
inWeek(useMon, useTue, useWed, useThu, useFri, useSat, useSun, timezone)
Parameters:
useMon (bool)
useTue (bool)
useWed (bool)
useThu (bool)
useFri (bool)
useSat (bool)
useSun (bool)
timezone (simple string)
Returns: bool inWeek Whether the current time is one of the defined days
filter(useRange, useSession, useWeek, inRange, inSession, inWeek)
Parameters:
useRange (bool)
useSession (bool)
useWeek (bool)
inRange (bool)
inSession (bool)
inWeek (bool)
Returns: bool filter Whether the filter matches or not
Time of Day and Day of Week Buying and Selling StrategyThis strategy allows you to back test longing or shorting or do nothing during time increments of 30 minutes for various days of the week. For example if you want to see if every Saturday if Bitcoin dropped in value from 1600-7000 UTC, this script will allow you to test that.
Make sure you are in the 30 minute time frame while viewing the performance and trade history.
How To Set Backtest Time Ranges
Example how to set the time range window to be backtested for both entries and exits. Additional examples are also included showing how to set the date range and toggle plot visibility.
By incorporating this code with your own strategy's logic, it will allow you to backtest various time windows.
Much gratitude to @LucF and @a.tesla2018 for help with including ':1234567' for time ranges on weekends. Thank you both!
NOTICE: This is an example script and not meant to be used as an actual strategy. By using this script or any portion thereof, you acknowledge that you have read and understood that this is for research purposes only and I am not responsible for any financial losses you may incur by using this script!



