Professional Documents
Culture Documents
Mukul Ji Indicator
Mukul Ji Indicator
//
study(title="Basic Pivott Boss Tool", shorttitle="PivottBoss Tool",
overlay=true,max_bars_back=4000)
vw = input(false,"VWAP")
vwaplength= input(title="Length", type=input.integer, defval=1)
DCPR = input(true, title="Show Daily CPR")
WCPR = input(false, title="Show Weekly CPR")
MCPR = input(false, title="Show Monthly CPR")
YCPRPlot = input(title = "Show Yearly CPR", type=input.bool, defval=false)
//Previous D datas
PrevDClose = getSeries(close[1], 'D')
PrevDOpen = getSeries(open[1], 'D')
PrevDHigh = getSeries(high[1], 'D')
PrevDLow = getSeries(low[1], 'D')
//Daily CPR
DPivot = (PrevDHigh + PrevDLow + PrevDClose) / 3.0
DBC = (PrevDHigh + PrevDLow) / 2.0
DTC = (DPivot - DBC) + DPivot
//Daily Camarilla
plot(DCAM and dh6 and (timeframe.isintraday) ? dh6 : na, title="D: H6", color=dh6
!= dh6[1] ? na : color.green, linewidth=2, style=plot.style_line, offset=0,
transp=0)
plot(DCAM and dh5 ? dh5 : na, title="H5", color=dh5 != dh5[1] ? na : color.red,
linewidth=1, style=plot.style_line, offset=0)
plot(DCAM and dh4 ? dh4 : na, title="H4", color=dh4 != dh4[1] ? na :
color.green, linewidth=1, style=plot.style_line, offset=0)
plot(DCAM and dh3 ? dh3 : na, title="H3", color=dh3 != dh3[1] ? na : color.red,
linewidth=2, style=plot.style_line, offset=0)
plot(DCAM and dl3 ? dl3 : na, title="L3", color=dl3 != dl3[1] ? na :
color.green, linewidth=2, style=plot.style_line, offset=0)
plot(DCAM and dl4 ? dl4 : na, title="L4", color=dl4 != dl4[1] ? na : color.red,
linewidth=1, style=plot.style_line, offset=0)
plot(DCAM and dl5 ? dl5 : na, title="L5", color=dl5 != dl5[1] ? na :
color.green, linewidth=1, style=plot.style_line, offset=0)
plot(DCAM and dl6 and (timeframe.isintraday) ? dl6 : na, title="D: L6", color=dl6
!= dl6[1] ? na : color.red, linewidth=2, style=plot.style_line, offset=0, transp=0)
//Previous W datas
PrevWClose = getSeries(close[1], 'W')
PrevWOpen = getSeries(open[1], 'W')
PrevWHigh = getSeries(high[1], 'W')
PrevWLow = getSeries(low[1], 'W')
//Weekly CPR
WPivot = (PrevWHigh + PrevWLow + PrevWClose) / 3
WBC = (PrevWHigh + PrevWLow) / 2
WTC = (WPivot - WBC ) + WPivot
//Weekly Camarilla
wh5 = (PrevWHigh/PrevWLow) * PrevWClose
wh4 = PrevWClose + (PrevWHigh - PrevWLow) * 1.1 / 2.0
wh3 = PrevWClose + (PrevWHigh - PrevWLow) * 1.1 / 4.0
wl3 = PrevWClose - (PrevWHigh - PrevWLow) * 1.1 / 4.0
wl4 = PrevWClose - (PrevWHigh - PrevWLow) * 1.1 / 2.0
wl5 = PrevWClose - (wh5 - PrevWClose)
//Previous M datas
PrevMClose = getSeries(close[1], 'M')
PrevMOpen = getSeries(open[1], 'M')
PrevMHigh = getSeries(high[1], 'M')
PrevMLow = getSeries(low[1], 'M')
//Monthly CPR
MPivot = (PrevMHigh + PrevMLow + PrevMClose) / 3
MBC = (PrevMHigh + PrevMLow) / 2
MTC = (MPivot - MBC ) + MPivot
//Monthly Camarilla
mh5 = (PrevMHigh/PrevMLow) * PrevMClose
mh4 = PrevMClose + (PrevMHigh - PrevMLow) * 1.1 / 2.0
mh3 = PrevMClose + (PrevMHigh - PrevMLow) * 1.1 / 4.0
ml3 = PrevMClose - (PrevMHigh - PrevMLow) * 1.1 / 4.0
ml4 = PrevMClose - (PrevMHigh - PrevMLow) * 1.1 / 2.0
ml5 = PrevMClose - (mh5 - PrevMClose)
tpo_sum = 0.0
current_poc_position = 0.0
//Modified by Naga Chaitanya:)
current_poc_value = 0.0
for _i = 0 to 20 by 1
_get_tpo_value = f_get_tpo_count_1(_i)
tpo_sum := tpo_sum + _get_tpo_value
if _get_tpo_value > current_poc_value
current_poc_position := _i
current_poc_value := _get_tpo_value
current_poc_value
//plot(series=tpo_sum, title='tpo_sum', color=red)
poc_upper = session_high - tpo_section_range * current_poc_position
poc_lower = session_high - tpo_section_range * (current_poc_position + 1)
//plot(series=poc_upper, title='POC Upper', color=black)
//plot(series=poc_lower, title='POC Lower', color=black)
//plot(series=current_poc_position, title='current_poc_position', color=blue)
//plot(series=current_poc_value, title='current_poc_value', color=blue)
for _i = 0 to 20 by 1
if current_sum < tpo_sum * percent_of_tpo
vah_position := max(0, vah_position - 1)
current_sum := current_sum + f_get_tpo_count_2(round(vah_position))
current_sum
if current_sum < tpo_sum * percent_of_tpo
val_position := min(20, val_position + 1)
current_sum := current_sum + f_get_tpo_count_2(round(val_position))
current_sum
f_gapper(_return_value) =>
_return = _return_value
if session_bar_counter == 0
_return := na
_return
_return
// Analysis
//Table {
var table info = table.new(position.top_center , 1, 1)
//var table logo = table.new(position.bottom_left, 1, 1)
if barstate.islast
// table.cell(logo, 0, 0, "☮" , text_size = size.large,
text_color = color.orange)
table.cell(info, 0, 0, "t.me/Pivott_Boss", text_size = size.normal , text_color
= color.black)
//////////////////