//round number to nearest upper 25
roundnumber = 50
for i = 1 to roundnumber do
if (close+i*pointsize) mod roundnumber*pointsize = 0 then
upper = round(close+i*pointsize)
if upper mod roundnumber = 1 then
upper = upper-1
endif
break
endif
next
for i = roundnumber downto 1 do
if (close-i*pointsize) mod roundnumber*pointsize = 0 then
lower = round(close-i*pointsize)
if lower mod roundnumber = 1 then
lower = lower-1
endif
break
endif
next
for i = 1 to roundnumber do
if (upper+i*pointsize) mod roundnumber*pointsize = 0 then
upper1 = round(upper+i*pointsize)
if upper1 mod roundnumber = 1 then
upper1 = upper1-1
endif
break
endif
next
for i = roundnumber downto 1 do
if (lower-i*pointsize) mod roundnumber*pointsize = 0 then
lower1 = round(lower-i*pointsize)
if lower1 mod roundnumber = 1 then
lower1 = lower1-1
endif
break
endif
next
return upper, lower, upper1, lower1