// Horarios configurables
sessionStart = 090000 // 09:00:00
rangeStart = 100000 // 10:00:00
rangeEnd = 120000 // 12:00:00
rangeStart1 = 220000
rangeEnd1 = 020000
if opentime=sessionStart then
bar=barindex
endif
once maxref=high
once minref=low
once maxref1=high
once minref1=low
if opentime>=rangeStart and opentime[1]<rangeStart then
lastmaxref=maxref
lastminref=minref
maxref=high
minref=low
elsif opentime>=rangeStart and opentime<=rangeEnd then
maxref=max(high,maxref)
minref=min(minref,low)
endif
if opentime>=rangeStart1 and opentime[1]<rangeStart1 then
lastmaxref1=maxref1
lastminref1=minref1
maxref1=high
minref1=low
elsif opentime>=rangeStart1 and opentime<=rangeEnd1 then
maxref1=max(high,maxref1)
minref1=min(minref1,low)
endif
if islastbarupdate then
drawsegment(bar,lastmaxref,barindex+5,lastmaxref)coloured("cyan")
drawsegment(bar,lastminref,barindex+5,lastminref)coloured("red")
drawsegment(bar,lastmaxref1,barindex+5,lastmaxref1)coloured("blue")
drawsegment(bar,lastminref1,barindex+5,lastminref1)coloured("fuchsia")
endif
return minref1 coloured("fuchsia",75), maxref1 coloured("blue",75),minref coloured("red",75), maxref coloured("cyan",75)