Code Pour Calcul RSI SVP (RSI6) ?

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #250039 quote
    umrkumrk
    Participant
    New

    Bonjour, je me suis aperçu que Pro Real Time ne donnait pas ma même valeur de RSI6 que celle que j’avais calculée. J’ai découvert que le RSI de PRT utilise la moyenne lissée de Wilder, la mienne la moyenne simple. Mon algo est basé sur la moyenne simple, pas celle de Wilder !. j’aimerais donc (si possible) qu’une bonne âme me donne la programmation d’un RSI6 basé sur la moyenne simple. Merci !

    #250040 quote
    JSJS
    Participant
    Master

    Salut,

    Voici le calcul du RSI où vous pouvez choisir parmi neuf moyennes différentes…

    N=6 //LookBack Period
    
    MAType=0 //0=SMA, 1=EMA, 2=WMA, 3=Wilder, 4=Triangular, 5=EndPoint, 6=TimeSeries, 7=Hull, 8=ZeroLag
    
    Up=MAX(0,Close-Close[1])
    Down=MAX(0,Close[1]-Close)
    
    AvgUp=Average[N,MAType](Up)
    AvgDown=Average[N,MAType](Down)
    
    RS=AvgUp/AvgDown
    
    myRSI=100-100/(1+RS)
    
    Return myRSI as "Relative Strength Index", 20,40,60,80
    umrk, robertogozzi and Iván González thanked this post
    #250041 quote
    GraHalGraHal
    Participant
    Master

    Simple –  RSI[14](fermer)
    Wilder – RSI[14,3](fermer)

    umrk and Iván González thanked this post
    #250042 quote
    umrkumrk
    Participant
    New

    Merci ! toujours présent, JS !

    J’en profite pour corriger une petite erreur dans NPSEUDODAYS : dans la ligne qui suit c’est 1900 et pas 1901 !)

    NPSEUDODAYS=(TheYear-1900)*365+CorrectBissext+DaysOfPreviousMonths+TheDay

     

    (moyennant quoi, si ce code est utilisé dans 400, il sera encore bon !)

    JS thanked this post
    #250043 quote
    JSJS
    Participant
    Master

    @GraHal
    Je ne pense pas que cela fonctionne avec le RSI standard…

    GraHal and Iván González thanked this post
    #250063 quote
    Iván GonzálezIván González
    Moderator
    Legend

    Notez que cela donne une erreur : myrsi=rsi[14,3](close)

    GraHal thanked this post
    2025-08-26_08-39.png 2025-08-26_08-39.png
    #250074 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Simple – RSI[14](fermer)

             Wilder – RSI[14,3](fermer) Par défaut, RSI ne permet pas de modifier le type de moyenne utilisé. Modifiez simplement la variable MAtype à la ligne 3 du code de JS pour choisir le type de moyenne approprié:
    MAType=0 //0=SMA, 1=EMA, 2=WMA, 3=Wilder, 4=Triangular, 5=EndPoint, 6=TimeSeries, 7=Hull, 8=ZeroLag
    umrk and Iván González thanked this post
Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.
ProRealAI ProRealAI New

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

Code Pour Calcul RSI SVP (RSI6) ?


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
author-avatar
umrk @umrk Participant
Summary

This topic contains 6 replies,
has 5 voices, and was last updated by robertogozzirobertogozzi
1 year ago.

Topic Details
Forum: ProBuilder : Indicateurs & Outils Personnalisés
Language: French
Started: 08/25/2025
Status: Active
Attachments: 1 files
ProRealCode ProRealCode
Loading...