Pour retourner le prix d'un indicateur, existe-t-il un code pour la "Taille de la valeur sur l'axe des prix"?
(Je n'ai pas trouvé U_u)
Par avance, merci,
Code : #
if intradaybarindex = 0 then
milieu = DHigh(0) - ((DHigh(0)-Dlow(0))/2)
c1 = round(milieu/100) * 100
c2 = c1
i=0
while c2 MOD 500 <> 0 AND i < 5 do
c2 = c2 + 100
i=i+1
wend
if c1 MOD 500 = 0 then
//LVL500 autour de c1
res500c1 = c1
//LVL500 après c1
res500p1 = c1 + 500
//LVL500 avant c1
res500m1 = c1 - 500
res100p1 = c1 + 100
res100p2 = c1 + 200
res100p3 = c1 + 300
res100p4 = c1 + 400
res100m1 = c1 - 100
res100m2 = c1 - 200
res100m3 = c1 - 300
res100m4 = c1 - 400
//ci-dessus : OK
else
//LVL500 autour de c1
res500c1 = c2 - 500
//LVL500 après c1
res500p1 = c2
//LVL500 avant c1
res500m1 = c1 - (10-i)*100
//ci-dessus : OK
//i = 4 pour 12100 et c2 = 12500 // ici i peut être compris entre 1 & 4
//i = 1 pour *400 ou 900 : OK
if i = 1 then
res100p1 = c1
res100p2 = c1 + 200
res100p3 = c1 + 300
res100p4 = c1 + 400
res100m1 = c1 - 100
res100m2 = c1 - 200
res100m3 = c1 - 300
res100m4 = c1 - 500
//i = 2 pour *300 ou 800 : OK
elsif i = 2 then
res100p1 = c1
res100p2 = c1 + 100
res100p3 = c1 + 300
res100p4 = c1 + 400
res100m1 = c1 - 100
res100m2 = c1 - 200
res100m3 = c1 - 400
res100m4 = c1 - 500
//i = 3 pour *200 ou 700 : OK
elsif i = 3 then
res100p1 = c1
res100p2 = c1 + 100
res100p3 = c1 + 200
res100p4 = c1 + 400
res100m1 = c1 - 100
res100m2 = c1 - 300
res100m3 = c1 - 400
res100m4 = c1 - 500
//i = 4 pour *100 ou 600 : OK
elsif i = 4 then
res100p1 = c1
res100p2 = c1 + 100
res100p3 = c1 + 200
res100p4 = c1 + 300
res100m1 = c1 - 200
res100m2 = c1 - 300
res100m3 = c1 - 400
res100m4 = c1 - 500
endif
endif
res50p1 = c1 + 50
res50p2 = c1 + 150
res50p3 = c1 + 250
res50p4 = c1 + 350
res50p5 = c1 + 450
res50m1 = c1 - 50
res50m2 = c1 - 150
res50m3 = c1 - 250
res50m4 = c1 - 350
res50m5 = c1 - 450
res25p1 = c1 + 25
res25p2 = c1 + 75
res25p3 = c1 + 125
res25p4 = c1 + 175
res25m1 = c1 - 25
res25m2 = c1 - 75
res25m3 = c1 - 125
res25m4 = c1 - 175
res12p1 = c1 + 12.5
res12p2 = c1 + 37.5
res12p3 = c1 + 62.5
res12p4 = c1 + 87.5
res12p5 = c1 + 112.5
res12p6 = c1 + 137.5
res12p7 = c1 + 162.5
res12p8 = c1 + 187.5
res12m1 = c1 - 12.5
res12m2 = c1 - 37.5
res12m3 = c1 - 62.5
res12m4 = c1 - 87.5
res12m5 = c1 - 112.5
res12m6 = c1 - 137.5
res12m7 = c1 - 162.5
res12m8 = c1 - 187.5
endif
return res500c1 coloured(0,0,255) STYLE(line,3) as "res500", res500p1 coloured(0,0,255) STYLE(line,3) as "res500p1", res500m1 coloured(0,0,255) STYLE(line,3) as "res500m1", res100p1 coloured(0,0,255) STYLE(line,2) as "res100p1", res100p2 coloured(0,0,255) STYLE(line,2) as "res100p2", res100p3 coloured(0,0,255) STYLE(line,2) as "res100p3", res100p4 coloured(0,0,255) STYLE(line,2) as "res100p4", res100m1 coloured(0,0,255) STYLE(line,2)as "res100m1", res100m2 coloured(0,0,255) STYLE(line,2) as "res100m2", res100m3 coloured(0,0,255) STYLE(line,2) as "res100m3", res100m4 coloured(0,0,255) STYLE(line,2) as "res100m4", res50p1 coloured(0,0,255) STYLE(line,2) as "res50p1", res50p2 coloured(0,0,255) STYLE(line,2) as "res50p2", res50p3 coloured(0,0,255) STYLE(line,2) as "res50p3", res50p4 coloured(0,0,255) STYLE(line,2) as "res50p4", res50p5 coloured(0,0,255) STYLE(line,2) as "res50p5", res50m1 coloured(0,0,255) STYLE(line,2) as "res50m1", res50m2 coloured(0,0,255) STYLE(line,2) as "res50m2", res50m3 coloured(0,0,255) STYLE(line,2) as "res50m3", res50m4 coloured(0,0,255) STYLE(line,2) as "res50m4", res50m5 coloured(0,0,255) STYLE(line,2) as "res50m5", res25p1 coloured(0,0,255) as "res25p1", res25p2 coloured(0,0,255) as "res25p2", res25p3 coloured(0,0,255) as "res25p3", res25p4 coloured(0,0,255) as "res25p4", res25m1 coloured(0,0,255) as "res25m1", res25m2 coloured(0,0,255) as "res25m2", res25m3 coloured(0,0,255) as "res25m3", res25m4 coloured(0,0,255) as "res25m4", res12p1 coloured(0,0,255) STYLE(dottedline,1) as "res12p1", res12p2 coloured(0,0,255) STYLE(dottedline,1) as "res12p2", res12p3 coloured(0,0,255) STYLE(dottedline,1) as "res12p3", res12p4 coloured(0,0,255) STYLE(dottedline,1) as "res12p4", res12p5 coloured(0,0,255) STYLE(dottedline,1) as "res12p5", res12p6 coloured(0,0,255) STYLE(dottedline,1) as "res12p6", res12p7 coloured(0,0,255) STYLE(dottedline,1) as "res12p7", res12p8 coloured(0,0,255) STYLE(dottedline,1)as "res12p8", res12m1 coloured(0,0,255) STYLE(dottedline,1) as "res12m1", res12m2 coloured(0,0,255) STYLE(dottedline,1) as "res12m2", res12m3 coloured(0,0,255) STYLE(dottedline,1) as "res12m3", res12m4 coloured(0,0,255) STYLE(dottedline,1) as "res12m4", res12m5 coloured(0,0,255) STYLE(dottedline,1) as "res12m5", res12m6 coloured(0,0,255) STYLE(dottedline,1) as "res12m6", res12m7 coloured(0,0,255) STYLE(dottedline,1)as "res12m7", res12m8 coloured(0,0,255) STYLE(dottedline,1) as "res12m8"