Détection Heikin Ashi sans mèche inférieure

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #123816 quote
    henri95
    Participant
    Average

    Bonjour,

    Je n’arrive pas à programmer un Proscreener qui me semble pourtant hyper simple.

    C’est:

    Détection du premier chandelier  qui apparaît en Heikin Ashi avec un corps blanc et sans mèche inférieure.

    Je suis en données journalière. Donc c’est pour la dernière journée, c’est à dire la dernière bougie. Ci joint un exemple.

    Quelque chose doit m’échapper. Merci pour l’aide et prenez soin de vous.

    Sans-titre.png Sans-titre.png
    #123872 quote
    Nicolas
    Keymaster
    Master

    Le screener ci-dessous détectera la première bougie Heikin Ashi haussière avec une autre baissière, avec un “cul plat” (Low = Open).

    xClose = (open+high+low+close)/4
    IF BarIndex=0 THEN
    xOpen = open
    //xHigh = high
    xLow = low
    ELSe
    xOpen = (xOpen[1] + xClose[1])/2
    //xHigh = Max(Max(high, xOpen), xClose)
    xLow = Min(Min(low, xOpen), xClose)
    ENDIF
    
    test = xclose>xopen and xclose[1]<xopen[1] and xopen=xlow
    
    screener[test]
    #123910 quote
    henri95
    Participant
    Average

    Ca marche nickel! Merci

    #123930 quote
    henri95
    Participant
    Average

    Re bonjour,

    Comment fait-on le contraire? C’est à dire Bougie noire sans mèche supérieure précédée de bougies blanches?

    Désolé vraiment nul en programmation. Ce n’est pas mon métier 🙂

    #123950 quote
    Nicolas
    Keymaster
    Master

    La logique est la même et se situe dans cette ligne :

    test = xclose>xopen and xclose[1]<xopen[1] and xopen=xlow

    Littéralement, la fermeture est supérieure à l’ouverture (donc bougie haussière), inversement pour la bougie précédente [1], et l’ouverture est égale au plus bas de la bougie (fond plat).

    Donc l’inverse donne :

    test = xclose<xopen and xclose[1]>xopen[1] and xopen=xhigh
    #124003 quote
    henri95
    Participant
    Average

    OK cool merci.

    #166152 quote
    Guibourse
    Participant
    Average

    Est-ce que cela serait possible de détecter cette première absence de mèche inférieure (et supérieure)  quand elle concerne Heikin smoothed ? Je pense au Code suivant :

    //PRC_HPT Heikin Ashi Smoothed | indicator
    //25.04.2017
    //Nicolas @ www.prorealcode.com
    //Sharing ProRealTime knowledge
    //translated from MT4 indicator code
    
    //---settings
    //MaPeriod=6
    //MaPeriod2=2
    //---end of settings
    
    
    once maOpen=Open
    once maClose=Close
    once maLow=Low
    once maHigh=High
    
    if barindex>0 then
    maOpen=(maOpen[1]*(MAperiod-1)+Open)/MAPeriod
    maClose=(maClose[1]*(MAperiod-1)+Close)/MAPeriod
    maLow=(maLow[1]*(MAperiod-1)+Low)/MAPeriod
    maHigh=(maHigh[1]*(MAperiod-1)+High)/MAPeriod
    
    haOpen=(ExtMapBuffer5[1]+ExtMapBuffer6[1])/2
    haClose=(maOpen+maHigh+maLow+maClose)/4
    haHigh=Max(maHigh, Max(haOpen, haClose))
    haLow=Min(maLow, Min(haOpen, haClose))
    if (haOpen<haClose) then
    r=0
    g=191
    b=255
    ExtMapBuffer7=haLow
    ExtMapBuffer8=haHigh
    else
    r=255
    g=10
    b=0
    ExtMapBuffer7=haHigh
    ExtMapBuffer8=haLow
    endif
    ExtMapBuffer5=haOpen
    ExtMapBuffer6=haClose
    
    ExtMapBuffer1=weightedaverage[MAperiod2](ExtMapBuffer7)
    ExtMapBuffer2=weightedaverage[MAperiod2](ExtMapBuffer8)
    ExtMapBuffer3=weightedaverage[MAperiod2](ExtMapBuffer5)
    ExtMapBuffer4=weightedaverage[MAperiod2](ExtMapBuffer6)
    endif
    DRAWCANDLE(ExtMapBuffer3,ExtMapBuffer2,ExtMapBuffer1,ExtMapBuffer4) coloured(r,g,b)
    
    short = ExtMapBuffer7[1]>ExtMapBuffer8[1] and ExtMapBuffer7[2]<ExtMapBuffer8[2] and ExtMapBuffer7[0]>ExtMapBuffer8[0]
    long = ExtMapBuffer7[1]<ExtMapBuffer8[1] and ExtMapBuffer7[2]>ExtMapBuffer8[2] and ExtMapBuffer7[0]<ExtMapBuffer8[0]
    
    RETURN long as "long signal", short as "short signal"
    

    Merci !

    #166235 quote
    Nicolas
    Keymaster
    Master

    Le screener ci-dessous détecte la première bougie ayant un “cul plat” (absence de mèche) dans une tendance haussière ou baissière matérialisé par ce lissage de bougies Heikin Ashi :

    //PRC_HPT Heikin Ashi Smoothed | indicator
    //25.04.2017
    //Nicolas @ www.prorealcode.com
    //Sharing ProRealTime knowledge
    //translated from MT4 indicator code
    
    //---settings
    MaPeriod=6
    MaPeriod2=2
    //---end of settings
    
    
    once maOpen=Open
    once maClose=Close
    once maLow=Low
    once maHigh=High
    
    if barindex>0 then
    maOpen=(maOpen[1]*(MAperiod-1)+Open)/MAPeriod
    maClose=(maClose[1]*(MAperiod-1)+Close)/MAPeriod
    maLow=(maLow[1]*(MAperiod-1)+Low)/MAPeriod
    maHigh=(maHigh[1]*(MAperiod-1)+High)/MAPeriod
    
    haOpen=(ExtMapBuffer5[1]+ExtMapBuffer6[1])/2
    haClose=(maOpen+maHigh+maLow+maClose)/4
    haHigh=Max(maHigh, Max(haOpen, haClose))
    haLow=Min(maLow, Min(haOpen, haClose))
    if (haOpen<haClose) then
    ExtMapBuffer7=haLow
    //ExtMapBuffer8=haHigh
    else
    ExtMapBuffer7=haHigh
    //ExtMapBuffer8=haLow
    endif
    ExtMapBuffer5=haOpen
    ExtMapBuffer6=haClose
    
    a1=weightedaverage[MAperiod2](ExtMapBuffer7)
    //a2=weightedaverage[MAperiod2](ExtMapBuffer8)
    oo=weightedaverage[MAperiod2](ExtMapBuffer5)
    cc=weightedaverage[MAperiod2](ExtMapBuffer6)
    endif
    
    green = cc>oo and a1=oo and a1[1]<oo[1]
    red = cc<oo and a1=oo and a1[1]>oo[1]
    
    screener[green or red]
    
    
    
    Guibourse thanked this post
Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.

Détection Heikin Ashi sans mèche inférieure


ProScreener : Scanners de Marché & Détection

New Reply
Author
author-avatar
henri95 @henri95 Participant
Summary

This topic contains 7 replies,
has 2 voices, and was last updated by Nicolas
4 years, 11 months ago.

Topic Details
Forum: ProScreener : Scanners de Marché & Détection
Language: French
Started: 03/29/2020
Status: Active
Attachments: 1 files
Logo Logo
Loading...