JXModi Tool V3
JXModi Tool V3
0 at
https://mozilla.org/MPL/2.0/
// © Jxmodi
//More indicators at Telegram Channel. @JxmodiTradingviewIndicators
a=range[1]*0.500
b=range[1]*0.618
c=range[1]*0.382
d=range[1]*0.236
h=sopen+a
h1=sopen+b
h2=(-sopen+b)-(-sopen+a)+sopen-a
h3=(-sopen+a)-(-sopen+b)+sopen-b
h4=sopen+d
l=sopen-a
l1=sopen-b
l2=(sopen-a)-(sopen-b)+sopen+b
l3=(sopen-b)-(sopen-a)+sopen+a
l4=sopen-d
// Color
hcolor=sopen != sopen[1] ? na : red
hcolor1=sopen != sopen[1] ? na : fuchsia
hcolor2=sopen != sopen[1] ? na : blue
hcolor3=sopen != sopen[1] ? na : teal
hcolor4=sopen != sopen[1] ? na : gray
lcolor=sopen != sopen[1] ? na : green
lcolor1=sopen != sopen[1] ? na : lime
lcolor2=sopen != sopen[1] ? na : maroon
lcolor3=sopen != sopen[1] ? na : black
lcolor4=sopen != sopen[1] ? na : #00bcd4
//Daily Range
highrange1 = security(tickerid, 'D', h)
highrange2 = security(tickerid, 'D', h1)
highrange3 = security(tickerid, 'D', h2)
highrange4 = security(tickerid, 'D', h3)
highrange5 = security(tickerid, 'D', h4)
lowrange1 = security(tickerid, 'D', l)
lowrange2 = security(tickerid, 'D', l1)
lowrange3 = security(tickerid, 'D', l2)
lowrange4 = security(tickerid, 'D', l3)
lowrange5 = security(tickerid, 'D', l4)
offs_daily = 0
H5=plot(sr and highrange5 ? highrange5 : na, title="Resistance", color=hcolor4,
linewidth=1)
L4=plot(sr and lowrange4 ? lowrange4 : na, title="Resistance 1", color=lcolor3,
linewidth=2)
H1=plot(sr and highrange1 ? highrange1 : na, title="Resistance 2",color=hcolor,
linewidth=1)
H2=plot(sr and highrange2 ? highrange2 : na, title="Resistance 3", color=hcolor1,
linewidth=1)
L3=plot(sr and lowrange3 ? lowrange3 : na, title="Final Resistance", color=lcolor2,
linewidth=1)
fill(H1,H2,color=maroon)
fill(L1,L2,color=lime)
src=close
sm =input(21, title="Smoothing Period")
cd = input(0.4, title="Constant D")
ebc=input(false, title="Color Bars")
ribm=input(false, title="Ribbon Mode")
di = (sm - 1.0) / 2.0 + 1.0
c1 = 2 / (di + 1.0)
c2 = 1 - c1
c3 = 3.0 * (cd * cd + cd * cd * cd)
c4 = -3.0 * (2.0 * cd * cd + cd + cd * cd * cd)
c5 = 3.0 * cd + 1.0 + cd * cd * cd + 3.0 * cd * cd
i1 = c1*src + c2*nz(i1[1])
i2 = c1*i1 + c2*nz(i2[1])
i3 = c1*i2 + c2*nz(i3[1])
i4 = c1*i3 + c2*nz(i4[1])
i5 = c1*i4 + c2*nz(i5[1])
i6 = c1*i5 + c2*nz(i6[1])