compteur d’accélération dans une periode

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #242278 quote
    bourikbourik
    Participant
    New

    Bonjour,

    Je souhaite avoir un compteur  qui m’indique le nombre d’accélération qui est précédé par une décélération  sur le MACD et qui se remette à 0 quand on change la polarité du macd. mon code détecte bien les différentes itération mais la variable count se s’incrémente pas. merci d’avance pour vos solutions.

    TIMEFRAME(1 Minute )
    Increase = MACD[12,26,9](close[2])>MACD[12,26,9](close[1] )AND MACD[12,26,9](close[1])  < MACD[12,26,9](close)  AND MACD[12,26,9](close) >0
    condition = MACD[12,26,9](close) >0
    Count = 0
    WHILE condition[Count] DO
    IF Increase[Count] THEN
    Count = Count + 1
     CONTINUE
    ENDIF
    BREAK 
    WEND
    RETURN Count
    compteur-dacceleration.png compteur-dacceleration.png
    #242292 quote
    Iván GonzálezIván González
    Moderator
    Legend

    bonnes. Vous pouvez utiliser ce code.

    histo=MACD[12,26,9](close)
    increase=histo>histo[1] and histo[1]<histo[2]
    
    if histo>0 then
    if increase then
    count=count+1
    endif
    else
    count=0
    endif
    
    RETURN increase coloured("red"), count
    #242303 quote
    bourikbourik
    Participant
    New

    Bonjour,

    Merci, ca correspond à ma demande

    Bonne journée

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

compteur d’accélération dans une periode


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
author-avatar
bourik @bourik Participant
Summary

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

Topic Details
Forum: ProBuilder : Indicateurs & Outils Personnalisés
Language: French
Started: 01/07/2025
Status: Active
Attachments: 1 files
ProRealCode ProRealCode
Loading...