cristian.d

Camarilla - formula updated for 5 and 6 levels

583 0 81
Since levels 5 and 6 formulas are kind of surrounded in mystery it's difficult to find a widely agreed one.
While for the level 5 there is some consensus the 6th one is hard to find. I updated level 5 with the most common use of lvl             5 formula , some links like this one or from books (Secrets of a Pivot Boss) . Level 6 is a tough one, so please use this one experimentally . If you have other formulas for level 6, let me know. The 5 and 6 lvls are useful in volatile days.
http://forums.babypips.com/show-me-money-daytrading/44165-hourly-breakout-camarilla-pivots.html

Remove from Favorite Scripts Add to Favorite Scripts
//Created by CristianD
study(title="Camarilla", shorttitle="CD_Camarilla_All Levels", overlay=true) 
sd = input(true, title="Show Daily Pivots?")


//Camarilla
pivot = (high + low + close ) / 3.0 
range = high - low
h5 = (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
h6 = h5 + 1.168 * (h5 - h4) 
l5 = close - (h5 - close)
l6 = close - (h6 - close)

// Daily line breaks
sopen = security(tickerid, "D", open [1])
shigh = security(tickerid, "D", high [1])
slow = security(tickerid, "D", low [1])
sclose = security(tickerid, "D", close [1])

// Color
dcolor=sopen != sopen[1] ? na : black
dcolor1=sopen != sopen[1] ? na : red
dcolor2=sopen != sopen[1] ? na : green

//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",color=dcolor, linewidth=2)
plot(sd and dtime_h6 ? dtime_h6 : na, title="Daily H6", color=dcolor2, linewidth=2)
plot(sd and dtime_h5 ? dtime_h5 : na, title="Daily H5",color=dcolor2, linewidth=2)
plot(sd and dtime_h4 ? dtime_h4 : na, title="Daily H4",color=dcolor2, linewidth=2)
plot(sd and dtime_h3 ? dtime_h3 : na, title="Daily H3",color=dcolor1, linewidth=3)
plot(sd and dtime_h2 ? dtime_h2 : na, title="Daily H2",color=dcolor2, linewidth=2)
plot(sd and dtime_h1 ? dtime_h1 : na, title="Daily H1",color=dcolor2, linewidth=2)
plot(sd and dtime_l1 ? dtime_l1 : na, title="Daily L1",color=dcolor2, linewidth=2)
plot(sd and dtime_l2 ? dtime_l2 : na, title="Daily L2",color=dcolor2, linewidth=2)
plot(sd and dtime_l3 ? dtime_l3 : na, title="Daily L3",color=dcolor1, linewidth=3)
plot(sd and dtime_l4 ? dtime_l4 : na, title="Daily L4",color=dcolor2, linewidth=2)
plot(sd and dtime_l5 ? dtime_l5 : na, title="Daily L5",color=dcolor2, linewidth=2)
plot(sd and dtime_l6 ? dtime_l6 : na, title="Daily L6",color=dcolor2, linewidth=2)
Ideas Scripts Chart
United States
United Kingdom
India
España
Italia
Brasil
Россия
Türkiye
日本
한국
Home Stock Screener Economic Calendar How It Works Chart Features House Rules Moderators For the WEB Widgets Stock Charting Library Priority Support Feature Request Blog & News FAQ Help & Wiki Twitter
Private Messages Chat Ideas Published Followers Following Priority Support Public Profile Profile Settings Billing Sign Out