Alarme lorsque l'écart entre 2 moyennes mobiles est très faible

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #111822 quote
    ArnoArno
    Participant
    Average

    Bonjour Nicolas,
    J’utilise sur mes graphiques, 2 moyennes mobiles exponentielles à 35 et 60 périodes appliquées à la clôture.
    Je souhaiterai avoir une alerte sonore lorsque l’écart en pourcentage entre ces 2 moyennes est très faible.
    Pourrais-tu stp m’aider ? Merci par avance !
    Arno

    #111824 quote
    NicolasNicolas
    Keymaster
    Legend

    Ce type de code doit fonctionner, il retournera la valeur 1 si les moyennes ont un écart inférieures à la valeur de ‘percentage’.

    //reserrement de MA en pourcentage
    percentage = 0.025
    a = exponentialaverage[35]
    b = exponentialaverage[60]
    upper = max(a,b)
    lower = min(a,b)
    d = ((upper - lower) / close) *100
    e = d <= percentage
    
    return e
    #111833 quote
    ArnoArno
    Participant
    Average

    C’est parfait. Merci beaucoup Nicolas !

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

Alarme lorsque l'écart entre 2 moyennes mobiles est très faible


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
author-avatar
Arno @arno Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by ArnoArno
6 years, 11 months ago.

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