Repaints Standard Deviation Pivot points MTF For ThinkOrSwim

Repaints
https://in.tradingview.com/script/7DKxV88a-Standard-Deviation-Pivot-points/

Code:
//@version=5
indicator('Standard Deviation Pivots MultiTf', overlay=true)
Round_it(x) =>
    n = math.round(x / syminfo.mintick) * syminfo.mintick
    n

//Boolen inputs
showlabels = input(title='Show Labels?', defval=true)
showlast = input(title='Hide Historical', defval=true)
off = input(title="Display Offset value",defval=0)
per = input.timeframe(title='1st timeframe Period', defval='D', group="1st Timeframe")
showlper = input(title='Show second timeframe?', defval=true, group="2nd Timeframe")
lper = input.timeframe(title='2nd timeframe Period', defval='W', group="2nd Timeframe")
cur = input(title='Use current session for 1st timeframe?', defval=false, group="1st Timeframe")
lcur = input(title='Use current session for 2nd timeframe?', defval=false, group="2nd Timeframe")
l1 = input(false, title='Show Level 3-5?', group="1st Timeframe")
l2 = input(false, title='Show Level 6-10?', group="1st Timeframe")
ll1 = input(false, title='Show Level 3-5?', group="2nd Timeframe")
ll2 = input(false, title='Show Level 6-10?', group="2nd Timeframe")
islast = showlast ? request.security(syminfo.tickerid, per, barstate.islast, lookahead=barmerge.lookahead_on) : true
lislast = showlast ? request.security(syminfo.tickerid, lper, barstate.islast, lookahead=barmerge.lookahead_on) : true
piv = cur?request.security(syminfo.tickerid, per, hlc3, barmerge.gaps_off, barmerge.lookahead_on):request.security(syminfo.tickerid, per, hlc3[1], barmerge.gaps_off, barmerge.lookahead_on)
hvar = cur?math.pow(request.security(syminfo.tickerid, per, high, barmerge.gaps_off, barmerge.lookahead_on) - piv, 2):math.pow(request.security(syminfo.tickerid, per, high[1], barmerge.gaps_off, barmerge.lookahead_on) - piv, 2)
lvar = cur?math.pow(request.security(syminfo.tickerid, per, low, barmerge.gaps_off, barmerge.lookahead_on) - piv, 2):math.pow(request.security(syminfo.tickerid, per, low[1], barmerge.gaps_off, barmerge.lookahead_on) - piv, 2)
cvar = cur?math.pow(request.security(syminfo.tickerid, per, close, barmerge.gaps_off, barmerge.lookahead_on) - piv, 2):math.pow(request.security(syminfo.tickerid, per, close[1], barmerge.gaps_off, barmerge.lookahead_on) - piv, 2)
lpiv = lcur?request.security(syminfo.tickerid, lper, hlc3, barmerge.gaps_off, barmerge.lookahead_on):request.security(syminfo.tickerid, lper, hlc3[1], barmerge.gaps_off, barmerge.lookahead_on)
lhvar = lcur?math.pow(request.security(syminfo.tickerid, lper, high, barmerge.gaps_off, barmerge.lookahead_on) - lpiv, 2):math.pow(request.security(syminfo.tickerid, lper, high[1], barmerge.gaps_off, barmerge.lookahead_on) - lpiv, 2)
llvar = lcur?math.pow(request.security(syminfo.tickerid, lper, low, barmerge.gaps_off, barmerge.lookahead_on) - lpiv, 2):math.pow(request.security(syminfo.tickerid, lper, low[1], barmerge.gaps_off, barmerge.lookahead_on) - lpiv, 2)
lcvar = lcur?math.pow(request.security(syminfo.tickerid, lper, close, barmerge.gaps_off, barmerge.lookahead_on) - lpiv, 2):math.pow(request.security(syminfo.tickerid, lper, close[1], barmerge.gaps_off, barmerge.lookahead_on) - lpiv, 2)
//ovar = math.pow(request.security(syminfo.tickerid, 'D', open, barmerge.gaps_off, barmerge.lookahead_on) - piv, 2)
dev = math.sqrt((hvar + lvar + cvar) / 3)
ud10 = piv + 10 * dev
ud9 = piv + 9 * dev
ud8 = piv + 8 * dev
ud7 = piv + 7 * dev
ud6 = piv + 6 * dev
ud5 = piv + 5 * dev
ud4 = piv + 4 * dev
ud3 = piv + 3 * dev
ud2 = piv + 2 * dev
ud1 = piv + 1 * dev
ld1 = piv - 1 * dev
ld2 = piv - 2 * dev
ld3 = piv - 3 * dev
ld4 = piv - 4 * dev
ld5 = piv - 5 * dev
ld6 = piv - 6 * dev
ld7 = piv - 7 * dev
ld8 = piv - 8 * dev
ld9 = piv - 9 * dev
ld10 = piv - 10 * dev
ldev = math.sqrt((lhvar + llvar + lcvar) / 3)
lud10 = lpiv + 10 * ldev
lud9 = lpiv + 9 * ldev
lud8 = lpiv + 8 * ldev
lud7 = lpiv + 7 * ldev
lud6 = lpiv + 6 * ldev
lud5 = lpiv + 5 * ldev
lud4 = lpiv + 4 * ldev
lud3 = lpiv + 3 * ldev
lud2 = lpiv + 2 * ldev
lud1 = lpiv + 1 * ldev
lld1 = lpiv - 1 * ldev
lld2 = lpiv - 2 * ldev
lld3 = lpiv - 3 * ldev
lld4 = lpiv - 4 * ldev
lld5 = lpiv - 5 * ldev
lld6 = lpiv - 6 * ldev
lld7 = lpiv - 7 * ldev
lld8 = lpiv - 8 * ldev
lld9 = lpiv - 9 * ldev
lld10 = lpiv - 10 * ldev
plot(islast and l2? ud10:na, title='1st R10', color=color.new(color.orange, 0),offset=off)
plot(islast and l2? ud9:na, title='1st R9', color=color.new(color.orange, 0),offset=off)
plot(islast and l2? ud8:na, title='1st R8', color=color.new(color.orange, 0),offset=off)
plot(islast and l2? ud7:na, title='1st R7', color=color.new(color.orange, 0),offset=off)
plot(islast and l2? ud6:na, title='1st R6', color=color.new(color.orange, 0),offset=off)
plot(islast and l1? ud5:na, title='1st R5', color=color.new(color.orange, 0),offset=off)
plot(islast and l1? ud4:na, title='1st R4', color=color.new(color.orange, 0),offset=off)
plot(islast and l1? ud3:na, title='1st R3', color=color.new(color.orange, 0),offset=off)
plot(islast? ud2:na, title='1st R2', color=color.new(color.orange, 0),offset=off)
plot(islast? ud1:na, title='1st R1', color=color.new(color.orange, 0),offset=off)
plot(islast? piv:na, title='1st Pivot point', color=color.new(color.fuchsia, 0), style=plot.style_circles,offset=off)
plot(islast? ld1:na, title='1st S1', color=color.new(color.orange, 0),offset=off)
plot(islast? ld2:na, title='1st S2', color=color.new(color.orange, 0),offset=off)
plot(islast and l1? ld3:na, title='1st S3', color=color.new(color.orange, 0),offset=off)
plot(islast and l1? ld4:na, title='1st S4', color=color.new(color.orange, 0),offset=off)
plot(islast and l1? ld5:na, title='1st S5', color=color.new(color.orange, 0),offset=off)
plot(islast and l2? ld6:na, title='1st S6', color=color.new(color.orange, 0),offset=off)
plot(islast and l2? ld7:na, title='1st S7', color=color.new(color.orange, 0),offset=off)
plot(islast and l2? ld8:na, title='1st S8', color=color.new(color.orange, 0),offset=off)
plot(islast and l2? ld9:na, title='1st S9', color=color.new(color.orange, 0),offset=off)
plot(islast and l2? ld10:na, title='1st S10', color=color.new(color.orange, 0),offset=off)
plot(lislast and showlper and ll2? lud10:na, title='2nd R10', color=color.new(color.orange, 0),offset=off)
plot(lislast and showlper and ll2? lud9:na, title='2nd R9', color=color.new(color.orange, 0),offset=off)
plot(lislast and showlper and ll2? lud8:na, title='2nd R8', color=color.new(color.orange, 0),offset=off)
plot(lislast and showlper and ll2? lud7:na, title='2nd R7', color=color.new(color.orange, 0),offset=off)
plot(lislast and showlper and ll2? lud6:na, title='2nd R6', color=color.new(color.orange, 0),offset=off)
plot(lislast and showlper and ll1? lud5:na, title='2nd R5', color=color.new(color.orange, 0),offset=off)
plot(lislast and showlper and ll1? lud4:na, title='2nd R4', color=color.new(color.orange, 0),offset=off)
plot(lislast and showlper and ll1? lud3:na, title='2nd R3', color=color.new(color.orange, 0),offset=off)
plot(lislast and showlper? lud2:na, title='2nd R2', color=color.new(color.orange, 0),offset=off)
plot(lislast and showlper? lud1:na, title='2nd R1', color=color.new(color.orange, 0),offset=off)
plot(lislast and showlper? lpiv:na, title='2nd Pivot point', color=color.new(color.fuchsia, 0), style=plot.style_circles,offset=off)
plot(lislast and showlper? lld1:na, title='2nd S1', color=color.new(color.orange, 0),offset=off)
plot(lislast and showlper? lld2:na, title='2nd S2', color=color.new(color.orange, 0),offset=off)
plot(lislast and showlper and ll1? lld3:na, title='2nd S3', color=color.new(color.orange, 0),offset=off)
plot(lislast and showlper and ll1? lld4:na, title='2nd S4', color=color.new(color.orange, 0),offset=off)
plot(lislast and showlper and ll1? lld5:na, title='2nd S5', color=color.new(color.orange, 0),offset=off)
plot(lislast and showlper and ll2? lld6:na, title='2nd S6', color=color.new(color.orange, 0),offset=off)
plot(lislast and showlper and ll2? lld7:na, title='2nd S7', color=color.new(color.orange, 0),offset=off)
plot(lislast and showlper and ll2? lld8:na, title='2nd S8', color=color.new(color.orange, 0),offset=off)
plot(lislast and showlper and ll2? lld9:na, title='2nd S9', color=color.new(color.orange, 0),offset=off)
plot(lislast and showlper and ll2? lld10:na, title='2nd S10', color=color.new(color.orange, 0),offset=off)
// Labels
chper = time - time[1]
chper := ta.change(chper) > 0 ? chper[1] : chper
dist = time + chper * 2
if showlabels
    var label dpl = na
    var label du1l = na
    var label du2l = na
    var label dl1l = na
    var label dl2l = na
    label.delete(dpl)
    label.delete(du1l)
    label.delete(du2l)
    label.delete(dl1l)
    label.delete(dl2l)
    du2l := label.new(x=dist, y=ud2, text=str.tostring(Round_it(ud2)), textalign=text.align_left, size=size.small, textcolor=color.orange, style=label.style_none, xloc=xloc.bar_time, yloc=yloc.price)
    du1l := label.new(x=dist, y=ud1, text=str.tostring(Round_it(ud1)), textalign=text.align_left, size=size.small, textcolor=color.orange, style=label.style_none, xloc=xloc.bar_time, yloc=yloc.price)
    dpl := label.new(x=dist, y=piv, text=str.tostring(Round_it(piv)), textalign=text.align_left, size=size.small, textcolor=color.fuchsia, style=label.style_none, xloc=xloc.bar_time, yloc=yloc.price)
    dl1l := label.new(x=dist, y=ld1, text=str.tostring(Round_it(ld1)), textalign=text.align_left, size=size.small, textcolor=color.orange, style=label.style_none, xloc=xloc.bar_time, yloc=yloc.price)
    dl2l := label.new(x=dist, y=ld2, text=str.tostring(Round_it(ld2)), textalign=text.align_left, size=size.small, textcolor=color.orange, style=label.style_none, xloc=xloc.bar_time, yloc=yloc.price)
    if l1
        var label du3l = na
        var label du4l = na
        var label du5l = na
        var label dl3l = na
        var label dl4l = na
        var label dl5l = na
        label.delete(du3l)
        label.delete(du4l)
        label.delete(du5l)
        label.delete(dl3l)
        label.delete(dl4l)
        label.delete(dl5l)
        du5l := label.new(x=dist, y=ud5, text=str.tostring(Round_it(ud5)), textalign=text.align_left, size=size.small, textcolor=color.orange, style=label.style_none, xloc=xloc.bar_time, yloc=yloc.price)
        du4l := label.new(x=dist, y=ud4, text=str.tostring(Round_it(ud4)), textalign=text.align_left, size=size.small, textcolor=color.orange, style=label.style_none, xloc=xloc.bar_time, yloc=yloc.price)
        du3l := label.new(x=dist, y=ud3, text=str.tostring(Round_it(ud3)), textalign=text.align_left, size=size.small, textcolor=color.orange, style=label.style_none, xloc=xloc.bar_time, yloc=yloc.price)
        dl3l := label.new(x=dist, y=ld3, text=str.tostring(Round_it(ld3)), textalign=text.align_left, size=size.small, textcolor=color.orange, style=label.style_none, xloc=xloc.bar_time, yloc=yloc.price)
        dl4l := label.new(x=dist, y=ld4, text=str.tostring(Round_it(ld4)), textalign=text.align_left, size=size.small, textcolor=color.orange, style=label.style_none, xloc=xloc.bar_time, yloc=yloc.price)
        dl5l := label.new(x=dist, y=ld5, text=str.tostring(Round_it(ld5)), textalign=text.align_left, size=size.small, textcolor=color.orange, style=label.style_none, xloc=xloc.bar_time, yloc=yloc.price)
    if showlper
        var label ldpl = na
        var label ldu1l = na
        var label ldu2l = na
        var label ldl1l = na
        var label ldl2l = na
        label.delete(ldpl)
        label.delete(ldu1l)
        label.delete(ldu2l)
        label.delete(ldl1l)
        label.delete(ldl2l)
        ldu2l := label.new(x=dist, y=lud2, text=str.tostring(Round_it(lud2)), textalign=text.align_left, size=size.small, textcolor=color.orange, style=label.style_none, xloc=xloc.bar_time, yloc=yloc.price)
        ldu1l := label.new(x=dist, y=lud1, text=str.tostring(Round_it(lud1)), textalign=text.align_left, size=size.small, textcolor=color.orange, style=label.style_none, xloc=xloc.bar_time, yloc=yloc.price)
        ldpl := label.new(x=dist, y=lpiv, text=str.tostring(Round_it(lpiv)), textalign=text.align_left, size=size.small, textcolor=color.fuchsia, style=label.style_none, xloc=xloc.bar_time, yloc=yloc.price)
        ldl1l := label.new(x=dist, y=lld1, text=str.tostring(Round_it(lld1)), textalign=text.align_left, size=size.small, textcolor=color.orange, style=label.style_none, xloc=xloc.bar_time, yloc=yloc.price)
        ldl2l := label.new(x=dist, y=lld2, text=str.tostring(Round_it(lld2)), textalign=text.align_left, size=size.small, textcolor=color.orange, style=label.style_none, xloc=xloc.bar_time, yloc=yloc.price)
        if ll1
            var label ldu3l = na
            var label ldu4l = na
            var label ldu5l = na
            var label ldl3l = na
            var label ldl4l = na
            var label ldl5l = na
            label.delete(ldu3l)
            label.delete(ldu4l)
            label.delete(ldu5l)
            label.delete(ldl3l)
            label.delete(ldl4l)
            label.delete(ldl5l)
            ldu5l := label.new(x=dist, y=lud5, text=str.tostring(Round_it(lud5)), textalign=text.align_left, size=size.small, textcolor=color.orange, style=label.style_none, xloc=xloc.bar_time, yloc=yloc.price)
            ldu4l := label.new(x=dist, y=lud4, text=str.tostring(Round_it(lud4)), textalign=text.align_left, size=size.small, textcolor=color.orange, style=label.style_none, xloc=xloc.bar_time, yloc=yloc.price)
            ldu3l := label.new(x=dist, y=lud3, text=str.tostring(Round_it(lud3)), textalign=text.align_left, size=size.small, textcolor=color.orange, style=label.style_none, xloc=xloc.bar_time, yloc=yloc.price)
            ldl3l := label.new(x=dist, y=lld3, text=str.tostring(Round_it(lld3)), textalign=text.align_left, size=size.small, textcolor=color.orange, style=label.style_none, xloc=xloc.bar_time, yloc=yloc.price)
            ldl4l := label.new(x=dist, y=lld4, text=str.tostring(Round_it(lld4)), textalign=text.align_left, size=size.small, textcolor=color.orange, style=label.style_none, xloc=xloc.bar_time, yloc=yloc.price)
            ldl5l := label.new(x=dist, y=lld5, text=str.tostring(Round_it(lld5)), textalign=text.align_left, size=size.small, textcolor=color.orange, style=label.style_none, xloc=xloc.bar_time, yloc=yloc.price)

