OPEN-SOURCE SCRIPT

Market Sessions

This script was inspired by Simple Market Session by tradergav.
I have improved and optimized it, making it compatible with Pine Script v6 and adding new features/enhancements.
All credit to the original author for the initial idea.

1. Purpose
The script highlights four major market sessions on your TradingView chart — Sydney, Tokyo, London, and New York. Each session is displayed as a colored background during its active hours.

2. How it Works
Default Times in UTC+1
  • The script starts with fixed session times (in UTC+1 time).

Adjusting to Your Timezone
  • You tell the script your own UTC offset. The script then shifts each session’s start/end time so they appear correctly in your local time on the chart.
  • **For example, if you set your timezone to UTC+3, the script calculates the difference from its default base (UTC+1), which is +2 hours, and shifts all the session times by that amount.

In simple terms:
You pick your local timezone offset, and the indicator automatically shows when each of the four major sessions is open in your local time on your TradingView chart. That’s it!

Clause de non-responsabilité