Croisement de deux RSI

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #152475 quote
    JorisJoris
    Participant
    Junior

    Bonjour,

    Cela semble super simple mais quelque chose m’échappe.

    En effet, lorsque je souhaite créer un indicateur qui :

    • met un fond vert quand mon rsi 14 est au dessus de mon rsi 21
    • Met un fond rouge quand mon rsi 14 est au dessous de mon rsi 21

    Pour cela j’ai fait ceci :

    //indicateur
    RSI14= RSI[RSI1](close)
    RSI21= RSI[RSI2] (close)
    
    //conditions acheteuse
    c1 = (RSI14 > RSI21)
    
    //condition vendeuse
    c2 = (RSI14 < RSI21)
    
    //fond couleur
    if c1 then
    BACKGROUNDCOLOR (100,200, 50,30) //couleur du fond haussie
    endif
    if c2 then
    BACKGROUNDCOLOR (201,84, 99, 50) //couleur du fond baissier
    endif
    return

    et voici le résultat sur mon rsi  (photo jointe)

    Comme vous le remarquerait le fond rouge est présent alors que les rsi ne se sont pas croisé et pas moyen de comprendre cette logique

     

    Merci pour votre aide

    croisement-rsi-14-et-21.png croisement-rsi-14-et-21.png
    #152481 quote
    NicolasNicolas
    Keymaster
    Legend

    Tout fonctionne correctement pour ma part, j’ai un peu modifié le code pour visualiser le RSI 14 ici en jaune.

    //indicateur
    RSI14= RSI[14](close)
    RSI21= RSI[21] (close)
    
    //conditions acheteuse
    c1 = (RSI14 > RSI21)
    
    //condition vendeuse
    c2 = (RSI14 < RSI21)
    
    //fond couleur
    if c1 then
    BACKGROUNDCOLOR (100,200, 50,30) //couleur du fond haussie
    endif
    if c2 then
    BACKGROUNDCOLOR (201,84, 99, 50) //couleur du fond baissier
    endif
    return rsi14 coloured(200,200,0),rsi21

    Tu es certain d’utiliser les bonnes périodes d’indicateurs sur ton graphique ?

    RSI-background-color.png RSI-background-color.png
    #152492 quote
    JorisJoris
    Participant
    Junior

    Je crois que j’ai compris

    J’appliqué cet indicateur dans mon indicateur rsi 14 déjà ouvert. Il ne devait pas aimer ça.

    Merci en tout cas

    croisement-rsi-14-et-21.PNG-2.png croisement-rsi-14-et-21.PNG-2.png
Viewing 3 posts - 1 through 3 (of 3 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

Croisement de deux RSI


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
author-avatar
Joris @616248 Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by JorisJoris
5 years, 9 months ago.

Topic Details
Forum: ProBuilder : Indicateurs & Outils Personnalisés
Language: French
Started: 12/03/2020
Status: Active
Attachments: 3 files
ProRealCode ProRealCode
Loading...