TradingView
LonesomeTheBlue
12 Apr 2020 pukul 15.56

Expanded Camarilla Levels 

Bitcoin / U.S. DollarGemini

Huraian

Hello Everyone,

The Expanded Camarilla Levels is introduced in the book "Secrets of a Pivot Boss: Revealing Proven Methods for Profiting in the Market" by Franklin Ochoa. I will not write a lot about the book, you should read it for yourself. There are many great ideas in the book, such using these levels, following trend, time price opportunity, Advanced Camarilla Concepts and much more.


The definition/formula of the levels defined in the book. (actualy L1, L2, H1 and H2 levels are not used in the strategy, so not shown on the chart)

RANGE = highhtf - lowhtf

H5 = (HIGH/ LOW) * CLOSE
H4 = CLOSE + RANGE * 1.1/2
H3 = CLOSE+ RANGE * 1.1/4
H2 = CLOSE+ RANGE * 1.1/6
H1 = CLOSE+ RANGE * 1.1/12
L1 = CLOSE- RANGE * 1.1/12
L2 = CLOSE- RANGE * 1.1/6
L3 = CLOSE- RANGE * 1.1/4
L4 = CLOSE- RANGE * 1.1/2
L5 = CLOSE- (H5 - CLOSE)


Levels:


Strategy: you need to take care of the candles, as you can see there is bearish candle on first part, and Bullish Candle on second part!


Another Strategy:


An Example:




ENJOY!

Nota Keluaran

Improved
Arrays used
H1/L1 and H2/L2 levels added as an option
round_to_mintick() function used
transp removed
Komen
shafiqq07
Looks like a simple yet powerful indicator. What timeframe is the best?
Bearishness
look good. did you tested this trade? what's winning chance??:)
LonesomeTheBlue
@ducksea, hey, no I didn't test it. possible to test if I have time this month.
Bearishness
@LonesomeTheBlue, great! keep us updated:)
justnifty
@LonesomeTheBlue, Hi Can you post strategy according to the same logic explained? I am trying but could not succeed as usual!!
Thank you.
Anderson-FX
There is an error in pivot calculation
R5 is R6

R5 = R4 + 1.168 * (R4 – R3)
R6 = (High/Low) * Close
S5 = S4 – 1.168 * (S3 – S4)
S6 = Close – (R6 – Close)

Nice Work !!
Bushpilot
Loncesome The Blue, is there any way to have the levels to include only the current days extended trading? When the chart is set for extended trading the previous days levels are cast on to the current day's premarket . Is there a way to set up the levels so they only include the current trading day?
https://chart.https://www.tradingview.com/x/o25KK7Nb/
hundredtoamillion
Oh man, I just finished the book too. Happy you put this and the expanded pivot one together! Great work as always
LonesomeTheBlue
@kviateq, Enjoy ;)
jxmodi
Thanks for such Great indicator.
i have made some changes.

//@version=4
study("90% Accuracy with Camarilla Levels", overlay = true)
mode =input(title = "HTF Method", defval = 'Auto', options=['Auto', 'User Defined'])
HTFm = input('D', title = "Time Frame (if HTF Method=User Defined)", type=input.resolution)
showlast = input(title = "Show Only Last Period", defval = false)
showlabels = input(title = "Show Labels", defval = true)
lstyle = input(title = "Line Style", options = ['Solid', 'Circles', 'Cross'], defval ='Solid')

//auto higher time frame
HTFo =timeframe.period == '1' ? '30' :
timeframe.period == '3' ? '60' :
timeframe.period == '5' ? '240' :
timeframe.period == '15' ? 'D' :
timeframe.period == '30' ? 'D' :
timeframe.period == '45' ? 'D' :
timeframe.period == '60' ? 'D' :
timeframe.period == '120' ? 'D' :
timeframe.period == '180' ? 'D' :
timeframe.period == '240' ? 'D' :
timeframe.period == 'D' ? 'W' :
'5W'

HTF = mode == 'Auto' ? HTFo : HTFm

highhtf = security(syminfo.tickerid, HTF, high[1], lookahead = barmerge.lookahead_on)
lowhtf = security(syminfo.tickerid, HTF, low[1], lookahead = barmerge.lookahead_on)
closehtf = security(syminfo.tickerid, HTF, close[1], lookahead = barmerge.lookahead_on)

RANGE = highhtf - lowhtf

// is this last bar for HTF?
islast = showlast ? security(syminfo.tickerid, HTF, barstate.islast, lookahead = true) : true

// Line Style
linestyle = lstyle == 'Solid' ? plot.style_line :
lstyle == 'Circle' ? plot.style_circles : plot.style_cross

H5 = (highhtf / lowhtf) * closehtf
H4 = closehtf + RANGE * 1.1/2
H3 = closehtf + RANGE * 1.1/4
H2 = closehtf + RANGE * 1.1/6
H1 = closehtf + RANGE * 1.1/12
L1 = closehtf - RANGE * 1.1/12
L2 = closehtf - RANGE * 1.1/6
L3 = closehtf - RANGE * 1.1/4
L4 = closehtf - RANGE * 1.1/2
L5 = closehtf - (H5 - closehtf)

plot(islast ? H5 : na, title = "H5", color = color.maroon, linewidth = 3, style = linestyle, transp = 0)
plot(islast ? H4 : na, title = "H4", color = color.red, linewidth = 2, style = linestyle, transp = 0)
plot(islast ? H3 : na, title = "H3", color = color.orange, linewidth = 1, style = linestyle, transp = 0)
plot(islast ? L3 : na, title = "L3", color = color.lime, linewidth = 1, style = linestyle, transp = 0)
plot(islast ? L4 : na, title = "L4", color = color.blue, linewidth = 2, style = linestyle, transp = 0)
plot(islast ? L5 : na, title = "L5", color = color.navy, linewidth = 3, style = linestyle, transp = 0)

// Label for S/R
chper = time - time[1]
chper := change(chper) > 0 ? chper[1] : chper

Round_it(valu)=>
a = 0
num = syminfo.mintick
s = valu
if na(s)
s := syminfo.mintick
if num < 1
for i = 1 to 20
num := num * 10
if num > 1
break
a := a +1

for x = 1 to a
s := s * 10
s := round(s)
for x = 1 to a
s := s / 10
s := s < syminfo.mintick ? syminfo.mintick : s
s

// Labels
if showlabels
var lab
Lebih