jayy

VWAP MA HLOC JAyy


For intraday 9:30 to 4 pm Eastern plots VWAP, yesterday's high, low, open and close (HLOC), the day before HLOC - if desired, today's open and today's high and low.
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 subsequent bars are inside the last bar before the last true inside bar they also are marked with an ">"
Also plots the 20 ema for different periods, If you trade the 5 min then you will likely be interested in the 20 ema for 15 mins and 60 mins

Jayy
Skrypt open-source

Zgodnie z prawdziwym duchem TradingView, autor tego skryptu opublikował go jako open-source, aby traderzy mogli go zrozumieć i zweryfikować. Brawo dla autora! Możesz używać go za darmo, ale ponowne wykorzystanie tego kodu w publikacji jest regulowane przez Dobre Praktyki. Możesz go oznaczyć jako ulubione, aby użyć go na wykresie.

Wyłączenie odpowiedzialności

Informacje i publikacje przygotowane przez TradingView lub jego użytkowników, prezentowane na tej stronie, nie stanowią rekomendacji ani porad handlowych, inwestycyjnych i finansowych i nie powinny być w ten sposób traktowane ani wykorzystywane. Więcej informacji na ten temat znajdziesz w naszym Regulaminie.

Chcesz użyć tego skryptu na wykresie?
//// Jayy 
// for intraday 9:30 to 4 pm Eastern plots VWAP, yesterday's high, low, open and close (HLOC), the day before's HLOC - if desired, today's open and todays high and low. 
// 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 ">" 
// Also plots the 20 ema for different periods,  If you trade the 5 min then you will likely be interested in the 20 ema for 15 mins and 60 mins



study(title="VWAP MA HLOC JAyy", shorttitle="VWAP MA HLOC JAyy", overlay = true)


Highhier  = security(tickerid,"D", high[1])
Lowhier   = security(tickerid,"D", low[1])
Closehier = security(tickerid,"D", close[1])
Openhier = security(tickerid,"D", open[1])
Opentoday = security(tickerid,"D", open[0])
Hightoday = security(tickerid,"D", high[0])
Lowtoday = security(tickerid,"D", low[0])
shovwap = input(true, title= "Show VWAP?") 
shohloc2 = input(false, title= "Show HLOC from 2 days ago?") 
Highhier2  = security(tickerid,"D", high[2])
Lowhier2   = security(tickerid,"D", low[2])
Closehier2 = security(tickerid,"D", close[2])
Openhier2 = security(tickerid,"D", open[2])
shoactEMA=input(false, title= "Show actual 20 EMA for current period?")
shoEMA=input(false, title= "Show higher timeframe 20 EMAs?")
shoinsid = input(false, title= "Show inside and outside bars?") 
shohilo = input(false, title= "Show todays high and low") 
width = input(2, minval=1)
close5 = security(tickerid,"5", close[0]) 
close15 = security(tickerid,"15", close[0]) 
close60 = security(tickerid,"60", close[0]) 
close120 = security(tickerid,"120", close[0]) 
close240 = security(tickerid,"240", close[0]) 

EMA5 =  security(tickerid,"5", ema(close5,20)) 
EMA15 =  security(tickerid,"15", ema(close15,20)) 
EMA60 =  security(tickerid,"60", ema(close60,20)) 
EMA120 =  security(tickerid,"120", ema(close120,20)) 
EMA240 =  security(tickerid,"240", ema(close240,20)) 
ri= input("930-1600", type=session, title= "plot session")
z="931-1600"
plot(shoEMA and period=="1"?EMA5:na, color = aqua, style=line, linewidth = 1)
plot(shoEMA and (period=="1" or period=="5")?EMA15:na, color = aqua, style=line, linewidth = 1)
plot(shoEMA and (period=="1" or period=="5")?EMA15:na, color = black, style=circles, linewidth = 1)
plot(shoEMA and (period=="1" or period=="5" or period=="15")?EMA60:na, color = purple, style=line, linewidth = 1)
plot(shoEMA and ( period=="15" or period=="60" )?EMA120:na, color = blue, style=line, linewidth = 1)
plot(shoEMA and ( period=="60" or period=="120"  )?EMA240:na, color = fuchsia, style=line, linewidth = 1)
plot(shoactEMA ?ema(close,20):na, color = green, style=line, linewidth = 2)
plot(shoactEMA ?ema(close,20):na, color = red, style=circles, linewidth = 2)
// plot ((LWMA and isintraday) ?emaintra:LWMA or THEMA==false?emainter:THEMA?emaintra:na, color= smas20 and emaintra>sma_emaintra?green:smas20 and emaintra<=sma_emaintra?red:
//       smas20 and emainter>sma_emainter?blue:smas20 and emainter<=sma_emainter?maroon:na, title="moving avg of closes",linewidth=2)
//plot(shovwap and isintraday?vwap:na,color=a,style=line, linewidth=2)

