macd unité mensuelle

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #171170 quote
    taxi207
    Participant
    New

    bonjour à tous,

    je m’appelle xavier.

    je suis utilisateur de prorealtime depuis plusieurs années.

    je suis complétement débutant en codage.

    j’avais trouvé sur le net le code permettant d’afficher la macd hebdo en vue journalière:

     

    /////////////// MACD unité hebdomadaire //////////////
    once m2=close
    once m1=close
    a=2/20
    b=2/10
    c=2/7
    if dayofweek<dayofweek[1] then
    m2=a*close[1]+(1-a)*m2
    m1=b*close[1]+(1-b)*m1
    dif1=m1-m2
    mdif=c*dif1+(1-c)*mdif
    zz=zz+1
    endif
    mm2=a*close+(1-a)*m2
    mm1=b*close+(1-b)*m1
    dif=mm1-mm2
    mmdif=c*dif+(1-c)*mdif
    macdhebdo=dif-mmdif
    ligne1=dif
    ligne2=mmdif
    if zz<19 then
    macdhebdo=undefined
    ligne1=undefined
    ligne2=undefined
    endif
    return macdhebdo,ligne1 coloured by ligne1-dif1,ligne2 coloured by ligne2-mdif,0

     

     

    j’aimerai pouvoir visualiser la macd mensuelle en journalier également.

     

    quelqu’un serait-il capable de modifier ce code afin de l’adapter un macd mensuelle??

     

    d’avance merci.

    xavier

    #171368 quote
    Nicolas
    Keymaster
    Master

    Avec la gestion multi timeframe dans les indicateurs, on peut simplement coder la MACD mensuel comme ceci :

    timeframe(monthly)
    imacd=MACD[12,26,9](close)
    imacdline=MACDline[12,26,9](close)
    imacdsignal=MACDSignal[12,26,9](close)
    
    return imacd,imacdline,imacdsignal
    #171593 quote
    taxi207
    Participant
    New

    MERCI NICOLAS!!

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

macd unité mensuelle


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
author-avatar
taxi207 @taxi207 Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by taxi207
4 years, 9 months ago.

Topic Details
Forum: ProBuilder : Indicateurs & Outils Personnalisés
Language: French
Started: 06/04/2021
Status: Active
Attachments: No files
Logo Logo
Loading...