C'est une des manières de le faire.
A vous d'en inventer d'autre.
V1.0
Code : #
//Affichage des lignes 00/25/50/100 à +/- 200 autour du DHigh de la veille
centaine = round(DHigh(1)/100) * 100
lp1 = centaine + 25
lp2 = centaine + 50
lp3 = centaine + 75
lp4 = centaine + 100
lp5 = centaine + 125
lp6 = centaine + 150
lp7 = centaine + 175
lp8 = centaine + 200
lm1 = centaine - 25
lm2 = centaine - 50
lm3 = centaine - 75
lm4 = centaine - 100
lm5 = centaine - 125
lm6 = centaine - 150
lm7 = centaine - 175
lm8 = centaine - 200
return centaine, lp1, lp2, lp3, lp4, lp5, lp6, lp7, lp8, lm1, lm2, lm3, lm4, lm5, lm6, lm7, lm8
Deux variables booléen pour afficher et/ou masque les 25 et 00.
calcul de la centaine par DHigh de la veille + la moitié du range de la veille.
Code : #
//Affichage des ligne 00/25/50/100 à +/- 200 autour du DHigh de la veille
//1.2 Mardi 22 Avril 2014
//Définir deux varaiables
//zero, booleen
//vingtcinq, booleen
if intradaybarindex = 1 then
milieu = DHigh(1) - ((DHigh(1)-Dlow(1))/2)
centaine = round(milieu/100) * 100
if zero then
lp2 = centaine + 50
lp4 = centaine + 100
lp6 = centaine + 150
lp8 = centaine + 200
lm2 = centaine - 50
lm4 = centaine - 100
lm6 = centaine - 150
lm8 = centaine - 200
else
lp2 = undefined
lp4 = undefined
lp6 = undefined
lp8 = undefined
lm2 = undefined
lm4 = undefined
lm6 = undefined
lm8 = undefined
endif
if vingtcinq then
lp1 = centaine + 25
lp3 = centaine + 75
lp5 = centaine + 125
lp7 = centaine + 175
lm1 = centaine - 25
lm3 = centaine - 75
lm5 = centaine - 125
lm7 = centaine - 175
else
lp1 = undefined
lp3 = undefined
lp5 = undefined
lp7 = undefined
lm1 = undefined
lm3 = undefined
lm5 = undefined
lm7 = undefined
endif
endif
if not zero and not vingtcinq then
centaine = undefined
endif
return centaine, lp1, lp2, lp3, lp4, lp5, lp6, lp7, lp8, lm1, lm2, lm3, lm4, lm5, lm6, lm7, lm8
Vous rentrer la centaine qui va centrer les lignes paramètres.
Code : #
//Affichage des ligne 00/25/50/100 à +/- 200 autour du DHigh de la veille
//v1.2 Mardi 22 Avril 2014
//nouvelle version sans calcul automatique, basé sur la V1.2
//Définir deux varaiables
//zero, booleen
//vingtcinq, booleen
//centaine, decimale
if intradaybarindex = 1 then
centaine = round(centaine / 100)*100
if zero then
lp2 = centaine + 50
lp4 = centaine + 100
lp6 = centaine + 150
lp8 = centaine + 200
lm2 = centaine - 50
lm4 = centaine - 100
lm6 = centaine - 150
lm8 = centaine - 200
else
lp2 = undefined
lp4 = undefined
lp6 = undefined
lp8 = undefined
lm2 = undefined
lm4 = undefined
lm6 = undefined
lm8 = undefined
endif
if vingtcinq then
lp1 = centaine + 25
lp3 = centaine + 75
lp5 = centaine + 125
lp7 = centaine + 175
lm1 = centaine - 25
lm3 = centaine - 75
lm5 = centaine - 125
lm7 = centaine - 175
else
lp1 = undefined
lp3 = undefined
lp5 = undefined
lp7 = undefined
lm1 = undefined
lm3 = undefined
lm5 = undefined
lm7 = undefined
endif
endif
if not zero and not vingtcinq then
centaine = undefined
endif
return centaine, lp1, lp2, lp3, lp4, lp5, lp6, lp7, lp8, lm1, lm2, lm3, lm4, lm5, lm6, lm7, lm8