SNP420:Bank_Market_Sessions(BMS)_v2.0

Bank Market Sessions (BMS)
What it does
BMS marks the low of each major trading session (Tokyo, London and New York, with Sydney as an optional fourth session) with a single dashed line on the price chart. The name of the session is printed in the middle of its line. The goal is to keep the chart clean: instead of colored boxes or background shading, you see only the price level where each session found its low, together with the time span of that session. If you prefer session highs, one setting switches all lines from the low to the high.
How it works
For every enabled session, the script checks on each bar whether the bar falls inside the session window defined by its time and time zone. When the first bar of a session appears, a line is created that starts at that bar and ends at the scheduled end of the session. While the session is open, the line moves down every time price makes a new low within the session (or up to every new high if the High mode is selected), so the line always shows the lowest price reached so far. When the session ends, the line stays at its final value and becomes a reference level for the rest of the day.
Each session has its own time zone (Asia/Tokyo, Europe/London, America/New_York and Australia/Sydney by default). Session times are entered in the local time of each market, so they follow daylight saving time changes automatically instead of staying fixed in GMT. Default times are Tokyo 09:00-18:00, London 08:00-17:00, New York 08:00-17:00 and Sydney 07:00-16:00.
An optional setting, "Extend the last finished level until price breaks it", keeps the level of the most recent finished session extending to the right until price trades through it. This shows at a glance which session lows are still intact and which have already been taken out.
The script can also send alerts when a session starts, when it ends, and when price breaks the low (or high) of the last finished session.
How to use it
Add the script to an intraday chart, for example 5 minutes to 1 hour, of a forex pair or any other symbol that trades across the sessions. Adjust the session names, times, time zones and colors in the settings if your definition of the sessions differs from the defaults. The lines can be used as reference levels: for example, to see whether London has taken out the Tokyo low, or whether New York is holding above the London low. To receive alerts, create an alert on the script and choose "Any alert() function call".
Settings
Session 1-4: on/off, name, color, session time and time zone.
Line level: Low or High.
Line style, line width, name size and whether the name is shown.
Sessions kept per market: how many past sessions stay on the chart.
Extend the last finished level until price breaks it.
Originality
The script is written from scratch. Its minimalist session-line look was inspired by the open-source script "FX Market Sessions" by boitoki, and credit for that visual idea goes to its author. No code from that script is used. What BMS adds is a single-level view of each session, per-market time zones that follow daylight saving time automatically, the option to extend the last session level until it is broken, and alerts for breaks of that level.
Limitations
The script works only on intraday timeframes and draws nothing on daily and higher timeframes.
The low or high of the session that is currently open changes in real time until the session ends. Only finished sessions have a final level.
The right end of each line is drawn at the scheduled session end in advance, so during an open session the line extends into the future.
Session detection depends on the bars of your chart. On higher intraday timeframes, such as 4 hours, a session can start or end in the middle of a bar, and the whole bar is then counted as part of the session, so the level and timing are approximate. Lower timeframes give more precise results.
If the chart history starts in the middle of a session, the first session on the chart is incomplete.
Levels are based on the price data of the chart's symbol and broker feed, so different feeds can show slightly different session lows and highs.
The extend option and the break alert follow only the most recent finished session of each market. Older levels are not tracked.
A break is detected when the bar's low (or high) trades beyond the level, so a wick through the level counts as a break.
For a session that crosses midnight, the scheduled end can be off by one hour on the day of a daylight saving time change.
The script shows historical price levels only. It does not predict price movement and is not a trading signal on its own.
What it does
BMS marks the low of each major trading session (Tokyo, London and New York, with Sydney as an optional fourth session) with a single dashed line on the price chart. The name of the session is printed in the middle of its line. The goal is to keep the chart clean: instead of colored boxes or background shading, you see only the price level where each session found its low, together with the time span of that session. If you prefer session highs, one setting switches all lines from the low to the high.
How it works
For every enabled session, the script checks on each bar whether the bar falls inside the session window defined by its time and time zone. When the first bar of a session appears, a line is created that starts at that bar and ends at the scheduled end of the session. While the session is open, the line moves down every time price makes a new low within the session (or up to every new high if the High mode is selected), so the line always shows the lowest price reached so far. When the session ends, the line stays at its final value and becomes a reference level for the rest of the day.
Each session has its own time zone (Asia/Tokyo, Europe/London, America/New_York and Australia/Sydney by default). Session times are entered in the local time of each market, so they follow daylight saving time changes automatically instead of staying fixed in GMT. Default times are Tokyo 09:00-18:00, London 08:00-17:00, New York 08:00-17:00 and Sydney 07:00-16:00.
An optional setting, "Extend the last finished level until price breaks it", keeps the level of the most recent finished session extending to the right until price trades through it. This shows at a glance which session lows are still intact and which have already been taken out.
The script can also send alerts when a session starts, when it ends, and when price breaks the low (or high) of the last finished session.
How to use it
Add the script to an intraday chart, for example 5 minutes to 1 hour, of a forex pair or any other symbol that trades across the sessions. Adjust the session names, times, time zones and colors in the settings if your definition of the sessions differs from the defaults. The lines can be used as reference levels: for example, to see whether London has taken out the Tokyo low, or whether New York is holding above the London low. To receive alerts, create an alert on the script and choose "Any alert() function call".
Settings
Session 1-4: on/off, name, color, session time and time zone.
Line level: Low or High.
Line style, line width, name size and whether the name is shown.
Sessions kept per market: how many past sessions stay on the chart.
Extend the last finished level until price breaks it.
Originality
The script is written from scratch. Its minimalist session-line look was inspired by the open-source script "FX Market Sessions" by boitoki, and credit for that visual idea goes to its author. No code from that script is used. What BMS adds is a single-level view of each session, per-market time zones that follow daylight saving time automatically, the option to extend the last session level until it is broken, and alerts for breaks of that level.
Limitations
The script works only on intraday timeframes and draws nothing on daily and higher timeframes.
The low or high of the session that is currently open changes in real time until the session ends. Only finished sessions have a final level.
The right end of each line is drawn at the scheduled session end in advance, so during an open session the line extends into the future.
Session detection depends on the bars of your chart. On higher intraday timeframes, such as 4 hours, a session can start or end in the middle of a bar, and the whole bar is then counted as part of the session, so the level and timing are approximate. Lower timeframes give more precise results.
If the chart history starts in the middle of a session, the first session on the chart is incomplete.
Levels are based on the price data of the chart's symbol and broker feed, so different feeds can show slightly different session lows and highs.
The extend option and the break alert follow only the most recent finished session of each market. Older levels are not tracked.
A break is detected when the bar's low (or high) trades beyond the level, so a wick through the level counts as a break.
For a session that crosses midnight, the scheduled end can be off by one hour on the day of a daylight saving time change.
The script shows historical price levels only. It does not predict price movement and is not a trading signal on its own.
BOOST ME
6 in investing and 5 in traiding
Czechia
6 in investing and 5 in traiding
Czechia
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.
BOOST ME
6 in investing and 5 in traiding
Czechia
6 in investing and 5 in traiding
Czechia
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.