Heikin-Ashi(Marteau)

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #73126 quote
    Alai-n
    Participant
    Veteran

    Bonsoir,

    Un petit coup de main serait le bienvenu…

    Celà fait deux semaines que je triture le code ci-joint, afin qu’il me renvoie une information sur une configuration bougiste en Heikin-Ashi!Mais je n’arrive à rien…

    Je n’arrive pas à identifier les 50% du (hahigh – halow)

    Ci-joint le code que je cherche à faire évoluer et une image de ce que je voudrais obtenir.

    Pour simplifier je cherche à obtenir ce que l’on pourrait appeler un Marteau et Marteau inversé sur des chandeliers traditionnels, mais sur du Heikin-Ashi!!!

    Merci

    //Heikin-Ashi Doji | Indicator
    
    //Parameters
    
    DojiSize = 5 //x% percent of body size compared to the complete range of the candlestick
    
    // ---
    
    if barindex>1 then
    haclose=(open+close+low+high)/4
    haopen=(haopen[1]+haclose[1])/2
    xHigh = Max(haOpen, haClose)
    xLow = Min(haOpen, haClose)
    hahigh = Max(High,xHigh)
    halow = Min(Low,xLow)
    endif
    
    Indicateur=(abs(haopen - haclose) <= (hahigh - halow) * DojiSize/100)
    
    RETURN Indicateur
    
    Heikin-Ashi.jpg Heikin-Ashi.jpg
    #73191 quote
    Nicolas
    Keymaster
    Master

    5/100 = 0.05 , soit 5% et non 50%

    Ton problème est lié ? (je n’ai pas testé le code)

    #73194 quote
    Alai-n
    Participant
    Veteran

    Hello, non mon problème n’est pas lié!(Ce code c’est toi qui l’a écrit si mes souvenirs sont bons et il renvoie des “Doji”)

    Mon problème actuel est sur la formulation Heikin-Ashi pour identifier le point median de la bougie.

    Cad 50% entre le High et le Low! Je n’arrive pas à écrire cette ligne!!!

    #73197 quote
    Nicolas
    Keymaster
    Master

    Le point médian c’est pas simplement (hahigh+halow)/2 ?

    #73200 quote
    Alai-n
    Participant
    Veteran

    Je vais essayer comme cela! Jusqu’à présent je faisais(hahigh-halow)/2

    Merci

    #73677 quote
    Alai-n
    Participant
    Veteran

    Salut Nicolas,

    Mon problème subsiste! Cette formulation de code ne me renvoie rien du tout!!!

    if barindex>1 then
    haclose=(open+close+low+high)/4
    haopen=(haopen[1]+haclose[1])/2
    xHigh = Max(haOpen, haClose)
    xLow = Min(haOpen, haClose)
    hahigh = Max(High,xHigh)
    halow = Min(Low,xLow)
    ENDIF
    
    if (haopen>haclose) and haclose> (hahigh+halow)/2 THEN
    Indicateur = 1
    ENDIF
    
    
    RETURN Indicateur
    
    #73773 quote
    Nicolas
    Keymaster
    Master

    Ta variable “indicateur” restera bloqué à 1 si tu ne la renseignes pas avec une autre valeur, donc soit tu fais:

    if barindex>1 then
    haclose=(open+close+low+high)/4
    haopen=(haopen[1]+haclose[1])/2
    xHigh = Max(haOpen, haClose)
    xLow = Min(haOpen, haClose)
    hahigh = Max(High,xHigh)
    halow = Min(Low,xLow)
    ENDIF
    
    if (haopen>haclose) and haclose> (hahigh+halow)/2 THEN
    Indicateur = 1
    else
    indicateur=0
    ENDIF
    
    
    RETURN Indicateur

    ou tu la remplis à chaque barre avec une condition booléenne, soit 0=faux ou 1=vrai.

    if barindex>1 then
    haclose=(open+close+low+high)/4
    haopen=(haopen[1]+haclose[1])/2
    xHigh = Max(haOpen, haClose)
    xLow = Min(haOpen, haClose)
    hahigh = Max(High,xHigh)
    halow = Min(Low,xLow)
    ENDIF
    
    indicateur= (haopen>haclose) and haclose> (hahigh+halow)/2 THEN
    
    RETURN Indicateur

    Les variables booléennes, un des chapitres de la formation pour débuter la programmation.

    Alai-n thanked this post
    #73877 quote
    Alai-n
    Participant
    Veteran

    Merci Nicolas pour les différentes formulations! Je vais me re-pencher sur la formation…

    Je ne doute pas cependant que je serai amené à poser une autre question stupide, d’ici peu 😉

    Encore merci, bonne journée.

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.

Heikin-Ashi(Marteau)


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
author-avatar
Alai-n @alai-n Participant
Summary

This topic contains 7 replies,
has 2 voices, and was last updated by Alai-n
7 years, 8 months ago.

Topic Details
Forum: ProBuilder : Indicateurs & Outils Personnalisés
Language: French
Started: 06/13/2018
Status: Active
Attachments: 1 files
Logo Logo
Loading...