Thanks In Advanced!!
try this.

CODE:
CSS:
#https://in.tradingview.com/script/7DKxV88a-Standard-Deviation-Pivot-points/
#indicator('Standard Deviation Pivots MultiTf', overlay=true)
# converted by Sam4Cok@Samer800    - 04/2023
#//Boolen inputs
input showLabels = yes;
input HideHistorical = yes;    # 'Hide Historical'
input Offset = 0;
input firstTimeframe = AggregationPeriod.DAY;    # '1st timeframe Period'
input showSecondTimeframe = yes;                 # 'Show second timeframe?'
input secondTimeframe = AggregationPeriod.WEEK;  # '2nd timeframe Period'
input UseCurrentSessionFor1stTimeframe = no;     # 'Use current session for 1st timeframe?'
input UseCurrentSessionFor2ndTimeframe = no;     # 'Use current session for 2nd timeframe?'
input ShowLevel_3To5 = no;                       # 'Show Level 3-5?'
input ShowLevel_6To10 = no;                      # 'Show Level 6-10?'
input ShowSecondTimeframeLevel_3To5 = no;        # 'Show Level 3-5?'
input ShowSecondTimeframeLevel_6To10 = no;       # 'Show Level 6-10?'

def na = Double.NaN;
def last = isNaN(close);
def showLast = HideHistorical;
def per = firstTimeframe;
def showlper = showSecondTimeframe;
def lper = secondTimeframe;
def cur = UseCurrentSessionFor1stTimeframe;
def lcur = UseCurrentSessionFor2ndTimeframe;
def l1 = ShowLevel_3To5;
def l2 = ShowLevel_6To10;
def ll1 = ShowSecondTimeframeLevel_3To5;
def ll2 = ShowSecondTimeframeLevel_6To10;
def islast = if showlast then !IsNaN(close(Period = per)) else yes;
def lislast = if showlast then !IsNaN(close(Period = lper)) else yes;
def piv = if cur then hlc3(Period = per) else  hlc3(Period = per)[1];
def hvar = if cur then Power(high(Period = per) - piv, 2 ) else  Power(high(Period = per)[1] - piv, 2 );
def lvar = if cur then Power(low(Period = per) - piv, 2 ) else  Power(low(Period = per)[1] - piv, 2 );
def cvar = if cur then Power(close(Period = per) - piv, 2 ) else  Power(close(Period = per)[1] - piv, 2 );
def lpiv = if lcur then hlc3(Period = lper) else  hlc3(Period = lper)[1];
def lhvar = if lcur then Power(high(Period = lper) - lpiv, 2) else Power(high(Period = lper)[1] - lpiv, 2);
def llvar = if lcur then Power(low(Period = lper) - lpiv, 2) else Power(low(Period = lper)[1] - lpiv, 2);
def lcvar = if lcur then Power(close(Period = lper) - lpiv, 2) else Power(close(Period = lper)[1] - lpiv, 2);
#//ovar = math.pow(request.security(syminfo.tickerid, 'D', open, barmerge.gaps_off, barmerge.lookahead_on) - piv, 2)
def dev = Sqrt((hvar + lvar + cvar) / 3);
def ud10 = piv + 10 * dev;
def ud9 = piv + 9 * dev;
def ud8 = piv + 8 * dev;
def ud7 = piv + 7 * dev;
def ud6 = piv + 6 * dev;
def ud5 = piv + 5 * dev;
def ud4 = piv + 4 * dev;
def ud3 = piv + 3 * dev;
def ud2 = piv + 2 * dev;
def ud1 = piv + 1 * dev;
def ld1 = piv - 1 * dev;
def ld2 = piv - 2 * dev;
def ld3 = piv - 3 * dev;
def ld4 = piv - 4 * dev;
def ld5 = piv - 5 * dev;
def ld6 = piv - 6 * dev;
def ld7 = piv - 7 * dev;
def ld8 = piv - 8 * dev;
def ld9 = piv - 9 * dev;
def ld10 = piv - 10 * dev;
def ldev = Sqrt((lhvar + llvar + lcvar) / 3);
def lud10 = lpiv + 10 * ldev;
def lud9 = lpiv + 9 * ldev;
def lud8 = lpiv + 8 * ldev;
def lud7 = lpiv + 7 * ldev;
def lud6 = lpiv + 6 * ldev;
def lud5 = lpiv + 5 * ldev;
def lud4 = lpiv + 4 * ldev;
def lud3 = lpiv + 3 * ldev;
def lud2 = lpiv + 2 * ldev;
def lud1 = lpiv + 1 * ldev;
def lld1 = lpiv - 1 * ldev;
def lld2 = lpiv - 2 * ldev;
def lld3 = lpiv - 3 * ldev;
def lld4 = lpiv - 4 * ldev;
def lld5 = lpiv - 5 * ldev;
def lld6 = lpiv - 6 * ldev;
def lld7 = lpiv - 7 * ldev;
def lld8 = lpiv - 8 * ldev;
def lld9 = lpiv - 9 * ldev;
def lld10 = lpiv - 10 * ldev;

