Formule de Exponentialaverage

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #233684 quote
    Quino
    Participant
    Average

    Bonjour,

    Quelle est la formule littérale de l’instruction “Exponentialaverage ” utilisée dans prorealtime ?

    Merci

    #233687 quote
    druby
    Participant
    New

    SMA = average[10]   =  (close)

    SMA = average[10,0](close)

    Ema = average[10,1](close)

    https://www.prorealcode.com/documentation/average/

     

     

    defparam drawonlastbaronly = true
    
    
    
    if barindex > 30 then
    
    
    // average!
    EMA1 = average[20,1](close)
    
    
    //ExponentialAverage!
    EMA2 = ExponentialAverage[20](close)
    
    
    
    // calculated ema
    n = 20                                   // lookback
    k = 2 / (n + 1 )                         // constant
    ema = close[0] * k + ema[1] * ( 1 - k )  // 'close'
                  
    
    drawtext( "EMA1:  #EMA1#",0,0)anchor(middle,xshift,yshift)coloured("yellow")
    drawtext( "EMA2:  #EMA2#",0,-20)anchor(middle,xshift,yshift)coloured("red")
    drawtext( "ema  :  #EMA#",0,-40)anchor(middle,xshift,yshift)coloured ("Green")
    endif
    
    
    return /*
    */       EMA1 coloured("yellow")style(line,5) /*
    */     , EMA2 coloured("red") style(dottedline,3)  /*
    */     , ema coloured ("Green") style(line,3)
    
    
    /**/
    Iván González thanked this post
    #233702 quote
    Quino
    Participant
    Average

    Merci Druby.

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

Formule de Exponentialaverage


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
author-avatar
Quino @quino Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by Quino
1 year, 8 months ago.

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