r= input("930-1600", type=session, title= "plot session")

e=time ("1", "0931-1600")?red:na
plot(isintraday and not (period=="240" or period =="195" or period=="120")?Opentoday:na,color=e, style=line, linewidth=2) 
plot(shohilo and isintraday and not (period=="240" or period =="195" or period=="120") ?Hightoday:na,color=time ("1", "0931-1600")?lime:na, style=line, linewidth=1) 
plot(shohilo and isintraday and not (period=="240" or period =="195" or period=="120")?Lowtoday:na,color=time ("1", "0931-1600")?maroon:na, style=line, linewidth=1) 
plot(shovwap and isintraday and not (period=="240" or period =="195" or period=="120")?vwap:na,color=time ("1", z)?fuchsia:na,style=line, linewidth=2)
//ri=sess?r:"800-1700"
// Plot high and low and close  from yesterday 
//b=time ("1", z)?lime:na
plot(isintraday and not (period=="240" or period =="195" or period=="120")?Highhier:na,  title='yesterdays high', color=time ("1", z)?lime:na,style=line, linewidth=2, editable=true)
//c=time ("1", z)?orange:na
plot(isintraday and not (period=="240" or period =="195" or period=="120")?Lowhier:na,color=time ("1", z)?aqua:na,style=line, linewidth=2, title="yesterdays low")
//d=time ("1", z)?red:na
plot(isintraday and not (period=="240" or period =="195" or period=="120")?Closehier:na,color=time ("1", z)?red:na,style=line, linewidth=2, title="yesterdays close")
//Plot open from today
//e=time ("1", z)?yellow:na
plot(isintraday and not (period=="240" or period =="195" or period=="120")?Openhier:na,color=time ("1", z)?yellow:na, style=line, linewidth=2, title="yesterdays open") 
//plot(isintraday?Opentoday:na,color=time ("1", z)?fuchsia:na, style=line, linewidth=2, title="yesterdays open") 
b=time ("1", z)?black:na
plot(isintraday and not (period=="240" or period =="195" or period=="120")?Highhier:na,color=b,style=cross, linewidth=1) //, title="yesterday's high"
//c=time ("1", z)?orange:na
plot(isintraday and not (period=="240" or period =="195" or period=="120")?Lowhier:na,color=b,style=cross, linewidth=1)  // , title="yesterday's low"
//d=time ("1", z)?red:na
plot(isintraday and not (period=="240" or period =="195" or period=="120")?Closehier:na,color=b,style=cross, linewidth=1)//, title="yesterday's close"
//e=time ("1", z)?yellow:na
plot(isintraday and not (period=="240" or period =="195" or period=="120")?Openhier:na,color=b, style=cross, linewidth=1) //, title="yesterday's open"
plot(shohloc2 and isintraday and not (period=="240" or period =="195" or period=="120")?Highhier2:na,color=lime,style=cross, linewidth=1)

plot(shohloc2 and isintraday and not (period=="240" or period =="195" or period=="120") ?Lowhier2:na,color=orange,style=cross, linewidth=1)

plot(shohloc2 and isintraday and not (period=="240" or period =="195" or period=="120")?Closehier2:na,color=red,style=cross, linewidth=1)

plot(shohloc2 and isintraday and not (period=="240" or period =="195" or period=="120")?Openhier2:na,color=yellow, style=cross, linewidth=1) 

plot(isintraday and not (period=="240" or period =="195" or period=="120")?Opentoday:na, color=yellow, style=cross, linewidth=1) 
//plot  inside bar
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 

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((barh>0 and  barl>0) ? close : na, title='Inside bar 2 or more bars back',char='>', location=location.abovebar, color=orange, transp=0, offset=0)

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)
plotchar((high > high[1] and low < low[1]) ? close:na, title='Outside bar',char='O', location=location.abovebar, color=black, transp=0, offset=0)
plotshape((high > high[1] and low < low[1]) ? close : na, style=shape.square, location=location.belowbar, color=maroon, text=".", offset=0)
//plottshape()

//// last line