plot r10 = if !last and islast and l2 then ud10[Offset] else na;#, title='1st R10'
plot r9 = if !last and islast and l2 then ud9[Offset] else na;#, title='1st R9'
plot r8 = if !last and islast and l2 then ud8[Offset] else na;#, title='1st R8'
plot r7 = if !last and islast and l2 then ud7[Offset] else na;#, title='1st R7'
plot r6 = if !last and islast and l2 then ud6[Offset] else na;#, title='1st R6'
plot r5 = if !last and islast and l1 then ud5[Offset] else na;#, title='1st R5'
plot r4 = if !last and islast and l1 then ud4[Offset] else na;#, title='1st R4'
plot r3 = if !last and islast and l1 then ud3[Offset] else na;#, title='1st R3'
plot r2 = if !last and islast then ud2[Offset] else na;#, title='1st R2'
plot r1 = if !last and islast then ud1[Offset] else na;#, title='1st R1'

plot pvt1 = if !last and islast then piv[Offset] else na;#, title='1st Pivot point'

plot s1 = if !last and islast then ld1[Offset] else na;#, title='1st S1'
plot s2 = if !last and islast then ld2[Offset] else na;#, title='1st S2'
plot s3 = if !last and islast and l1 then ld3[Offset] else na;#, title='1st S3'
plot s4 = if !last and islast and l1 then ld4[Offset] else na;#, title='1st S4'
plot s5 = if !last and islast and l1 then ld5[Offset] else na;#, title='1st S5'
plot s6 = if !last and islast and l2 then ld6[Offset] else na;#, title='1st S6'
plot s7 = if !last and islast and l2 then ld7[Offset] else na;#, title='1st S7'
plot s8 = if !last and islast and l2 then ld8[Offset] else na;#, title='1st S8'
plot s9 = if !last and islast and l2 then ld9[Offset] else na;#, title='1st S9'
plot s10 = if !last and islast and l2 then ld10[Offset] else na;#, title='1st S10'

