Commencer un indicateur qui utilise son propre passé

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #150881 quote
    BenCDBenCD
    Participant
    Average

    Bonjour à tous,

    J’ai une petite question qui me semble toute bête,

    J’aimerai créer un indicateur mais je n’arrive pas à le “commencer”,

    L’indicateur serait =

    X=X[1]+Close
    
    Return X as "X"
    

    Je comprends bien qu’il bloque car alors qu’il n’est même pas créé, je lui demande d’utiliser son passé,

    Il y a  t il un moyen de lui dire “X1=2” par exemple et ensuite “X=X[1]+Close”

    Merci à tous,

    #150882 quote
    BenCDBenCD
    Participant
    Average

    Je suis sincèrement désolé, je suis allé trop vite, j’ai mal “nommé” le sujet…

    Je n’arrive pas à trouver comment l’éditer!

    /////////////

    EDIT : C’est bon!

    #150911 quote
    NicolasNicolas
    Keymaster
    Legend

    Il faut s’assurer qu’il y ai suffisamment d’historique pour qu’il puisse faire référence à sa valeur précédente, dans ce cas on teste le barindex:

    if barindex>1 then 
     X=X[1]+Close
    endif 
    
    Return X as "X"
    BenCD thanked this post
    #150920 quote
    BenCDBenCD
    Participant
    Average

    Une fois de plus, c’est parfait!

    Merci pour ton aide! 🙂

Viewing 4 posts - 1 through 4 (of 4 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

Commencer un indicateur qui utilise son propre passé


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
author-avatar
BenCD @bencd Participant
Summary

This topic contains 3 replies,
has 2 voices, and was last updated by BenCDBenCD
5 years, 10 months ago.

Topic Details
Forum: ProBuilder : Indicateurs & Outils Personnalisés
Language: French
Started: 11/18/2020
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...