RazzParticipant
Master
I often use boxing, but I don’t know how to reach how I can if the course eg. above the previous day’s low of the box can color the chart background. In advance thanks for your help
//____________________________________
Starttime1 = 090000
if time = starttime1 then
startbar1 = barindex
endif
//____________________________________
// --- init
alpha = max(alpha,0)
alpha = min(alpha,255)
// --- end
starttime = 090500
endtime = 093000
if time = starttime then
startbar = barindex
endif
If Time = 090500 then
Ops=open
endif
if time = endtime then
endbar = barindex
endif
if time >= starttime and time <= endtime then
if high > hh then
hh = high
endif
if low < ll or ll = 0 then
ll = low
endif
endif
if intradaybarindex = 0 then
hh = 0
ll = 0
endif
if date = today and time = endtime then
upper = highest[6](high) // Frame 12 = 5 min Chart
lower = lowest[6](low)
op = close
dif = round(abs(upper-lower))
OMitte = upper-(dif/4)
Mitte = upper-(dif/2)
UMitte = lower+(dif/4)
elsif info = 1 and Time > endtime then
DrawText("#dif#Punkte",startbar+HL,upper+(delta+HLH+8),SansSerif,Standard,14) coloured(255,255,255)
DrawText("#hh#",startbar+HL,upper+(delta+HLH),SansSerif,Standard,14) coloured(0,255,255)
DrawText("#ll#",startbar+HL,lower-(delta+HLH),SansSerif,Standard,14) coloured(0,255,255)
DrawRectangle(startbar,hh,endbar,ll) coloured(255,255,255,50)bordercolor(0,0,0,0)
endif
return
RazzParticipant
Master
Maybe I didn’t make myself clear, I want to use the low and high of the previous day’s box (upper/lower) is that possible?
The previous day range can be defined this way:
Timeframe(Daily,UpdateOnClose)
HH = high
LL = low
or this way:
HH = Dhigh(1)
LL = Dlow(1)
hen you can use HH as the upper limit and LL as the lower limit.
RazzParticipant
Master
Hello Robertogozzi Unfortunately that is not the solution. I would like to see the high and low of the 09:00-10:00 candle from the previous day, for example. I can achieve this with upper[1] and lower[1] in the above code, but as soon as the box is drawn on today, the display snaps to today’s new value.
Then you have to use this code:
IF Time = 090000 THEN
PrevHH = HH
PrevLL = LL
HH = high
LL = low
ENDIF
IF Time > 090000 AND Time <=100000 THEN
HH = max(HH,high)
LL = min(LL,low)
ENDIF
use PrevHH and PrevLL as the Upper and Lower values of the previous day.
RazzParticipant
Master
Hello Robertogozzi You have been a great help once again Thank you! What would I do without you 😉