Signal toutes les 30 bougie

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #141795 quote
    Ichimoku Reading
    Participant
    Master

    Bonjour,

    Je souhaite créer un indicateur simple.
    Malgré la simplicité de celui-ci, je n’arrive pas à concevoir le code correspondant.
    Un signal devrait être donné toutes les 30 bougies.

    Voilà Voilà….

    Merci pour votre aide

    #141796 quote
    Nicolas
    Keymaster
    Master

    Il faut enregistrer dans une variable le moment où tu donnes le signal (son BARINDEX), puis autoriser ou pas l’affichage d’un nouveau signal uniquement si la différence entre le barindex courant et cette variable est supérieure à 30.

    Ichimoku Reading thanked this post
    #141805 quote
    Ichimoku Reading
    Participant
    Master

    Dans ce code, le signal de départ pour le compte à rebours doit être le moment actuel, celui-ci ne dépend pas d’indicateur si ce n’est le close[30] qui au final sera toujours égale à 1

    C’est en effet ce qui me bloque..

    #141806 quote
    Ichimoku Reading
    Participant
    Master
    signal = 0
    
    if signal[30] = 0 then
    signal = 1
    else
    signal = 0
    endif
    
    return signal
    

    Finalement !

    #141807 quote
    Ichimoku Reading
    Participant
    Master

    Merci Nicolas

    Bonne journée

    #141808 quote
    Ichimoku Reading
    Participant
    Master

    Pour donner un signal plutôt qu’un retournement

    S1 = 0
    if S1[30] = 0 then
    S1 = 1
    else
    S1 = 0
    endif
    
    C1 = S1 = 1 and S1[1] = 0
    C2 = S1 = 0 and S1[1] = 1
    Signal = C1 or C2
    
    if Signal then
    S2 = 1
    else
    S2 = 0
    endif
    
    return S2
Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.

Signal toutes les 30 bougie


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
Summary

This topic contains 5 replies,
has 2 voices, and was last updated by Ichimoku Reading
5 years, 6 months ago.

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