0% found this document useful (0 votes)
546 views2 pages

JXModi Tool V3

The document describes a technical analysis indicator script for TradingView that plots Fibonacci retracement levels and trend lines on a chart. It uses the high, low, open and close values to calculate Fibonacci ratios and plot support and resistance levels. It also includes code to add a smoothed moving average ribbon to the chart for identifying trends.

Uploaded by

Sriram Ganesh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
546 views2 pages

JXModi Tool V3

The document describes a technical analysis indicator script for TradingView that plots Fibonacci retracement levels and trend lines on a chart. It uses the high, low, open and close values to calculate Fibonacci ratios and plot support and resistance levels. It also includes code to add a smoothed moving average ribbon to the chart for identifying trends.

Uploaded by

Sriram Ganesh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

// This source code is subject to the terms of the Mozilla Public License 2.

0 at
https://mozilla.org/MPL/2.0/
// © Jxmodi
//More indicators at Telegram Channel. @JxmodiTradingviewIndicators

study(" JxTool V3 ", overlay=true)


HPeriod= input(13," LOW")
LPeriod= input(21,"HIGH")
HLd= iff(close>nz(sma(high,HPeriod))[1],1,iff(close<nz(sma(low,LPeriod))[1],-1,0))
HLv= valuewhen(HLd!=0,HLd,0)
HiLo= iff(HLv==-1,sma(high,HPeriod),sma(low,LPeriod))
HLcolor= HLv==-1 ? orange : navy
plot(HiLo,linewidth=2, color=HLcolor)
sr = input(true, title="FIB")
range = high - low

// Daily line breaks


sopen = security(tickerid, "D", open)

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)

L5=plot(sr and lowrange4 ? lowrange5 : na, title="Support", color=lcolor4,


linewidth=1)
H3=plot(sr and highrange3 ? highrange3 : na, title="Support 1", color=hcolor2,
linewidth=2)
L1=plot(sr and lowrange1 ? lowrange1 : na, title="Support 2",color=lcolor,
linewidth=1)
L2=plot(sr and lowrange2 ? lowrange2 : na, title="Support 3", color=lcolor1,
linewidth=1)
H4=plot(sr and highrange4 ? highrange4 : na, title="Final Support", color=hcolor3,
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])

bfr = -cd*cd*cd*i6 + c3*(i5) + c4*(i4) + c5*(i3)


//bfrC = bfr - nz(bfr[1]) > syminfo.mintick ? green : bfr - nz(bfr[1]) <
syminfo.mintick ? red : blue
bfrC = bfr > nz(bfr[1]) ? blue : bfr < nz(bfr[1]) ? red : blue
tc=ebc?gray:bfrC
plot(ribm?na:bfr, title="Trend", linewidth=1, style=circles, color=tc)
bgcolor(ribm?bfrC:na, transp=50)
barcolor(ebc?bfrC:na)

You might also like