This code comes from Larry Williams and spots, on statistical base, the historical most ranging day of the week.
Blue skies!!
//val=(100*(close-open)/open)
val=100*range/open
//monday
if DayOfWeek=1 then
mon=mon+val
monct=1
else
mon=0
monct=0
endif
//tuesday
if DayOfWeek=2 then
tue=tue+val
tuect=1
else
tue=0
tuect=0
endif
//wednesday
if DayOfWeek=3 then
wed=wed+val
wedct=1
else
wed=0
wedct=0
endif
//thursday
if DayOfWeek=4 then
thu=thu+val
thuct=1
else
thu=0
thuct=0
endif
//friday
if DayOfWeek=5 then
fri=fri+val
frict=1
else
fri=0
frict=0
endif
monres=summation[p](mon[1])/summation[p](monct[1])
tueres=summation[p](tue[1])/summation[p](tuect[1])
wedres=summation[p](wed[1])/summation[p](wedct[1])
thures=summation[p](thu[1])/summation[p](thuct[1])
frires=summation[p](fri[1])/summation[p](frict[1])
return monres coloured (255,0,0) as "Mo", tueres coloured (255,153,0) as "Tu", wedres coloured (0,210,0) as "We", thures coloured (0,0,255) as "Th", frires coloured (153,0,153) as "Fr"