cristian.d

Camarilla Pivots - H5/L5 and H6/L6 added

215
I am a big fan of Camarilla Pivots so I thought the missing 5 and 6 levels with be useful sometimes.... like with big moves when you don't know how low or high can it go once it passed the final levels of SR (H4 and L5 in Camarilla case). Well, today's free fall of AAPL would've been stopped by the L5 and 6.HTTPS://WWW.TRADINGVIEW.COM/CHART/WXPCE8MK/#
Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this script on a chart?
//Created by CristianD
study(title="Camarilla", shorttitle="Camarilla_All Levels", overlay=true) 
sd = input(true, title="Show Daily Pivots?")

//Camarilla
pivot = (high + low + close ) / 3.0 
range = high - low
h6 = (high/low) * close 
h4 = close + (high - low) * 1.1 / 2.0
h3 = close + (high - low) * 1.1 / 4.0
h2 = close + (high - low) * 1.1 / 6.0
h1 = close + (high - low) * 1.1 / 12.0
l1 = close - (high - low) * 1.1 / 12.0
l2 = close - (high - low) * 1.1 / 6.0
l3 = close - (high - low) * 1.1 / 4.0
l4 = close - (high - low) * 1.1 / 2.0
h5 = h4 + 1.168 * (h4 - h3) 
l5 = close - (h5 - close)
l6 = close - (h6 - close)

//Daily Pivots 
dtime_pivot = security(tickerid, 'D', pivot[1]) 
dtime_h6 = security(tickerid, 'D', h6[1]) 
dtime_h5 = security(tickerid, 'D', h5[1]) 
dtime_h4 = security(tickerid, 'D', h4[1]) 
dtime_h3 = security(tickerid, 'D', h3[1]) 
dtime_h2 = security(tickerid, 'D', h2[1]) 
dtime_h1 = security(tickerid, 'D', h1[1]) 
dtime_l1 = security(tickerid, 'D', l1[1]) 
dtime_l2 = security(tickerid, 'D', l2[1]) 
dtime_l3 = security(tickerid, 'D', l3[1]) 
dtime_l4 = security(tickerid, 'D', l4[1]) 
dtime_l5 = security(tickerid, 'D', l5[1]) 
dtime_l6 = security(tickerid, 'D', l6[1]) 

offs_daily = 0 
plot(sd and dtime_pivot ? dtime_pivot : na, title="Daily Pivot",style=circles, color=fuchsia,linewidth=3) 
plot(sd and dtime_h6 ? dtime_h6 : na, title="Daily H6",style=circles, color=blue,linewidth=3)
plot(sd and dtime_h5 ? dtime_h5 : na, title="Daily H5",style=circles, color=blue,linewidth=3)
plot(sd and dtime_h4 ? dtime_h4 : na, title="Daily H4",style=circles, color=blue,linewidth=3)
plot(sd and dtime_h3 ? dtime_h3 : na, title="Daily H3",style=circles, color=blue,linewidth=3)
plot(sd and dtime_h2 ? dtime_h2 : na, title="Daily H2",style=circles, color=blue,linewidth=3)
plot(sd and dtime_h1 ? dtime_h1 : na, title="Daily H1",style=circles, color=blue,linewidth=3)
plot(sd and dtime_l1 ? dtime_l1 : na, title="Daily L1",style=circles, color=blue,linewidth=3)
plot(sd and dtime_l2 ? dtime_l2 : na, title="Daily L2",style=circles, color=blue,linewidth=3)
plot(sd and dtime_l3 ? dtime_l3 : na, title="Daily L3",style=circles, color=blue,linewidth=3)
plot(sd and dtime_l4 ? dtime_l4 : na, title="Daily L4",style=circles, color=blue,linewidth=3)
plot(sd and dtime_l5 ? dtime_l5 : na, title="Daily L5",style=circles, color=blue,linewidth=3)
plot(sd and dtime_l6 ? dtime_l6 : na, title="Daily L6",style=circles, color=blue,linewidth=3)