Indicateur de moyenne des gaps quotidiens à l'aide de tableaux

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #129029 quote
    bobmarley
    Participant
    New

    BONJOUR, je cherche à avoir un indicateur sur le marché action qui indiquerait le % moyen des X derniers gaps journaliers. Et de l’avoir sur le graphique avec une ligne.

    X étant la période qui serai modifiable.

    Je suis totalement débutant au code, si une âme charitable veut bien m’aider, je suis preneur.

    Cordialement.

    #129039 quote
    Vonasi
    Moderator
    Master

    Bienvenue sur les Forums. Vous avez posté en français sur les forums anglais, j’ai donc déplacé votre question sur le forum français. Veuillez publier uniquement dans la langue du forum que vous utilisez. Vous avez également posé votre question dans le sujet du tableau. je pense que c’est mieux comme un sujet séparé, donc je l’ai séparé de là.

    #129087 quote
    Vonasi
    Moderator
    Master

    Voici. Il calcule la moyenne de tous les gaps et la moyenne des gaps à la hausse et des gaps à la baisse.
    Utiliser sur v11 seulement évidemment.

    p = 10 //average period
    
    once avggap = undefined
    once avggapup = undefined
    once avggapdown = undefined
    
    if open <> close[1] then
    a = a + 1
    $gap[a] = abs(open-close[1])
    
    if open > close[1] then
    b = b + 1
    $gapup[b] = open - close[1]
    endif
    
    if open < close[1] then
    c = c + 1
    $gapdown[c] = close[1] - open
    endif
    endif
    
    if a > p then
    total = 0
    for d = a downto a-p
    total = total + $gap[d]
    next
    avggap = total/p
    endif
    
    if b > p then
    total = 0
    for d = b downto b-p
    total = total + $gapup[d]
    next
    avggapup = total/p
    endif
    
    if c > p then
    total = 0
    for d = c downto c-p
    total = total + $gapdown[d]
    next
    avggapdown = total/p
    endif
    
    return avggap coloured(0,0,128) as "average gap" , avggapup coloured(0,128,0) as "average gap up", avggapdown coloured(128,0,0) as "average gap down"
    #129088 quote
    Vonasi
    Moderator
    Master

    Certainement un peu plus d’gap sur le Dow Jones récemment!

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

Indicateur de moyenne des gaps quotidiens à l'aide de tableaux


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
author-avatar
bobmarley @bobmarley Participant
Summary

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

Topic Details
Forum: ProBuilder : Indicateurs & Outils Personnalisés
Language: French
Started: 04/30/2020
Status: Active
Attachments: 1 files
Logo Logo
Loading...