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/#
开源脚本

本着真正的TradingView精神,该脚本的作者将其开源发布,以便交易者可以理解和验证它。为作者喝彩!您可以免费使用它,但在出版物中重复使用此代码受网站规则的约束。 您可以收藏它以在图表上使用。

免责声明

这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。

想在图表上使用此脚本?
//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)