Je me permet de poser 2 codes supplémentaires concernant les markets sessions :
Celui là qui permet de séparer le week-end et les overnight :
if opendayofweek=5 and opentime>=190000 then
backgroundcolor(255,0,0,120)
endif
if opentime<080000 then
backgroundcolor(0,0,0,40)
endif
return
Reste à savoir comment colorer le dimanche
Et celui là qui permet d’identifier les sessions (cf site doctrading) :
//SESSION ASIATIQUE
debut1 = 000000
fin1 = 080000
If time = debut1 then
haut1 = 0
bas1 = 0
barredebut1 = barindex
endif
if time = fin1 then
barrefin1 = barindex
endif
IF time >= debut1 AND time <= fin1 THEN
IF high > haut1 THEN
haut1 = high
ENDIF
IF low < bas1 OR time = debut1 THEN
bas1 = low
ENDIF
ENDIF
IF time >= fin1 THEN
DRAWRECTANGLE(barredebut1,haut1,barrefin1,bas1) coloured(30,30,255)
drawtext("session asiatique",barredebut1,haut1+2*pipsize)coloured(0,0,0)
ENDIF
//SESSION EUROPE
debut2 = 080000
fin2 = 170000
If time = debut2 then
haut2 = 0
bas2 = 0
barredebut2 = barindex
endif
if time = fin2 then
barrefin2 = barindex
endif
IF time >= debut2 AND time <= fin2 THEN
IF high > haut2 THEN
haut2 = high
ENDIF
IF low < bas2 OR time = debut2 THEN
bas2 = low
ENDIF
ENDIF
IF time >= fin2 THEN
DRAWRECTANGLE(barredebut2,haut2,barrefin2,bas2) coloured(240,210,60)
drawtext("session europe",barredebut2,haut2+2*pipsize)coloured(0,0,0)
ENDIF
//SESSION US
debut3 = 153000
fin3 = 210000
If time = debut3 then
haut3 = 0
bas3 = 0
barredebut3 = barindex
endif
if time = fin3 then
barrefin3 = barindex
endif
IF time >= debut3 AND time <= fin3 THEN
IF high > haut3 THEN
haut3 = high
ENDIF
IF low < bas3 OR time = debut3 THEN
bas3 = low
ENDIF
ENDIF
IF time >= fin3 THEN
DRAWRECTANGLE(barredebut3,haut3,barrefin3,bas3) coloured(255,0,0)
drawtext("session us",barredebut3,haut3+2*pipsize)coloured(0,0,0)
ENDIF
return
Je me suis permis de rajouter du texte (Ça sert à rien – je me suis frisé !)
A+