Quantite = 1
Count = 0
PHaut = Highest[1](High)
PBas = Lowest[1](low)
Cloture = Close
Ouverture = Open
// Plus haut de la derniere bougie //
If PHaut then
$PHaut[lastset($PHaut)+1] = Barindex
if isset($PHaut[1]) then
for i = lastset($PHaut) downto 1 do
offset = barindex - PHaut[i]
Drawtext ("H",barindex[i], PHaut[i])
Count = Count+1
if Count = Quantite then
Break
Endif
Next
Endif
Endif
// Plus bas de la derniere bougie //
if PBas then
$PBas[lastset($PBas)+1] = Barindex
if isset($PBas[1]) then
for i = lastset($PBas) downto 1 do
offset = barindex - PBas[i]
Drawtext ("B",barindex[i], PBas[i])
Count = Count+1
if Count = Quantite then
Break
Endif
Next
Endif
Endif
// Cloture de la derniere bougie //
If Cloture then
$Cloture[lastset($Cloture)+1] = Barindex
if isset($Cloture[1]) then
for i = lastset($Cloture) downto 1 do
offset = barindex - Cloture[i]
Drawtext ("C",barindex[i], close[i])
Count = Count+1
if Count = Quantite then
Break
Endif
Next
Endif
Endif
// Ouverture de la derniere bougie //
If Open then
$Open[lastset($Open)+1] = Barindex
if isset($Open[1]) then
for i = lastset($Open) downto 1 do
offset = barindex - Open[i]
Drawtext ("H",barindex[i], open[i])
Count = Count+1
if Count = Quantite then
Break
Endif
Next
Endif
Endif
Return PHaut, PBas, Cloture, Ouverture