DefParam DrawOnLastBarOnly = True
DEFPARAM CalculateOnLastBars = 10000
rx=255
gx=174
bx=185
rw=16
gw=78
bw=139
t =255
start=030000
end1 =060000
end2 =180000
tc1 =(time>=start and time<end1)
tc2 =(time>=end1 and time<end2)
if tc1 then
if time = start then
bar1 = barindex
endif
if time < end1 then
bar2 = barindex
endif
if not tc1[1] then
IBHUK=high
IBLUK=low
endif
IBHUK=max(high,IBHUK)
IBLUK=min(low,IBLUK)
mid = (IBHUK +IBLUK)/2
ENDIF
IF tc2 THEN
IF not tc2[1] then
bar3 = barindex - 1
endif
endif
IF tc2 THEN
bar4 = barindex
ENDIF
drawtext("IBHUK",barindex+3,IBHUK,SansSerif,Bold,10)
drawtext("IBLUK",barindex+3,IBLUK,SansSerif,Bold,10)
drawtext("mid", barindex+3,mid, SansSerif,Bold,10)
DrawRectangle(Bar1,IBHUK,bar2,IBLUK) style(line,1) coloured(rx,gx,bx,t) bordercolor(rx,gx,bx,t)
IF not tc1 then
DrawRectangle(Bar3,IBHUK,bar4,IBLUK) style(line,1) coloured(rw,gw,bw,t) bordercolor(rw,gw,bw,t)
endif
RETURN //IBHUK as " IBHUK",IBLUK as " IBLUK"