Recoder lindicateur RSI

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #125948 quote
    Krome72
    Participant
    New

    Bonjour,

    pour l exercice j’ai tenté de recoder l’indicateur RSI, mais je ne trouve pas la meme courbe sur le RSI de PRT.

    voici mon code:

    sommeHausse = 0
    sommeBaisse = 0
    
    
    FOR i=0  TO periode  DO
    
    cloture = close[i]
    clotureVeille = close[i+1]
    IF clotureVeille < cloture THEN
    difHausse = cloture - clotureVeille
    sommeHausse = sommeHausse + (difHausse)
    
    ELSE
    difBaisse = clotureVeille - cloture
    sommeBaisse = sommeBaisse + (clotureVeille - cloture)
    
    ENDIF
    
    NEXT
    
    moyenneHausse = sommeHausse/ periode
    moyenneBaisse = sommeBaisse/ periode
    
    monRSI = 100 - (100 /( 1 + (moyenneHausse/ moyenneBaisse )))
    return monRSI
    

    J’aimerais savoir ou est mon erreur.

    Cordialement

    #125950 quote
    Nicolas
    Keymaster
    Master

    C’est normal, la moyenne n’est pas arithmétique comme tu l’as fait, c’est une moyenne de type Wilder (dérivé d’une EMA), voir ce code:

    https://www.prorealcode.com/topic/indicatore-rsi/#post-51250

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

Recoder lindicateur RSI


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
author-avatar
Krome72 @krome72 Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by Nicolas
5 years, 10 months ago.

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