Enigme indicateur Relative Strength Rank non fixe

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #120964 quote
    Plscap
    Participant
    Veteran

    Bonjour Nicolas,

    Je me permets de te solliciter car je suis face à une énigme pour ton indicateur Relative Strength Rank. J’ai légèrement modifié ton indicateur afin qu’il soit en Open,

    j’aime quand les indicateurs sont fixes. Généralement une fois en Open les indicateurs ne bougent plus. Et bien la c’est différent, bien que l’indicateur soit en Open

    il bouge et je n’arrive pas du tout à savoir pourquoi et/ou d’ou ça peut venir. Aurais tu une petite idée?
    Je te remercie par avance.
     

    //PRC_Relative Strength Rank | indicator
    //08.07.2019
    //Nicolas @ www.prorealcode.com
    //Sharing ProRealTime knowledge
    
    // --- settings
    //RsrShortPeriod = 20
    //RsrLongPeriod  = 10
    //RsrMaMode      = 0 //MA type
    //AtrPeriod      = 1
    // --- end of settings
    
    price = average[1](open)
    mas   = average[RsrShortPeriod,RsrMaMode](open)
    mal   = average[RsrLongPeriod,RsrMaMode](open)
    atr   = averagetruerange[AtrPeriod](open)
    if (atr<>0) then
    rsr = (price-mas+price-mal)/(2.0*atr)
    else
    rsr = 0
    endif
    
    slope = slope[1]
    if (rsr>rsr[1]) then
    slope =  1
    endif
    if (rsr<rsr[1]) then
    slope = -1
    endif
    
    rsrhuu=0
    if (rsr>0) then
    if slope=1 then
    rsrHuu = rsr
    else
    drawbarchart(0,rsr,0,0) coloured(0,191,255)
    endif
    endif
    
    rsrhdd=0
    if (rsr<0) then
    if (slope=-1) then
    rsrHdd = rsr
    else
    drawbarchart(0,0,rsr,0) coloured(199,21,133)
    endif
    endif
    
    return rsrhuu coloured(0,191,255) , rsrhdd coloured(199,21,133), rsr coloured(150,150,150)
    
    #120975 quote
    Nicolas
    Keymaster
    Master

    En effet, je pense que c’est lié à l’utilisation de l’instruction averagetruerange qui même avec (open) utilise tout de même le Close. Dans ce cas, essayé avec sa valeur précédente:

    atr   = averagetruerange[AtrPeriod][1]
    Plscap thanked this post
    #120977 quote
    Plscap
    Participant
    Veteran

    Super, Ca semble fonctionner.

    Je te remercie Nicolas.

    Cette façon de faire à l’air également de fonctionner

    atr   = averagetruerange[AtrPeriod](open)[1]

    Bon évidemment ça change un peu l’oscillateur, mais en ajustant quelques réglages ça fonctionne.

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

Enigme indicateur Relative Strength Rank non fixe


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
author-avatar
Plscap @flodefacebook Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by Plscap
6 years ago.

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