Bonjour
quelqu’un pourrait il m’aider pour la création de l affichage de la formule suivante sur les prix:
haut -2 <haut-1>haut 0 et bas -2 <bas-1>bas 0
haut -2 <haut-1>haut 0 et bas -2 <bas-1>bas 0 et cloture 0 <=bas-2
par avance merci
et inversement pour les pivots bas
haut -2 > haut-1<haut 0 et bas -2 >bas-1<bas 0
haut -2 >haut-1<haut 0 et bas -2 >bas-1<bas 0 et cloture 0 >=haut-1
Ci-dessous le code de ton premier post sur les pivots hauts, à modifier pour les pivots bas, c’est très simple 🙂
//haut -2 <haut-1>haut 0 et bas -2 <bas-1>bas 0
hh1 = high[2]<high[1] and high[1]>high[0] and low[2]<low[1] and low[1]>low[0]
if hh1 then
drawpoint(barindex[1],high[1]) coloured("lightgreen")
endif
//haut -2 <haut-1>haut 0 et bas -2 <bas-1>bas 0 et cloture 0 <=bas-2
hh2 = high[2]<high[1] and high[1]>high[0] and low[2]<low[1] and low[1]>low[0] and close<=high[2]
if hh2 then
drawarrowdown(barindex,high) coloured("green")
endif
return
Merci, je pensais pas que saurait ete aussi simple, je croyais qu’il fallait utiliser une boucle.
Bonjour,
J’ai effectué les modifications concernant le “Pivot bas”.
Merci aussi à TheBaron 😉
J’ai un doute sur ma ligne 8.
Peux-tu me confirmer que cela te semble ok stp ?
//haut -2 >haut-1<haut 0 et bas -2 >bas-1<bas 0
hh1 = high[2]>high[1] and high[1]<high[0] and low[2]>low[1] and low[1]<low[0]
if hh1 then
drawpoint(barindex[1],low[1]) coloured("lightgreen")
endif
//haut -2 >haut-1<haut 0 et bas -2 >bas-1<bas 0 et cloture 0 >=bas-2
hh2 = high[2]>high[1] and high[1]<high[0] and low[2]>low[1] and low[1]<low[0] and close>=high[2]
if hh2 then
drawarrowup(barindex,low-15*pipsize) coloured("red")
endif
return
Aussi, dans le code énoncé “Pivot Haut”.
Toujours en ligne 8 tu transcris ceci : cloture 0 <=bas-2
par ceci dans le code “close<=high[2]”
Je ne comprends pas. Est-ce correct ?
Peux-tu me renseigner sur les 2 questions stp ?
voila ma modif
//haut -2 <haut-1>haut 0 et bas -2 <bas-1>bas 0
hh1 = high[2]<high[1] and high[1]>high[0] and low[2]<low[1] and low[1]>low[0]
if hh1 then
drawpoint(barindex[1],high[1]) coloured(“green”)
endif
//haut -2 <haut-1>haut 0 et bas -2 <bas-1>bas 0 et cloture 0 <=bas-2
hh2 = high[2]<high[1] and high[1]>high[0] and low[2]<low[1] and low[1]>low[0] and close<=low[1]
if hh2 then
drawarrowdown(barindex,high) coloured(“green”)
endif
ll1 = high[2]>high[1] and high[1]<high[0] and low[2]>low[1] and low[1]<low[0]
if ll1 then
drawpoint(barindex[1],low[1]) coloured(“red”)
endif
ll2 = high[2]>high[1] and high[1]<high[0] and low[2]>low[1] and low[1]<low[0] and close>=high[1]
if ll2 then
drawarrowup(barindex,low) coloured(“red”)
endif
return
OK merci à toi pour le partage.