Modification RSI pour supprimer son échelle

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

    Bonjour

    J’aimerais savoir comment je pourrai créer un RSI ne se basant pas sur une échelle de 0 à 100.

    Voilà je voudrais reprendre le concept du RSI en gardant sa formule de calcule avec une application à la clôture tout en pouvant modifier le nombre de période et en gardant la date et supprimer l’échelle de 0 à 100

    Cela est-il possible ?

    *j’ai essayé de manipuler le code et j’arrive à modifier l’échelle mais pas à la supprimer complètement

     

    Merci d’avance pour l’aide

     

    MIKE

    #153896 quote
    robertogozzi
    Moderator
    Master

    Le voici, décochez la case ScaleEnabled pour désactiver l’échelle:

    // RSI custom  (with & without scale)
    //
    // (https://www.prorealcode.com/topic/indicatore-rsi/#post-51250)
    // (https://www.investopedia.com/terms/r/rsi.asp)
    //
    // p      = 14                          //periods
    p         = max(1,min(p,999))           //1 - 999
    Ob        = 70                          //OverBought
    Os        = 100 - Ob                    //OverSold
    Middle    = 50                          //mean line
    //
    r         = 0
    g         = 0
    b         = 255
    t         = 255
    //
    Bullish   = MAX(0, CLOSE - CLOSE[1])
    Bearish   = MAX(0, CLOSE[1] - CLOSE)
    //
    mmBullish = WILDERAVERAGE[p](Bullish)
    mmBearish = WILDERAVERAGE[p](Bearish)
    //
    RS        = mmBullish / mmBearish
    IF ScaleEnabled THEN
       myRSI  = 100 - (100 / (1 + RS))     //scale
    ELSE
       MyRSI  = RS                       //no scale
       t      = 0
       Ob     = MyRSI
       Os     = MyRSI
       Middle = MyRSI
    ENDIF
    //
    RETURN MyRSI AS "Rsi",Os coloured(r,g,b,t) AS "Os",Ob coloured(r,g,b,t) AS "Ob", Middle coloured(r,g,b,t) as "Mid"
    Nicolas and icharttop thanked this post
    RSI-with-without-scale.itf
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

Modification RSI pour supprimer son échelle


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
author-avatar
Mike @miki57 Participant
Summary

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

Topic Details
Forum: ProBuilder : Indicateurs & Outils Personnalisés
Language: French
Started: 12/16/2020
Status: Active
Attachments: 1 files
Logo Logo
Loading...