defparam drawonlastbaronly=false
//roundnumber = 50
//EpDeLaZone=2.5//faire varier en fonction de l'unité de temps
pipsval=EpDeLaZone
a=0
for i = 1 to roundnumber do
if (close+i*pointsize) mod roundnumber = 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=0 to P do
$haut[i]=high
$bas[i]=low
$ouv[i]=open
$ferm[i]=close
if $haut[i]<=upper+pipsval and $haut[i]>=upper-pipsval then
a=a+1
DRAWTEXT("⌖", barindex,high, Dialog, bold, 10) COLOURED(0, 0, 0)
//DRAWTEXT("#a#", barindex,high, Dialog, bold, 20) COLOURED(0, 0, 0)
endif
if $bas[i]<=upper+pipsval and $bas[i]>=upper-pipsval then
a=a+1
DRAWTEXT("⌖", barindex,low, Dialog, bold, 10) COLOURED(0, 0, 0)
//DRAWTEXT("#a#", barindex,low, Dialog, bold, 20) COLOURED(0, 0, 0)
endif
if $ouv[i]<=upper+pipsval and $ouv[i]>=upper-pipsval then
a=a+1
DRAWTEXT("⌖", barindex,open, Dialog, bold, 10) COLOURED(0, 0, 0)
endif
if $ferm[i]<=upper+pipsval and $ferm[i]>=upper-pipsval then
a=a+1
DRAWTEXT("⌖", barindex,close, Dialog, bold, 10) COLOURED(0, 0, 0)
endif
if $haut[i]<=lower+pipsval and $haut[i]>=lower-pipsval then
a=a+1
DRAWTEXT("⌖", barindex,high, Dialog, bold, 10) COLOURED(0, 0, 0)
//DRAWTEXT("#a#", barindex,high, Dialog, bold, 20) COLOURED(0, 0, 0)
endif
if $bas[i]<=lower+pipsval and $bas[i]>=lower-pipsval then
a=a+1
DRAWTEXT("⌖", barindex,low, Dialog, bold, 10) COLOURED(0, 0, 0)
//DRAWTEXT("#a#", barindex,low, Dialog, bold, 20) COLOURED(0, 0, 0)
endif
if $ouv[i]<=lower+pipsval and $ouv[i]>=lower-pipsval then
a=a+1
DRAWTEXT("⌖", barindex,open, Dialog, bold, 10) COLOURED(0, 0, 0)
endif
if $ferm[i]<=lower+pipsval and $ferm[i]>=lower-pipsval then
a=a+1
DRAWTEXT("⌖", barindex,close, Dialog, bold, 10) COLOURED(0, 0, 0)
endif
i=i+1
NEXT
//DRAWTEXT("Nb= #a#", barindex+15,upper, Dialog, bold, 10) COLOURED(255, 0, 0)
drawrectangle(barindex,upper-PipsVal,barindex[10],upper+PipsVal)coloured(0,180,0,50)bordercolor(0,180,0,50)
drawrectangle(barindex,lower-PipsVal,barindex[10],lower+PipsVal)coloured(255,0,0,50)bordercolor(255,0,0,50)
return