Heikin-Ashi Doji

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

    Bonjour,

    Un petit coup de main serait grandement apprécié…

    J’utilise le code ci-dessous pour détecter les Doji sur Heikin-Ashi. “Segments blanc  sur le graphique”!

    J’aimerai pouvoir déclencher des “Alertes” avec cet indicateur, ce qui n’est pas possible avec la seule fonction segment. Je souhaiterai donc rajouter une fonction (+1) dans une fenêtre indicateur.

    J’ai beau rajouter l’instruction “Indicateur = 1″…rien n’y fait!!!

    Si quelqu’un avait 2 minutes à me consacrer, ce serait vraiment sympa…

    //Doji Heikin-Ashi | Indicator
    
    once start=0
    
    
    // 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)
    
    if indicateur then
    start=1
    startbar=barindex
    startprice=haclose
    endif
    
    if start=1 then
    drawsegment(startbar,startprice,barindex,startprice)
    endif
    
    Return
    
    Doji-HA.jpg Doji-HA.jpg
    #71244 quote
    Nicolas
    Keymaster
    Master

    Puisque “startbar” est le moment où le doji est repéré, il suffirait de tester si  startbar a changé depuis la dernière bougie:

    test = startbar<>startbar[1]
    
    return test

    La variable “test” est une booléenne qui retournera 1 si vrai.

    #71245 quote
    Alai-n
    Participant
    Veteran

    Merci beaucoup Nicolas.

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

Heikin-Ashi Doji


ProBuilder : Indicateurs & Outils Personnalisés

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

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

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