afficher signal break EMA sur UT inférieure

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #251738 quote
    olivierolivier
    Participant
    Junior

    bonjour,

    j’aimerai afficher une flèche qui valide le signal du break d’une ema en 30 minutes sur UT 5 minutes en clôture 30 minutes.

    timeframe(30minutes,updateonclose)
    ema100=exponentialaverage[100](close)
    
    if open<ema100 and close>ema100  then
    signalachat=1
    drawarrowup(barindex,high+10)
    endif
    if open>ema100 and close<ema100 then
    signalvente=1
    drawarrowdown(barindex,low-10)
    endif
    return
    #251739 quote
    JC_BywanJC_Bywan
    Moderator
    Master

    Bonjour,

    Pour que le code comprenne quelle partie s’applique à l’UT30mn et quelle partie gère le tracé en UT5mn, tu peux ajouter une ligne timeframe(5mn). Ou mieux en terme de flexibilité: timeframe(default) ce qui permettrait de fonctionner aussi avec d’autres UT inférieures à 30mn (tant que 30 en est un multiple) car le “default” correspond à l’UT du graphe.

    timeframe(30minutes,updateonclose)
    ema100=exponentialaverage[100](close)
    
    timeframe(default)
    if open<ema100 and close>ema100 then
    signalachat=1
    drawarrowup(barindex,high+10)
    endif
    if open>ema100 and close<ema100 then
    signalvente=1
    drawarrowdown(barindex,low-10)
    endif
    
    return
    Iván González thanked this post
    #251740 quote
    olivierolivier
    Participant
    Junior

    merci pour le retour mais comment avoir uniquement un signal (flèche) en clôture 30min et non des flèches à chaque croisement ema 100 30 minute en clôture bougie 5 minute.

    #251743 quote
    JC_BywanJC_Bywan
    Moderator
    Master

    Ok, alors à tester ainsi:

    timeframe(30minutes,updateonclose)
    ema100=exponentialaverage[100](close)
    
    signalachat=0
    signalvente=0
    
    if open<ema100 and close>ema100 then
     signalachat=1
     //drawarrowup(barindex,high+10)
    endif
    if open>ema100 and close<ema100 then
     signalvente=1
     //drawarrowdown(barindex,low-10)
    endif
    
    timeframe(default)
    if signalachat=1 and (minute=0 or minute=30) then
     drawarrowup(barindex,high+10)
    endif
    if signalvente=1 and (minute=0 or minute=30) then
     drawarrowdown(barindex,low-10)
    endif
    
    return
    Iván González and robertogozzi thanked this post
    #251745 quote
    olivierolivier
    Participant
    Junior

    parfait,

    MERCI

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

afficher signal break EMA sur UT inférieure


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
author-avatar
olivier @olivier Participant
Summary

This topic contains 4 replies,
has 2 voices, and was last updated by olivierolivier
11 months, 3 weeks ago.

Topic Details
Forum: ProBuilder : Indicateurs & Outils Personnalisés
Language: French
Started: 09/25/2025
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...