Pour référence, je pose le code original ici:
defparam calculateonlastbars = 80
ALPHAfond=50
AlphaPivotsIntermediaires=50
AlphaPivotsPrincipaux=50
if opentime=153000 then
drawvline(barindex) style (DOTTEDline,1) COLOURED(153,153,153,AlphaPivotsIntermediaires)
endif
if opentime=153500 then
drawvline(barindex) style (DOTTEDline,1) COLOURED(153,153,153,AlphaPivotsIntermediaires)
endif
if opentime=155000 then
drawvline(barindex)style (DOTTEDline,1) COLOURED(204,0,0, AlphaPivotsPrincipaux)
endif
if opentime=161000 then
drawvline(barindex)style (DOTTEDline,1) COLOURED(204,0,0, AlphaPivotsPrincipaux)
endif
if opentime=162500 then
drawvline(barindex)style (DOTTEDline,1) COLOURED(153,153,153,AlphaPivotsIntermediaires)
endif
if opentime=163500 then
drawvline(barindex)style (DOTTEDline,1) COLOURED(153,153,153,AlphaPivotsIntermediaires)
endif
if opentime=171500 then
drawvline(barindex)style (DOTTEDline,1) COLOURED(204,0,0, AlphaPivotsPrincipaux)
endif
if opentime=180000 then
drawvline(barindex)style (DOTTEDline,1) COLOURED(153,153,153,AlphaPivotsIntermediaires)
endif
if opentime=184500 then
drawvline(barindex)style (DOTTEDline,1) COLOURED(153,153,153,AlphaPivotsIntermediaires)
endif
if opentime=193000 then
drawvline(barindex)style (DOTTEDline,1) COLOURED(204,0,0, AlphaPivotsPrincipaux)
endif
if opentime=201500 then
drawvline(barindex)style (DOTTEDline,1) COLOURED(204,0,0, AlphaPivotsPrincipaux)
endif
if opentime=210000 then
drawvline(barindex)style (DOTTEDline,1) COLOURED(204,0,0, AlphaPivotsPrincipaux)
endif
if opentime=213000 then
drawvline(barindex)style (DOTTEDline,1) COLOURED(153,153,153,AlphaPivotsIntermediaires)
endif
if opentime=220000 then
drawvline(barindex) style (DOTTEDline,2) COLOURED(153,153,153,AlphaPivotsIntermediaires)
endif
if opentime >= 162500 AND opentime =< 163500 then
backgroundcolor(0,204,102,ALPHAfond)
endif
if opentime >= 155000 AND opentime =< 161000 then
backgroundcolor(0,204,102,ALPHAfond)
endif
if opentime >= 180000 AND opentime =< 180500 then
backgroundcolor(0,204,102,ALPHAfond)
endif
if opentime >= 193000 AND opentime =< 193500 then
backgroundcolor(0,204,102,ALPHAfond)
endif
RETURN
Il n’y a pas de solution “fiable” pour savoir si la bougie courante est contenu sur le graphique d”aujourd’hui”.
La solution adapté à ton code, c’est de tout recoder en enregistrant toutes les informations des chandeliers où il faut tracer les lignes, et ne les tracer qu’une seule fois lors de la lecture de la bougie courante. Voir mon prochain post.