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)