1Copy the scriptPress Copy script above, or the copy button on the code below.
2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
3Paste over the templateCreate a new indicator, select all of the template text and paste. Press Save and give it a name.
4Add it to the chartPress Add to chart, then adjust the settings with the gear icon next to its name.
Source Code
355 lines of Pine Script v5 from src/MarketSessions.pine, published under MPL-2.0 (file header). Keep the author's credit and licence lines when you reuse it.
XT Market Sessions Private visualizes daily weekly and monthly opens, New York Midnight as the institutional day start, previous daily high and low, plus colored session boxes for Asia Frankfurt and London. Users toggle visibility of opens and sessions, adjust line widths, and choose display styles such as filled boxes or borders. All elements draw directly on the price chart. Main settings control which sessions appear and their colors. It uses lookahead for open calculations.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Opens
bool
true
Show_Opens
Only Last Opens
bool
true
Only_Last_Opens
Sessions
bool
true
Show_Sessions
Only Last Sessions
bool
false
Only_Last_Sessions
Days Lines
bool
false
Show_Days_VLines
Line Width
int
1
ULine_Width
Daily Open
bool
true
Show_Daily_Open
Col_Daily_Open
color
color.rgb(0, 0, 0, 0)
Col_Daily_Open
Weekly Open
bool
true
Show_Weekly_Open
Col_Weekly_Open
color
color.rgb(0, 0, 0, 0)
Col_Weekly_Open
Monthly Open
bool
true
Show_Monthly_Open
Col_Monthly_Open
color
color.rgb(0, 0, 0, 0)
Col_Monthly_Open
Show all 39 settings
Setting
Type
Default
Variable
New York Midnight
bool
true
Show_NewYork_Midnight
Col_NewYork_Midnight
color
color.rgb(0, 0, 0, 0)
Col_NewYork_Midnight
Previous Daily High
bool
true
Show_Previous_Daily_High
Col_Previous_Daily_High
color
color.rgb(0, 0, 0, 0)
Col_Previous_Daily_High
Previous Daily Low
bool
true
Show_Previous_Daily_Low
Col_Previous_Daily_Low
color
color.rgb(0, 0, 0, 0)
Col_Previous_Daily_Low
Session Line Width
int
0
SLine_Width
ASIA
bool
true
Show_Asia
Asia_Display
string
Filled Box
Asia_Display
Title
color
color.rgb(0, 0, 0, 0)
Title_Col_Asia
Background
color
color.rgb(230, 184, 0, 90)
Background_Col_Asia
Frankfurt
bool
true
Show_Frankfurt
Frankfurt_Display
string
Filled Box
Frankfurt_Display
Title
color
color.rgb(0, 0, 0, 0)
Title_Col_Frankfurt
Background
color
color.rgb(204, 51, 0, 80)
Background_Col_Frankfurt
London
bool
true
Show_London
London_Display
string
Filled Box
London_Display
Title
color
color.rgb(0, 0, 0, 0)
Title_Col_London
Background
color
color.rgb(128, 170, 255, 90)
Background_Col_London
NEW YORK
bool
true
Show_NewYork
NewYork_Display
string
Filled Box
NewYork_Display
Title
color
color.rgb(0, 0, 0, 0)
Title_Col_NewYork
Background
color
color.rgb(179,102,255, 90)
Background_Col_NewYork
CBDR
bool
true
Show_CBDR
CBDR_Display
string
Filled Box
CBDR_Display
Title
color
color.rgb(0, 0, 0, 0)
Title_Col_CBDR
Background
color
color.rgb(255,102,102, 90)
Background_Col_CBDR
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.
This indicator counts down to a fixed Litecoin halving timestamp in August 2019, using Greenwich Mean Time. It subtracts the current time from that stamp and formats the remaining days, hours, minutes, and seconds. The day, hour, and minute of the target are u
This indicator builds Market Profile Time Price Opportunity (TPO) structures across defined session timeframes directly on the main price chart. It visualizes the Point of Control (POC) and Value Area boundaries using dynamic box drawings. An integrated multi-
This indicator identifies and plots key options expiration dates on the price chart. It calculates monthly OpEx (the third Friday of each month), quarterly OpEx (March, June, September, December), and corresponding VIX expiration dates, drawing vertical lines
This indicator plots auto trade signals for E-mini S&P 500 futures on the price chart. It computes an EMA200 filter along with day ETH RTH session levels and percentage-based entry zones. Signals trigger CALL or PUT cases when price crosses defined thresholds
This indicator plots reference levels for previous daily high and low prices directly on the price chart. It requests daily timeframe data using the security function and plots the offset values as continuous lines, displaying resistance in red and support in
The Golden Bullet Strategy is an overlay signal indicator based on Smart Money Concepts and time-based liquidity models. It identifies liquidity sweeps of a designated reference session range during a specified hunt window. It then confirms Market Structure Sh
Indicatorv6SMC / ICT / price actionSessions & time