Bonsoir,
J’ai repris un code utilisé pour l’UT 50 secondes, je souhaite simplement afficher l’open de 8H00,9H00,15h30 et le close de 17H30,22h00
A l’exécution les lignes ne correspondent pas aux heures définies par les variables !!
Je ne comprends pas pourquoi …
Une petite idée ?
Merci !!
//Tracer droite de 08h, de 09h a leur open du jours
// et 17h30 et 22h de la veille a leur cloture
defparam drawonlastbaronly = true
a=080000
b=090000
c=173000
d=220000
e=153000
if (date=today) then
if time=a then
price=open[0]
endif
drawhline(price)coloured(255,0,0)
Drawtext(" Open 8h",barindex[0],price+3*pipsize, sansserif, bold, 10)coloured(255,255,0)
endif
if (date=today) then
if time=b then
price1=open[0]
endif
Drawhline(price1)coloured(255,0,0)
Drawtext(" Open 9h",barindex[0],price1+3*pipsize, sansserif, bold, 10)coloured(255,255,0)
endif
if(date=today) then
if time=e then
price2=open[0]
endif
Drawhline(price2)coloured(255,0,255)
Drawtext(" Open 15h30",barindex[0],price2+3*pipsize, sansserif, bold, 10)coloured(255,255,0)
endif
if(date=yesterday) then
if time=c then
price3=close[0]
endif
endif
if(date=yesterday)then
if time=d then
price4=close[0]
endif
endif
Drawhline(price3)coloured(255,255,0)
Drawtext(" Close 17h30",barindex[0],price3+3*pipsize, sansserif, bold, 10)coloured(255,255,0)
Drawhline(price4)coloured(255,255,0)
Drawtext(" Close 22h30",barindex[0],price4+3*pipsize, sansserif, bold, 10)coloured(255,255,0)
return