La Représentation Heikin Ashi : Les Codes
Forums › ProRealTime forum Français › Support ProBuilder › La Représentation Heikin Ashi : Les Codes
- This topic has 7 replies, 3 voices, and was last updated 7 years ago by finplus.
-
-
01/01/2017 at 8:08 PM #19586
Bonsoir, sur le blog “hk lisse”(d’ailleurs, je ne sais pas s’il est toujours animé mais alors techniquement cela vaut le détour), j’ai trouvé ce code Heikin Ashi. je voulais l’essayer sauf que quand je l’importe dans prorealtime il me détecte une erreur au niveau de la 13ème ligne (ça bloque devant le terme “period”. Quelqu’un pourrait il m’aider SVP? Merci d’avance.
//////////////// indicateur heikin simple //////////////
once haopen=open
haclose=(open+close+high+low)/4
if barindex> 0 then
haopen=(haopen+haclose[1])/2
endif
halow=min(low,min(haclose,haopen))
hahigh=max(high,max(haclose,haopen))
return haopen,haclose,hahigh,halow
//////////////// indicateur heikin tillson /////////////////
period=3
price=close
vfactor=.7
x1=(exponentialaverage[period](price))*(1+vfactor)
x2=(exponentialaverage[period](exponentialaverage[period](price)))*vfactor
gd=x1-x2
x11=(exponentialaverage[period](gd))*(1+vfactor)
x21=(exponentialaverage[period](exponentialaverage[period](gd)))*vfactor
gd1=x11-x21
x12=(exponentialaverage[period](gd1))*(1+vfactor)
x22=(exponentialaverage[period](exponentialaverage[period](gd1)))*vfactor
gd2=x12-x22once haopen=open
haclose=gd2
if barindex> 12 then
haopen=(haopen+haclose[1])/2
endif
halow=min(low,min(haopen,haclose))
hahigh=max(high,max(haopen,haclose))
return haopen,haclose,hahigh,halow///////////////////// indicateur heikin kama /////////////////
p=2
ONCE ama = UNDEFINED
signal = ABS(MOMENTUM[p])
noise = SUMMATION[p](ABS(MOMENTUM[1]))
IF noise>0 THEN
er = signal / noise
ELSE
er=1
ENDIF
fastsc = 2 / (2+ 1)
slowsc = 2 / (20 + 1)
factor = SQUARE(er * (fastsc – slowsc) + slowsc)
IF BARINDEX = p THEN
ama = CLOSE
ELSIF BARINDEX > p THEN
ama = ama + factor * (CLOSE – ama)
ENDIFonce haopen=open
haclose=ama
if barindex> 12 then
haopen=(haopen+haclose[1])/2
endif
halow=min(low,min(haopen,haclose))
hahigh=max(high,max(haopen,haclose))
return haopen,haclose,hahigh,halowPuis de nouveau, je crée 3 indicateurs pour dessiner les bougies en Heikin Ashi : 1. la mèche basse, 2. la mèche haute et 3. le corps de la bougie.
////////////////// indicateur mèche basse heikin /////////////
haopen,haclose,ignored,bas = CALL “heikin tillson”
c2=min(haopen,haclose)
r=abs(c2-bas)
r=(r)/29
b1=bas
c=1
b2=b1+r
b3=b2+r
b4=b3+r
b5=b4+r
b6=b5+r
b7=b6+r
b8=b7+r
b9=b8+r
b10=b9+r
b11=b10+r
b12=b11+r
b13=b12+r
b14=b13+r
b15=b14+r
b16=b15+r
b17=b16+r
b18=b17+r
b19=b18+r
b20=b19+r
b21=b20+r
b22=b21+r
b23=b22+r
b24=b23+r
b25=b24+r
b26=b25+r
b27=b26+r
b28=b27+r
b29=b28+r
b30=b29+rreturn b1 coloured by c,b2 coloured by c,b3 coloured by c,b4 coloured by c,b5 coloured by c,b6 coloured by c,b7 coloured by c,b8 coloured by c,b9 coloured by c,b10 coloured by c,b11 coloured by c,b12 coloured by c,b13 coloured by c,b14 coloured by c,b15 coloured by c,b16 coloured by c,b17 coloured by c,b18 coloured by c,b19 coloured by c,b20 coloured by c,b21 coloured by c,b22 coloured by c,b23 coloured by c,b24 coloured by c,b25 coloured by c,b26 coloured by c,b27 coloured by c,b28 coloured by c,b29 coloured by c,b30 coloured by c
///////////////////////// indicateur mèche haute heikin /////////////////////
haopen,haclose,haut,ignored = CALL “heikin tillson”
c2=max(haopen,haclose)
r=abs(haut-c2)
r=(r)/29
b1=c2
c=1
b2=b1+r
b3=b2+r
b4=b3+r
b5=b4+r
b6=b5+r
b7=b6+r
b8=b7+r
b9=b8+r
b10=b9+r
b11=b10+r
b12=b11+r
b13=b12+r
b14=b13+r
b15=b14+r
b16=b15+r
b17=b16+r
b18=b17+r
b19=b18+r
b20=b19+r
b21=b20+r
b22=b21+r
b23=b22+r
b24=b23+r
b25=b24+r
b26=b25+r
b27=b26+r
b28=b27+r
b29=b28+r
b30=b29+rreturn b1 coloured by c,b2 coloured by c,b3 coloured by c,b4 coloured by c,b5 coloured by c,b6 coloured by c,b7 coloured by c,b8 coloured by c,b9 coloured by c,b10 coloured by c,b11 coloured by c,b12 coloured by c,b13 coloured by c,b14 coloured by c,b15 coloured by c,b16 coloured by c,b17 coloured by c,b18 coloured by c,b19 coloured by c,b20 coloured by c,b21 coloured by c,b22 coloured by c,b23 coloured by c,b24 coloured by c,b25 coloured by c,b26 coloured by c,b27 coloured by c,b28 coloured by c,b29 coloured by c,b30 coloured by c
//////////////////// indicateur corps heikin ///////////////
haopen,haclose,ignored,ignored = CALL “heikin tillson”
c1=(haopen<haclose)
if c1 then
c=1
else
c=-1
endif
r=abs(haopen-haclose)
r=(r)/29
if haopen<haclose then
b1=haopen
else
b1=haclose
endif
b2=b1+r
b3=b2+r
b4=b3+r
b5=b4+r
b6=b5+r
b7=b6+r
b8=b7+r
b9=b8+r
b10=b9+r
b11=b10+r
b12=b11+r
b13=b12+r
b14=b13+r
b15=b14+r
b16=b15+r
b17=b16+r
b18=b17+r
b19=b18+r
b20=b19+r
b21=b20+r
b22=b21+r
b23=b22+r
b24=b23+r
b25=b24+r
b26=b25+r
b27=b26+r
b28=b27+r
b29=b28+r
b30=b29+rreturn b1 coloured by c,b2 coloured by c,b3 coloured by c,b4 coloured by c,b5 coloured by c,b6 coloured by c,b7 coloured by c,b8 coloured by c,b9 coloured by c,b10 coloured by c,b11 coloured by c,b12 coloured by c,b13 coloured by c,b14 coloured by c,b15 coloured by c,b16 coloured by c,b17 coloured by c,b18 coloured by c,b19 coloured by c,b20 coloured by c,b21 coloured by c,b22 coloured by c,b23 coloured by c,b24 coloured by c,b25 coloured by c,b26 coloured by c,b27 coloured by c,b28 coloured by c,b29 coloured by c,b30 coloured by cHe
01/01/2017 at 8:24 PM #19588Bonsoir,
En fait tu as plusieurs codes Heikin et non un seul, la fin de chaque code se terminant par la ligne commencant par return
le premier code est
//////////////// indicateur heikin simple ////////////// once haopen=open haclose=(open+close+high+low)/4 if barindex> 0 then haopen=(haopen+haclose[1])/2 endif halow=min(low,min(haclose,haopen)) hahigh=max(high,max(haclose,haopen)) return haopen,haclose,hahigh,halow
et ainsi de suite
Cordialement
01/02/2017 at 11:12 AM #19616> Pour la clarté des messages sur les forums de ProRealCode, merci d’utiliser le bouton “insert PRT code” pour séparer la partie texte de la partie code, merci ! <<
Les codes de ces représentations Heikin Ashi sont utiles pour peindre soit même dans une fenêtre différente de celle du prix ce type de bougie, c’est en effet un tour de force de HK LISSE !
Dans la nouvelle version 10.3, grâce à l’utilisation de DRAWCANDLE, on peut fabriquer soit même ses propres bougies (voir vidéo par exemple: dessiner des chandeliers japonais)
Pour obtenir les graphiques du prix en représentation Heikin Ashi, il suffit simplement de le choisir dans la fenêtre du prix.
01/02/2017 at 7:06 PM #19646Merci Nicolas et Zen83 pour vos réponses. Il me semblait que les lignes de code présentées étaient légèrement différentes du Heikin Ashi de Prorealtime que j’utilise d’ailleurs. Apparemment, les lignes de codes que j’ai prises sur HK LISSE permettent de supprimer quelques faux signaux.
Et toutes mes excuses pour n’avoir pas utilisé le bouton “insert PRT code”.
01/02/2017 at 7:26 PM #1964701/02/2017 at 7:52 PM #19652Le problème est que tu as copié/collé un ensemble de codes de plusieurs indicateurs dans la même fenêtre de programmation probuilder. Pour les scinder, c’est simple, chaque code d’indicateur se termine par une ligne “RETURN”.
01/02/2017 at 8:04 PM #1965501/02/2017 at 8:27 PM #19656 -
AuthorPosts
Find exclusive trading pro-tools on