jayy

VWAP, Yesterday Hi/Low, i, ii ,iii


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.
see http://tradingwithleafwest.net/ for analysis using these indicators
Script de código aberto

Dentro do verdadeiro espírito TradingView, o autor deste script publicou ele como um script de código aberto, para que os traders possam compreender e checar ele. Um viva ao autor! Você pode usá-lo gratuitamente, mas a reutilização deste código em uma publicação é regida pelas Regras da Casa. Você pode favoritá-lo para usá-lo em um gráfico.

Aviso legal

As informações e publicações não devem ser e não constituem conselhos ou recomendações financeiras, de investimento, de negociação ou de qualquer outro tipo, fornecidas ou endossadas pela TradingView. Leia mais em Termos de uso.

Quer usar esse script no gráfico?
//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[1])
Lowhier   = security(tickerid,"D", low[1])
Closehier = security(tickerid,"D", close[1])
Opentoday = security(tickerid,"D", open[0])

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

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

//Plot open from today
e=time ("1", "931-1600")?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)