Recherche de Maximums locaux

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

    Bonjour.

    J’aimerais trouver les maximums locaux des cours de clôture depuis la BarIndex 0 jusqu’à la dernière.

    par exemple : [8, 9, 10, 9, 8, 10, 11, 8, 6, 12, 15, 8, 7] me donne [10, 11, 15]

    Autre question : Comment peut -on savoir que le programme est arrivé à la dernière BarIndex avant qu’il ne se termine ?

    Par avance merci.

    #232908 quote
    Iván González
    Moderator
    Master

    Bonjour, vous pouvez définir un tableau qui enregistre les maximums barre par barre puis utiliser ArraySort($high, ASCEND) . Concernant la deuxième question, pour cela il y a la fonction IsLastBarUpdate qui renvoie la valeur 1 lorsque l'on est dans la dernière bougie.

    #232914 quote
    RICO74320
    Participant
    New

    Bonjour et Merci à vous. je regarde cela et vous envoie le code quand ça fonctionnera …

    #232984 quote
    RICO74320
    Participant
    New

    Bonjour, voici un petit module qui calcul et affiche sur la courbe prix les maximum et minimums locaux.

    La suite prévue, est de trouver les High High et les High Low …

    IF IsLastBarUpdate = 1 THEN
    FOR i = nombreBarres - 1  DOWNTO  1
    indexBar =nombreBarres - i
    IF (High[i] > High[i-1]) AND (High[i] > High[i+1]) THEN
    DRAWTEXT("H#indexBar#", indexBar, high[i]* 1.04 , Dialog, Standard, 15)
    haut = high[i]
    DRAWTEXT("#haut#", indexBar, high[i]* 1.05) // High
    DRAWTEXT("^", indexBar, high[i]* 1.01, Dialog, Standard, 25) // High
    ENDIF
    IF (Low[i] < Low[i-1]) AND (Low[i] < Low[i+1]) THEN
    DRAWTEXT("L#indexBar#", indexBar, low[i]* 0.96 , Dialog, Standard, 15)
    bas = low[i]
    DRAWTEXT("#bas#", indexBar, low[i]* 0.95) // High
    DRAWTEXT("v", indexBar, low[i]* 0.99, Dialog, Standard, 25) // High
    ENDIF
    NEXT
    ENDIF
    nombreBarres = nombreBarres + 1
    
    RETURN
    
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.

Recherche de Maximums locaux


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
author-avatar
RICO74320 @rico74320 Participant
Summary

This topic contains 3 replies,
has 2 voices, and was last updated by RICO74320
1 year, 8 months ago.

Topic Details
Forum: ProBuilder : Indicateurs & Outils Personnalisés
Language: French
Started: 05/20/2024
Status: Active
Attachments: 1 files
Logo Logo
Loading...