plot r210 = if !last and lislast and showlper and ll2 then lud10[Offset] else na;#, title='2nd R10'
plot r29 = if !last and lislast and showlper and ll2 then lud9[Offset] else na;#, title='2nd R9'
plot r28 = if !last and lislast and showlper and ll2 then lud8[Offset] else na;#, title='2nd R8'
plot r27 = if !last and lislast and showlper and ll2 then lud7[Offset] else na;#, title='2nd R7'
plot r26 = if !last and lislast and showlper and ll2 then lud6[Offset] else na;#, title='2nd R6'
plot r25 = if !last and lislast and showlper and ll1 then lud5[Offset] else na;#, title='2nd R5'
plot r24 = if !last and lislast and showlper and ll1 then lud4[Offset] else na;#, title='2nd R4'
plot r23 = if !last and lislast and showlper and ll1 then lud3[Offset] else na;#, title='2nd R3'
plot r22 = if !last and lislast and showlper then lud2[Offset] else na;#, title='2nd R2'
plot r21 = if !last and lislast and showlper then lud1[Offset] else na;#, title='2nd R1'

plot pvt2 = if !last and lislast and showlper then lpiv[Offset] else na;#, title='2nd Pivot point'

plot s21 = if !last and lislast and showlper then lld1[Offset] else na;#, title='2nd S1'
plot s22 = if !last and lislast and showlper then lld2[Offset] else na;#, title='2nd S2'
plot s23 = if !last and lislast and showlper and ll1 then lld3[Offset] else na;#, title='2nd S3'
plot s24 = if !last and lislast and showlper and ll1 then lld4[Offset] else na;#, title='2nd S4'
plot s25 = if !last and lislast and showlper and ll1 then lld5[Offset] else na;#, title='2nd S5'
plot s26 = if !last and lislast and showlper and ll2 then lld6[Offset] else na;#, title='2nd S6'
plot s27 = if !last and lislast and showlper and ll2 then lld7[Offset] else na;#, title='2nd S7'
plot s28 = if !last and lislast and showlper and ll2 then lld8[Offset] else na;#, title='2nd S8'
plot s29 = if !last and lislast and showlper and ll2 then lld9[Offset] else na;#, title='2nd S9'
plot s210 = if !last and lislast and showlper and ll2 then lld10[Offset] else na;#, title='2nd S10'

