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
127 lines of Pine Script v5 from code/CC - Pt3 - Sessions.txt, published under MIT. Keep the author's credit and licence lines when you reuse it.
CC - Pt3 - Sessions.txt
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// Code from Kg
// 2022-03-14: Modified by ClimberMel
//@version=5
indicator('Chart Champions Sessions', shorttitle='CC Sessions', overlay=true)
////////////////////////////////////////Input IGOR Sessions - Start
///Asia End of Session Start
AsiaInput = input.string('0000-0600', title='Asia', group='IGOR Sessions - Bottom Color Banner', inline='1')
AsiaSession = time('1', AsiaInput + ':1234567')
plotshape(AsiaSession, title='IGOR Asia', style=shape.square, location=location.bottom, color=color.new(color.purple, 0), size=size.tiny)
///Asia End of Session Finish
///London End of Session Start
LonInput = input.string('0600-1200', title='London', group='IGOR Sessions - Bottom Color Banner', inline='1')
LonSession = time('1', LonInput + ':1234567')
plotshape(LonSession, title='IGOR London', style=shape.square, location=location.bottom, color=color.new(color.yellow, 0), size=size.tiny)
///London End of Session Finish
///New York End of Session Start
NYInput = input.string('1200-2000', title='New York', group='IGOR Sessions - Bottom Color Banner', inline='2')
NYSession = time('1', NYInput + ':1234567')
plotshape(NYSession, title='IGOR New York', style=shape.square, location=location.bottom, color=color.new(color.blue, 0), size=size.tiny)
///New York End of Session Finish
///Close
CloseInput = input.string('2000-0000', title='Close', group='IGOR Sessions - Bottom Color Banner', inline='2')
CloseSession = time('1', CloseInput + ':1234567')
plotshape(CloseSession, title='IGOR Close', style=shape.square, location=location.bottom, color=color.new(color.red, 0), size=size.tiny)
////////////////////////////////////////Input IGOR Sessions - Finish
////////////////Pre Market and Market Open Information
showDOW = input.bool(true, title='Show Chart Text and Top Banner Color', group='Pre + Market Openings - Top Color Banner', tooltip='P = PreMarket, LSE = London Stock Exchange, NYSE = New York Stock Exchange. ASX = Australian Stock Exchange')
inputMaxInterval = input(30, title='Hides sessions above specified time')
loadIndicator = timeframe.isminutes and timeframe.multiplier <= inputMaxInterval
PreASXExact1 = input.string('2200-2201', title='Pre ASX Exact', group='ASX - Pre and Open Markets', inline='1')
PreASXExact = time(timeframe.period, PreASXExact1 + ':1234567') //Exact PreMarket New York
PreASX1 = input.string('2200-0000', title='Pre ASX Period', group='ASX - Pre and Open Markets', inline='1')
PreASX = time(timeframe.period, PreASX1 + ':1234567') //Market Open New York Period - configured to not overlap other markets
ASXExactOpen1 = input.string('0000-0001', title='ASX Exact Open', group='ASX - Pre and Open Markets', inline='2')
ASXExactOpen = time(timeframe.period, ASXExactOpen1 + ':1234567') //Exact Open ASX
//ASXOpen = time(timeframe.period, "1430-2100:1234567") //Market Open ASX Period - configured to not overlap other markets ////Blanked due to overlapping
ASXExactClose1 = input.string('0600-0601', title='ASX Exact Close', group='ASX - Pre and Open Markets', inline='2')
ASXExactClose = time(timeframe.period, ASXExactClose1 + ':1234567') //Exact Close ASX
AsiaExactOpen1 = input.string('0000-0001', title='Asia Exact Open', group='Asia Open Market', inline='1')
AsiaExactOpen = time(timeframe.period, AsiaExactOpen1 + ':1234567') //Exact Open Asia
MorningAsia1 = input.string('0000-0230', title='Asia Morning Open Period', group='Asia Open Market', inline='1')
MorningAsia = time(timeframe.period, MorningAsia1 + ':1234567') //Exact Morning Open Asia
AfternoonAsia1 = input.string('0330-0400', title='Asia Afternoon Open Period', group='Asia Open Market', inline='2')
AfternoonAsia = time(timeframe.period, AfternoonAsia1 + ':1234567') //Exact Afternoon Open Asia
AsiaExactClose1 = input.string('0600-0601', title='Asia Exat Close', group='Asia Open Market', inline='2')
AsiaExactClose = time(timeframe.period, AsiaExactClose1 + ':1234567') //Exact Close Asia
PreLondonExact1 = input.string('0400-0401', title='Pre LSE Exact', group='London - Pre and Open Markets', inline='1')
PreLondonExact = time(timeframe.period, PreLondonExact1 + ':1234567') //Exact PreMarket London
PreLondon1 = input.string('0400-0650', title='Pre LSE Period', group='London - Pre and Open Markets', inline='1')
PreLondon = time(timeframe.period, PreLondon1 + ':1234567') //Pre Market London Period
LondonExactOpen1 = input.string('0700-0701', title='LSE Open Exact', group='London - Pre and Open Markets', inline='2')
LondonExactOpen = time(timeframe.period, LondonExactOpen1 + ':1234567') //Exact Open London
LondonOpen1 = input.string('0700-1030', title='LSE Open Period', group='London - Pre and Open Markets', inline='2')
LondonOpen = time(timeframe.period, LondonOpen1 + ':1234567') //Market Open London Period - configured to not overlap other markets
LondonExactClose1 = input.string('1530-1531', title='LSE Exact Close', group='London - Pre and Open Markets')
LondonExactClose = time(timeframe.period, LondonExactClose1 + ':1234567') //Exact Close London
//LondonClose1 = input("1530-1700", title="LSE Close", group = "London - Pre and Open Markets")
//LondonClose = time(timeframe.period, LondonClose1+":1234567") //
PreNYExact1 = input.string('1030-1031', title='Pre NY Exact', group='New York - Pre and Open Markets', inline='1')
PreNYExact = time(timeframe.period, PreNYExact1 + ':1234567') //Exact PreMarket New York
PreNY1 = input.string('1030-1330', title='Pre NY Period', group='New York - Pre and Open Markets', inline='1')
PreNY = time(timeframe.period, PreNY1 + ':1234567') //PreMarket New York
NYExactOpen1 = input.string('1330-1331', title='NY Exact Open', group='New York - Pre and Open Markets', inline='2')
NYExactOpen = time(timeframe.period, NYExactOpen1 + ':1234567') //Exact Open New York
NYOpen1 = input.string('1330-2000', title='NY Open Period', group='New York - Pre and Open Markets', inline='2')
NYOpen = time(timeframe.period, NYOpen1 + ':1234567') //Market Open New York Period - configured to not overlap other markets
NYExactClose1 = input.string('2000-2001', title='NY Exact Close', group='New York - Pre and Open Markets', inline='3')
NYExactClose = time(timeframe.period, NYExactClose1 + ':1234567') //Exact Close New York
plotshape(loadIndicator and showDOW and not na(PreNY), title='Pre NYSE', style=shape.square, location=location.top, color=color.new(#283A90, 0), size=size.tiny)
plotshape(loadIndicator and showDOW and not na(NYOpen), title='NYSE Open', style=shape.square, location=location.top, color=color.new(#00008B, 0), size=size.tiny)
plotshape(loadIndicator and showDOW and not na(PreLondon), title='Pre LSE', style=shape.square, location=location.top, color=color.new(#CCCC00, 0), size=size.tiny)
plotshape(loadIndicator and showDOW and not na(LondonOpen), title='LSE Open', style=shape.square, location=location.top, color=color.new(#FFCC11, 0), size=size.tiny)
plotshape(loadIndicator and showDOW and not na(MorningAsia), title='Morning Asia', style=shape.square, location=location.top, color=color.new(#AA00FF, 0), size=size.tiny)
plotshape(loadIndicator and showDOW and not na(AfternoonAsia), title='Afternoon Asia', style=shape.square, location=location.top, color=color.new(#AA00FF, 0), size=size.tiny)
plotshape(loadIndicator and showDOW and not na(PreASX), title='ASX Open', style=shape.square, location=location.top, color=color.new(color.gray, 0), size=size.tiny)
plotshape(loadIndicator and showDOW and not na(NYExactOpen), title='NYSE Exact Opening', style=shape.square, location=location.top, color=color.new(color.green, 0), size=size.tiny, text='NYSE Open', textcolor=color.new(color.blue, 0))
plotshape(loadIndicator and showDOW and not na(NYExactClose), title='NYSE Exact Closing', style=shape.square, location=location.top, color=color.new(color.red, 0), size=size.tiny, text='NYSE Close', textcolor=color.new(color.blue, 0))
plotshape(loadIndicator and showDOW and not na(LondonExactOpen), title='LSE Exact Opening', style=shape.square, location=location.top, color=color.new(color.green, 0), size=size.tiny, text='LSE Open', textcolor=color.new(#FFCC11, 0))
plotshape(loadIndicator and showDOW and not na(LondonExactClose), title='LSE Exact Closing', style=shape.square, location=location.top, color=color.new(color.red, 0), size=size.tiny, text='LSE Close', textcolor=color.new(#FFCC11, 0))
plotshape(loadIndicator and showDOW and not na(AsiaExactOpen), title='Asia Exact Opening', style=shape.square, location=location.top, color=color.new(color.green, 0), size=size.tiny, text='Asia Open', textcolor=color.new(#AA00FF, 0))
plotshape(loadIndicator and showDOW and not na(AsiaExactClose), title='Asia Exact Closing', style=shape.square, location=location.top, color=color.new(color.red, 0), size=size.tiny, text='Asia Close', textcolor=color.new(#AA00FF, 0))
plotshape(loadIndicator and showDOW and not na(ASXExactOpen), title='ASX Exact Opening', style=shape.square, location=location.top, color=color.new(color.green, 0), size=size.tiny, text=' . \n ASX Open', textcolor=color.new(color.gray, 0))
plotshape(loadIndicator and showDOW and not na(ASXExactClose), title='Asia Exact Closing', style=shape.square, location=location.top, color=color.new(color.red, 0), size=size.tiny, text=' . \n ASX Close', textcolor=color.new(color.gray, 0))
plotshape(loadIndicator and showDOW and not na(PreNYExact), title='Pre NYSE Exact Opening', style=shape.square, location=location.top, color=color.new(color.green, 0), size=size.tiny, text='P-NYSE', textcolor=color.new(color.blue, 0))
plotshape(loadIndicator and showDOW and not na(PreASXExact), title='Sydney Exact Opening', style=shape.square, location=location.top, color=color.new(color.green, 0), size=size.tiny, text='Pre ASX', textcolor=color.new(color.gray, 0))
plotshape(loadIndicator and showDOW and not na(PreLondonExact), title='Pre LSE Exact Opening', style=shape.square, location=location.top, color=color.new(color.green, 0), size=size.tiny, text='P-LSE', textcolor=color.new(#FFCC11, 0))
Overview
Chart Champions Sessions covers Asia, London, New York, close, and specific ASX pre-market and open periods. A top banner dynamically changes color based on the current session when enabled. Multiple input settings allow customization of each session time range, with an option to hide sessions longer than a specified interval. The indicator uses time functions to detect exact session periods and draws markers at the bottom of the chart.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Asia
string
0000-0600
AsiaInput
London
string
0600-1200
LonInput
New York
string
1200-2000
NYInput
Close
string
2000-0000
CloseInput
Show Chart Text and Top Banner Color
bool
true
showDOW
Hides sessions above specified time
int
30
inputMaxInterval
Pre ASX Exact
string
2200-2201
PreASXExact1
Pre ASX Period
string
2200-0000
PreASX1
ASX Exact Open
string
0000-0001
ASXExactOpen1
ASX Exact Close
string
0600-0601
ASXExactClose1
Asia Exact Open
string
0000-0001
AsiaExactOpen1
Asia Morning Open Period
string
0000-0230
MorningAsia1
Show all 24 settings
Setting
Type
Default
Variable
Asia Afternoon Open Period
string
0330-0400
AfternoonAsia1
Asia Exat Close
string
0600-0601
AsiaExactClose1
Pre LSE Exact
string
0400-0401
PreLondonExact1
Pre LSE Period
string
0400-0650
PreLondon1
LSE Open Exact
string
0700-0701
LondonExactOpen1
LSE Open Period
string
0700-1030
LondonOpen1
LSE Exact Close
string
1530-1531
LondonExactClose1
Pre NY Exact
string
1030-1031
PreNYExact1
Pre NY Period
string
1030-1330
PreNY1
NY Exact Open
string
1330-1331
NYExactOpen1
NY Open Period
string
1330-2000
NYOpen1
NY Exact Close
string
2000-2001
NYExactClose1
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
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
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