Aide Code : changement d’état de variable=n/d

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #235657 quote
    RicLgRicLg
    Participant
    Senior

    Bonjour
    Comment identifier le changement d’état d’une variable lorsque
    variable = n/d    =undefined?          print(variable)
    Je voudrai juste récupérer le BarIndex lors du 1er changement d’état.
    Merci pour vos aides.
    Bien à Vous

    #235668 quote
    RicLgRicLg
    Participant
    Senior

    Re-bonjour
    Pour compléter ma demande, voici le code et une image-jointe.
    Je souhaite obtenir le barIndex du 8 novembre 2022.

    Merci de nouveau.
    Bien à Vous.

    periode1 = 100
    Mb2 = Average[periode1](close[5])
    lengthRSI   = 75 
    lengthStoch = 75 
    rem --
    myRSI = RSI[lengthRSI](Mb2)                    
    MinRSI = lowest[lengthStoch](myRSI)
    MaxRSI = highest[lengthStoch](myRSI)
    StochRSI = (myRSI-MinRSI) / (MaxRSI-MinRSI)
    print ( StochRSI)
    
    return  StochRSI as "StochRSI"
    img1.png img1.png
    #235674 quote
    RicLgRicLg
    Participant
    Senior

    Je complète de nouveau.

    Lorsque je passe en UT 2 jours

    Je suis dans cette situation, et j’aimerai obtenir le barIndex du 6 juin 2023 (voir img1a).

    Merci

    Bien à vous

    img1a.png img1a.png
    #235677 quote
    Iván GonzálezIván González
    Moderator
    Legend
    periode1 = 100
    Mb2 = Average[periode1](close[5])
    lengthRSI   = 75
    lengthStoch = 75
    rem --
    myRSI = RSI[lengthRSI](Mb2)
    MinRSI = lowest[lengthStoch](myRSI)
    MaxRSI = highest[lengthStoch](myRSI)
    StochRSI = (myRSI-MinRSI) / (MaxRSI-MinRSI)
    
    if stochRSI>=0  then
    else
    bar=barindex
    endif
    print bar
    
    return  StochRSI as "StochRSI"
    #235696 quote
    RicLgRicLg
    Participant
    Senior

    J’ai ajouté un bout de code pour identifier le barIndex concerné (img2)
    Merci Iván pour le solution.

     

    periode1 = 100
    Mb2 = Average[periode1](close[5])
    lengthRSI   = 75
    lengthStoch = 75
    rem --
    myRSI = RSI[lengthRSI](Mb2)
    MinRSI = lowest[lengthStoch](myRSI)
    MaxRSI = highest[lengthStoch](myRSI)
    StochRSI = (myRSI-MinRSI) / (MaxRSI-MinRSI)
     
    if stochRSI>=0  then
    else
    stochRSI=0
    endif
    rem -----------------------------------
    rem BarIndex du 1er changement d’état
    if StochRSI>0 and StochRSI[1]=0  then     
    bar=barIndex
    endif
    DRAWVLINE(bar) style(DOTTEDLINE4 ,2)
     
    return  StochRSI as "StochRSI"
    img2.png img2.png
Viewing 5 posts - 1 through 5 (of 5 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

Aide Code : changement d’état de variable=n/d


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
author-avatar
RicLg @riclg Participant
Summary

This topic contains 4 replies,
has 2 voices, and was last updated by RicLgRicLg
2 years, 2 months ago.

Topic Details
Forum: ProBuilder : Indicateurs & Outils Personnalisés
Language: French
Started: 07/23/2024
Status: Active
Attachments: 3 files
ProRealCode ProRealCode
Loading...