r10.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
r9.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
r8.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
r7.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
r6.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
r5.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
r4.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
r3.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
r2.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
r1.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
pvt1.SetPaintingStrategy(PaintingStrategy.POINTS);
s1.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
s2.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
s3.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
s4.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
s5.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
s6.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
s7.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
s8.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
s9.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
s10.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);

r210.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
r29.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
r28.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
r27.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
r26.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
r25.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
r24.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
r23.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
r22.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
r21.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
pvt2.SetPaintingStrategy(PaintingStrategy.POINTS);
s21.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
s22.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
s23.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
s24.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
s25.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
s26.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
s27.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
s28.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
s29.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
s210.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);

r10.SetDefaultColor(Color.ORANGE);
r9.SetDefaultColor(Color.ORANGE);
r8.SetDefaultColor(Color.ORANGE);
r7.SetDefaultColor(Color.ORANGE);
r6.SetDefaultColor(Color.ORANGE);
r5.SetDefaultColor(Color.ORANGE);
r4.SetDefaultColor(Color.ORANGE);
r3.SetDefaultColor(Color.ORANGE);
r2.SetDefaultColor(Color.ORANGE);
r1.SetDefaultColor(Color.ORANGE);
pvt1.SetDefaultColor(Color.MAGENTA);
s1.SetDefaultColor(Color.DARK_ORANGE);
s2.SetDefaultColor(Color.DARK_ORANGE);
s3.SetDefaultColor(Color.DARK_ORANGE);
s4.SetDefaultColor(Color.DARK_ORANGE);
s5.SetDefaultColor(Color.DARK_ORANGE);
s6.SetDefaultColor(Color.DARK_ORANGE);
s7.SetDefaultColor(Color.DARK_ORANGE);
s8.SetDefaultColor(Color.DARK_ORANGE);
s9.SetDefaultColor(Color.DARK_ORANGE);
s10.SetDefaultColor(Color.DARK_ORANGE);

