Bonjour,
dans le programme ci-joint, (ligne 13) je ne comprends pas que les valeurs chiffrées ne s’affichent pas.
J’obtiens #Close – Low[i]#
Pourtant dans d’autres programmes, cela fonctionne bien.
Où est mon erreur ?
Merci
Cond60 = Close[12] > Open[12]
Cond30 = Close[6] > Open[6]
Cond15 = Close[3] > Open[3]
Cond5 = Close > Open
CondHeure = Time = 080500 or Time = 090500 or Time = 100500 or Time = 110500 or Time = 120500 or Time = 130500 or Time = 140500 or Time = 150500 or Time = 160500 or Time = 120500 or Time = 180500
If Cond60 and Cond30 and Cond15 and Cond5 and CondHeure then
DRAWCANDLE(open, high, low, close)coloured(0,0,0)
For i = 1 to 10 do
If Low[1]> Low[i-1] and Low [i] < Low[i+1] then
DRAWPOINT(barindex, Low[i],1)coloured(255,0,0)
DrawPoint(BarIndex,2*close-Low[i],1)coloured(0,255,0)
DrawText("#Close - Low[i]#",barindex,Low[i],Dialog,Bold,15)coloured(255,0,0)
DrawPoint(barindex,(3*close-Low[i])/2,1)coloured(0,0,200)
break
endif
next
endif
return
#Close – Low[i]# n’est pas une valeur, mais un calcul, hors DRAWTEXT ne fait pas de calcul, il affiche simplement un texte issu de la valeur, donc il faut délocaliser ce calcul dans une variable au préalable:
var = Close – Low[i]
DrawText("#var#",barindex,Low[i],Dialog,Bold,15)coloured(255,0,0)