kaufman MA average with ATR bands

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #182282 quote
    Ybr35
    Participant
    Junior

    Bonjour à tous,

    J’ai trouvé& sur la bibliothèque la moyenne mobile adaptative de Kaufman, et je souhaiterais faire apparaître autour de cette moyenne deux bandes distante de 1 ATR (14) pour la bande supérieure et -1 ATR (14) pour la bande inférieure.

    Pensez-vous qu’il soit possible de coder un tel indicateur? Merci d’avance pour vos retours.

    Yann

    KA_MA_ATRbands.jpg KA_MA_ATRbands.jpg
    #182290 quote
    JC_Bywan
    Moderator
    Master

    Bonsoir,

    En partant de ce post de Nicolas dans la library:

    Kaufman Adaptive Moving Average KAMA

    et en y ajoutant la demande de bandes de +/- ATR14:

    // parameters :
    Period = 10
    FastPeriod = 2
    SlowPeriod = 30
     
    Fastest = 2 / (FastPeriod + 1)
    Slowest = 2 / (SlowPeriod + 1)
    if barindex < Period+1 then
     Kama=close
    else
     Num = abs(close-close[Period])
     Den = summation[Period](abs(close-close[1]))
     ER = Num / Den
     Alpha = SQUARE(ER *(Fastest - Slowest )+ Slowest)
     KAMA = (Alpha * Close) + ((1 -Alpha)* Kama[1])
    endif
    BandeSup=KAMA+AverageTrueRange[14](close)
    BandeInf=KAMA-AverageTrueRange[14](close)
    
    return kama as "kama", BandeSup as "BandeSup", BandeInf as "BandeInf"
    #182292 quote
    Ybr35
    Participant
    Junior

    Parfait, merci beaucoup!

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

kaufman MA average with ATR bands


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
author-avatar
Ybr35 @ybr35 Participant
Summary

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

Topic Details
Forum: ProBuilder : Indicateurs & Outils Personnalisés
Language: French
Started: 11/25/2021
Status: Active
Attachments: 1 files
Logo Logo
Loading...