Bonjour, ça fait un petit moment que je ne suis pas revenu…
Je voudrais créé une variante des fractales qui prend en compte une partie de ma théorie de Dow également.
Sur un graphique en bougie, je voudrais bien qu’une flèche soit tracé comme les fractales mais lorsque le plus haut de la bougie dépasse les plus hauts des 3 bougies précédentes : flèche verte haussier et inversement pour le bas qui seraient en dessous des 3 dernières flèche rouge baissier.
Cordialement….
Est-ce que c’est ce que vous recherchez…
dist = 10 // distance arrow above or below level
c1 = high < high[1] and high[1] > high[2] // fractal high
c2 = high[1] > high[2] and high[1] > high[3] and high[1] > high[4] // prior high's
c3 = low > low[1] and low[1] < low[2] // fractal low
c4 = low[1] < low[2] and low[1] < low[3] and low[1] < low[4] // prior low's
if c1 and c2 then
drawarrowdown(barindex-1,high[1]+dist) coloured("lime")
endif
if c3 and c4 then
drawarrowup(barindex-1,low[1]-dist) coloured("red")
endif
retur
Bonsoir, il met erreur commande inconnue ligne 1
Lorsque j’ai copié du code, j’ai accidentellement coupé la lettre « n » de la dernière ligne. La dernière ligne doit indiquer « retour ».
dist = 10 // distance arrow above or below level
c1 = high < high[1] and high[1] > high[2] // fractal high
c2 = high[1] > high[2] and high[1] > high[3] and high[1] > high[4] // prior high's
c3 = low > low[1] and low[1] < low[2] // fractal low
c4 = low[1] < low[2] and low[1] < low[3] and low[1] < low[4] // prior low's
if c1 and c2 then
drawarrowdown(barindex-1,high[1]+dist) coloured("lime")
endif
if c3 and c4 then
drawarrowup(barindex-1,low[1]-dist) coloured("red")
endif
return
Salut, j’ai regardé rapidement et il me semble que les flèches sont à l’envers….
dist = 10 // distance arrow above or below level
c1 = high < high[1] and high[1] > high[2] // fractal high
c2 = high[1] > high[2] and high[1] > high[3] and high[1] > high[4] // prior high's
c3 = low > low[1] and low[1] < low[2] // fractal low
c4 = low[1] < low[2] and low[1] < low[3] and low[1] < low[4] // prior low's
if c1 and c2 then
drawarrowup(barindex-1,high[1]+dist) coloured("lime")
endif
if c3 and c4 then
drawarrowdown(barindex-1,low[1]-dist) coloured("red")
endif
return