jayy

VWAP, Yesterday Hi/Low V2

60 2 7
Very very slight change to this script from original.
The original stopped functioning correctly when Tradingview updated the way sessions were handled.
Remove from Favorite Scripts Add to Favorite Scripts
// http://tradingwithleafwest.net/

// very very slight change to this script from original.  
//The original stopped functioning correctly when Tradingview updated the way sessions were handled. 

study(title="VWAP, Yesterday Hi/Low V2", shorttitle="VWAP last Hi/Low Leaf_West style", overlay = true)
width = input(2, minval=1)
Highhier  = security(tickerid,"D", high[1])
Lowhier   = security(tickerid,"D", low[1])
Closehier = security(tickerid,"D", close[1])
Opentoday = security(tickerid,"D", open[0])

a=time ("1", "931-2000")?fuchsia:na
plot(vwap,color=a,style=line, linewidth=2)

// Plot high and low and close  from yesterday 
b=time ("1", "931-2000")?navy:na
plot(Highhier,color=b,style=line, linewidth=2)
c=time ("1", "931-2000")?purple:na
plot(Lowhier,color=c,style=line, linewidth=2)
d=time ("1", "931-2000")?yellow:na
plot(Closehier,color=d,style=line, linewidth=2)

//Plot open from today
e=time ("1", "931-2000")?red:na
plot(Opentoday,color=e, style=linebr, linewidth=2) 

//plot  inside bar

ibh= (high < high[1] and low > low[1])?high[1]:(high >= ibh[1] or low <= ibl[1])?0:ibh[1]
ibl= (high < high[1] and low > low[1])?low[1]:(high >= ibh[1] or low <= ibl[1])?0:ibl[1]
plotchar((high < high[1] and low > low[1]) ? close:na, title='Inside bar',char='>', location=location.abovebar, color=teal, transp=0, offset=0)
plotshape((high < high[1] and low > low[1]) ? close : na, style=shape.triangleup, location=location.belowbar, color=maroon, text=".", offset=0)

barh=((high[0] < nz(ibh[1]) and low[0] > ibl[1]))?ibh[1]:0 
barl=((high[0] < ibh[1] and low[0] > ibl[1]))?ibl[1]:0 

plotchar((barh>0 and  barl>0) ? close : na, title='Inside bar 2 bars back',char='>', location=location.abovebar, color=orange, transp=0, offset=0)
Jayy
jayy PRO
a year ago
This code is updated to eliminate the vertical black lines at 9:30:
snapshot




//by Jayy
// plots VWAP yesterdays high, low and close, today's open.
// Also signals inside bars (high is less than or equal to the previous
// bar's high and the low is greater than or equal to
// the previous low) the : true inside bars have a maroon triangle below the bar as well as a ">" above the bar.
// If subsequest bars are inside the last bar before the last true inside bar they also are marked with an ">"
// This is probably a slight variation from the way Leaf_West plots the inside bars.
// It appears that he marks all bars that are inside the original bar until one a bar has a high or low
// outside the original bar. But I would need to see an example on his charts.
// I use this small group of indicators when following Leaf_West's analysis.
// http://tradingwithleafwest.net/



study(title="VWAP, Yesterday Hi/Low", shorttitle="VWAP last Hi/Low Leaf_West style", overlay = true)
width = input(2, minval=1)
Highhier = security(tickerid,"D", high)
Lowhier = security(tickerid,"D", low)
Closehier = security(tickerid,"D", close)
Opentoday = security(tickerid,"D", open)

a=time ("1", "1331-2000")?fuchsia:na
plot(vwap,color=a,style=line, linewidth=2)

// Plot high and low and close from yesterday
b=time ("1", "1331-2000")?navy:na
plot(Highhier,color=b,style=line, linewidth=2)
c=time ("1", "1331-2000")?purple:na
plot(Lowhier,color=c,style=line, linewidth=2)
d=time ("1", "1331-2000")?yellow:na
plot(Closehier,color=d,style=line, linewidth=2)

//Plot open from today
e=time ("1", "1331-2000")?red:na
plot(Opentoday,color=e, style=linebr, linewidth=2)

//plot inside bar

ibh= (high < high and low > low)?high:(high >= ibh or low <= ibl)?0:ibh
ibl= (high < high and low > low)?low:(high >= ibh or low <= ibl)?0:ibl
plotchar((high < high and low > low)
Reply
jayy PRO
a year ago
The session plotting issues that drove me to revise the scripts a few weeks back seem to have been fixed by Tradingview. Originally I had set some intraday scripts to only plot from the cash opening to the cash close to avoid the vertical lines that show up at the opening. About 4 weeks ago the script stopped functioning. After playing with the code I found I needed to change the script to a very odd period. ("1331-2000"). It seems that whatever issue was forcing this bandaid has been resolved. I am changing my scripts back to ("0931-1600"). I will update the codes ASAP with some additional features - for some codes. I would like to add alerts from within the script if possible. There is a Chris Moody session currently scheduled for Aug 11, 2015 regarding alerts within scripts. Depending on what I hear I hope to make more script changes to include alerts. I will re publish after that. If you want the current (today) update before I republish send me an email/message or go back to an older script. This message will be duplicated for the other affected scripts. Jayy
Reply
Ideas Scripts Chart
United States
United Kingdom
India
España
Italia
Brasil
Россия
Türkiye
日本
한국
Home Stock Screener Economic Calendar How It Works Chart Features House Rules Moderators For the WEB Widgets Stock Charting Library Priority Support Feature Request Blog & News FAQ Help & Wiki Twitter
Private Messages Chat Ideas Published Followers Following Priority Support Public Profile Profile Settings Billing Sign Out