r210.SetDefaultColor(Color.ORANGE);
r29.SetDefaultColor(Color.ORANGE);
r28.SetDefaultColor(Color.ORANGE);
r27.SetDefaultColor(Color.ORANGE);
r26.SetDefaultColor(Color.ORANGE);
r25.SetDefaultColor(Color.ORANGE);
r24.SetDefaultColor(Color.ORANGE);
r23.SetDefaultColor(Color.ORANGE);
r22.SetDefaultColor(Color.ORANGE);
r21.SetDefaultColor(Color.ORANGE);
pvt2.SetDefaultColor(Color.PLUM);
s21.SetDefaultColor(Color.DARK_ORANGE);
s22.SetDefaultColor(Color.DARK_ORANGE);
s23.SetDefaultColor(Color.DARK_ORANGE);
s24.SetDefaultColor(Color.DARK_ORANGE);
s25.SetDefaultColor(Color.DARK_ORANGE);
s26.SetDefaultColor(Color.DARK_ORANGE);
s27.SetDefaultColor(Color.DARK_ORANGE);
s28.SetDefaultColor(Color.DARK_ORANGE);
s29.SetDefaultColor(Color.DARK_ORANGE);
s210.SetDefaultColor(Color.DARK_ORANGE);


#--- END of CODE
 

Join useThinkScript to post your question to a community of 21,000+ developers and traders.

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
446 Online
Create Post

Similar threads

Similar threads

The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
  • Exclusive indicators
  • Proven strategies & setups
  • Private Discord community
  • ‘Buy The Dip’ signal alerts
  • Exclusive members-only content
  • Add-ons and resources
  • 1 full year of unlimited support

Frequently Asked Questions

What is useThinkScript?

useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.

How do I get started?

We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.

If you are new, or just looking for guidance, here are some helpful links to get you started.

What are the benefits of VIP Membership?
VIP members get exclusive access to these proven and tested premium indicators: Buy the Dip, Advanced Market Moves 2.0, Take Profit, and Volatility Trading Range. In addition, VIP members get access to over 50 VIP-only custom indicators, add-ons, and strategies, private VIP-only forums, private Discord channel to discuss trades and strategies in real-time, customer support, trade alerts, and much more. Learn all about VIP membership here.
How can I access the premium indicators?
To access the premium indicators, which are plug and play ready, sign up for VIP membership here.
Back
Top