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
121 lines of Pine Script v4 from TPCharts-Daily-Opens.pine, published under GPL-3.0. Keep the author's credit and licence lines when you reuse it.
TPCharts-Daily-Opens.pine
//@version=4
study(title="TPCharts Daily Opens", overlay=true)
isNYOpenShown = input(title="Show NY Open?", type=input.bool, defval=true)
isNYOpenPriceShown = input(title="Show NY Open Price?", type=input.bool, defval=false)
isSTDOpenShown = input(title="Show Standard Open?", type=input.bool, defval=true)
isSTDOpenPriceShown = input(title="Show Standard Open Price?", type=input.bool, defval=false)
isTuEntryShown = input(title="Show Tu Entry?", type=input.bool, defval=true)
isTuEntryOpenPriceShown = input(title="Show Tu Entry Open Price?", type=input.bool, defval=false)
isMoEntryShown = input(title="Show Mo Entry?", type=input.bool, defval=true)
isMoEntryOpenPriceShown = input(title="Show Mo Entry Open Price?", type=input.bool, defval=false)
stdDayOpenTime = security(syminfo.tickerid, "D", time, lookahead=barmerge.lookahead_on)
stdDayOpenPrice = security(syminfo.tickerid, "D", open)
// Get NY open price
nyOpenTime = timestamp(year(timenow), month(timenow), dayofmonth(timenow), 0, 0)
float l = na
if time >= nyOpenTime and na(l[1])
l := open
else
l := l[1]
openPriceNY = l[0]
// Get TU entry price
float tuEntry = na
int tuEntryTimestamp = timestamp(year(timenow), month(timenow), dayofmonth(timenow) - dayofweek(timenow) + dayofweek.tuesday, 4, 0)
if dayofweek(timenow) > dayofweek.monday
if time >= tuEntryTimestamp and na(tuEntry[1])
tuEntry := open
else
tuEntry := tuEntry[1]
openPriceTuEntry = tuEntry[0]
// Get Mo entry price
float moEntry = na
int moEntryTimestamp = timestamp(year(timenow), month(timenow), dayofmonth(timenow) - dayofweek(timenow) + dayofweek.monday, 4, 0)
if dayofweek(timenow) > dayofweek.sunday
if time >= moEntryTimestamp and na(moEntry[1])
moEntry := open
else
moEntry := moEntry[1]
openPriceMoEntry = moEntry[0]
isCurrentDay = security(syminfo.tickerid, "D", barstate.islast)
var labelNY = "DO (NY)"
var labelSTD = "DO (STD)"
var labelTuEntry = "Tu Entry"
var labelMoEntry = "Mo OSOK Entry"
line lineMo = na
label labelMo = na
line lineTu = na
label labelTu = na
line lineDOSTD = na
label labelDOSTD = na
line lineDONY = na
label labelDONY = na
if isCurrentDay and timeframe.isintraday
if isNYOpenShown and not dayofweek(timenow) == dayofweek.saturday or dayofweek(timenow) == dayofweek.sunday
lineDONY := line.new(x1=nyOpenTime, y1=openPriceNY, x2=nyOpenTime+86400000, y2=openPriceNY, extend=extend.none, color=color.black, xloc=xloc.bar_time)
line.delete(lineDONY[1])
if isNYOpenPriceShown
labelNY := labelNY + " [" + tostring(openPriceNY) + "]"
labelDONY := label.new(nyOpenTime+86400000, openPriceNY, labelNY, style=label.style_none, xloc=xloc.bar_time)
label.delete(labelDONY[1])
if isSTDOpenShown
lineDOSTD := line.new(x1=stdDayOpenTime, y1=stdDayOpenPrice, x2=stdDayOpenTime+86400000, y2=stdDayOpenPrice, extend=extend.none, color=color.black, xloc=xloc.bar_time)
line.delete(lineDOSTD[1])
if isSTDOpenPriceShown
labelSTD := labelSTD + " [" + tostring(stdDayOpenPrice) + "]"
labelDOSTD := label.new(stdDayOpenTime+86400000, stdDayOpenPrice, labelSTD, style=label.style_none, xloc=xloc.bar_time)
label.delete(labelDOSTD[1])
if isTuEntryShown
tuEntryOffset = (86400000/24*31)
lineTu := line.new(x1=tuEntryTimestamp, y1=openPriceTuEntry, x2=tuEntryTimestamp+tuEntryOffset, y2=openPriceTuEntry, extend=extend.none, color=color.black, xloc=xloc.bar_time)
line.delete(lineTu[1])
if isTuEntryOpenPriceShown
labelTuEntry := labelTuEntry + " [" + tostring(openPriceTuEntry) + "]"
label.new(tuEntryTimestamp+tuEntryOffset, openPriceTuEntry, labelTuEntry, style=label.style_none, xloc=xloc.bar_time)
label.delete(labelTu[1])
if isMoEntryShown
moEntryOffset = (86400000*4 + 86400000/24*13)
line.new(x1=moEntryTimestamp, y1=openPriceMoEntry, x2=moEntryTimestamp+moEntryOffset, y2=openPriceMoEntry, extend=extend.none, color=color.black, xloc=xloc.bar_time)
line.delete(lineMo[1])
if isMoEntryOpenPriceShown
labelMoEntry := labelMoEntry + " [" + tostring(openPriceMoEntry) + "]"
label.new(moEntryTimestamp+moEntryOffset, openPriceMoEntry, labelMoEntry, style=label.style_none, xloc=xloc.bar_time)
label.delete(labelMo[1])
alertcondition(crossover(high, openPriceNY) or crossunder(low, openPriceNY), title="NY D Open Cross", message="NY D Open Cross")
alertcondition(crossover(high, stdDayOpenPrice) or crossunder(low, stdDayOpenPrice), title="Standard D Open Cross", message="Standard D Open Cross")
alertcondition(crossover(high, openPriceTuEntry) or crossunder(low, openPriceTuEntry), title="Tu Entry Open Cross", message="Tu Entry Open Cross")
alertcondition(crossover(high, openPriceMoEntry) or crossunder(low, openPriceMoEntry), title="Mo Entry Open Cross", message="Mo Entry Open Cross")
// DEBUG
//label.new(bar_index, open, tostring(openPriceNY), style=label.style_none)
Overview
TPCharts Daily Opens plots a New York midnight open, the daily standard open, a Tuesday 04:00 entry, and a Monday 04:00 OSOK entry, each as a time-anchored line with an optional price label. Boolean inputs turn each level and its price text on or off. Lines appear only on intraday charts for the current day. Daily time is requested with lookahead enabled, so the standard-open placement can use future higher-timeframe data.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Show NY Open?
bool
true
isNYOpenShown
Show NY Open Price?
bool
false
isNYOpenPriceShown
Show Standard Open?
bool
true
isSTDOpenShown
Show Standard Open Price?
bool
false
isSTDOpenPriceShown
Show Tu Entry?
bool
true
isTuEntryShown
Show Tu Entry Open Price?
bool
false
isTuEntryOpenPriceShown
Show Mo Entry?
bool
true
isMoEntryShown
Show Mo Entry Open Price?
bool
false
isMoEntryOpenPriceShown
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 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 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
This overlay indicator plots option strike walls and an optional session VWAP on the price chart for SPY or ES. It spaces major strikes by the selected instrument, draws a set number of strikes on each side, and marks wall-trap and sweep events after a cooldow
This indicator plots reference levels and session markers directly on the price chart. It calculates and draws lines for the daily open, weekly open, monthly open, previous day OHLC, and previous week extremes, along with a selectable day-of-week range and ini