indicateurs de niveaux sur le forex

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #159847 quote
    philippe59139philippe59139
    Participant
    Senior

    bonjour,

    defparam drawonlastbaronly=false
    //roundnumber = 50
    //EpDeLaZone=2.5//faire varier en fonction de l'unité de temps
    pipsval=EpDeLaZone
    a=0
    for i = 1 to roundnumber do
    if (close+i*pointsize) mod roundnumber = 0 then
    upper = round(close+i*pointsize)
    if upper mod roundnumber = 1 then
    
    upper = (upper-1)
    
    endif
    break
    endif
    next
     
    for i = roundnumber downto 1 do
    if (close-i*pointsize) mod roundnumber*pointsize = 0 then
    lower = round(close-i*pointsize)
    if lower mod roundnumber = 1 then
    
    lower = (lower-1)
    
    endif
    break
    endif
    next
    
    
    for i=0 to P do
    $haut[i]=high
    $bas[i]=low
    $ouv[i]=open
    $ferm[i]=close
    if $haut[i]<=upper+pipsval and $haut[i]>=upper-pipsval then
    a=a+1
    DRAWTEXT("⌖", barindex,high, Dialog, bold, 10) COLOURED(0, 0, 0)
    //DRAWTEXT("#a#", barindex,high, Dialog, bold, 20) COLOURED(0, 0, 0)
    endif
    if $bas[i]<=upper+pipsval and $bas[i]>=upper-pipsval then
    a=a+1
    DRAWTEXT("⌖", barindex,low, Dialog, bold, 10) COLOURED(0, 0, 0)
    //DRAWTEXT("#a#", barindex,low, Dialog, bold, 20) COLOURED(0, 0, 0)
    endif
    if $ouv[i]<=upper+pipsval and $ouv[i]>=upper-pipsval then
    a=a+1
    DRAWTEXT("⌖", barindex,open, Dialog, bold, 10) COLOURED(0, 0, 0)
    endif
    if $ferm[i]<=upper+pipsval and $ferm[i]>=upper-pipsval then
    a=a+1
    DRAWTEXT("⌖", barindex,close, Dialog, bold, 10) COLOURED(0, 0, 0)
    endif
    
    
    if $haut[i]<=lower+pipsval and $haut[i]>=lower-pipsval then
    a=a+1
    DRAWTEXT("⌖", barindex,high, Dialog, bold, 10) COLOURED(0, 0, 0)
    //DRAWTEXT("#a#", barindex,high, Dialog, bold, 20) COLOURED(0, 0, 0)
    endif
    if $bas[i]<=lower+pipsval and $bas[i]>=lower-pipsval then
    a=a+1
    DRAWTEXT("⌖", barindex,low, Dialog, bold, 10) COLOURED(0, 0, 0)
    //DRAWTEXT("#a#", barindex,low, Dialog, bold, 20) COLOURED(0, 0, 0)
    endif
    if $ouv[i]<=lower+pipsval and $ouv[i]>=lower-pipsval then
    a=a+1
    DRAWTEXT("⌖", barindex,open, Dialog, bold, 10) COLOURED(0, 0, 0)
    endif
    if $ferm[i]<=lower+pipsval and $ferm[i]>=lower-pipsval then
    a=a+1
    DRAWTEXT("⌖", barindex,close, Dialog, bold, 10) COLOURED(0, 0, 0)
    endif
    i=i+1
    NEXT
    
    //DRAWTEXT("Nb= #a#", barindex+15,upper, Dialog, bold, 10) COLOURED(255, 0, 0)
    drawrectangle(barindex,upper-PipsVal,barindex[10],upper+PipsVal)coloured(0,180,0,50)bordercolor(0,180,0,50)
    
    drawrectangle(barindex,lower-PipsVal,barindex[10],lower+PipsVal)coloured(255,0,0,50)bordercolor(255,0,0,50)
    
    
    return

     

    j’ai adapté les chiffres rond pour créer des zones,cela fonctionne très sur indices, parcontre sur forex je n’arrive à trouver la solution merci pour votre aide.

    #159849 quote
    NicolasNicolas
    Keymaster
    Legend

    J’ai déplacé la question dans un sujet spécifique, il était posté à la suite d’un sujet qui n’a rien à voir. Merci de veuillez à poster au bon endroit la prochaine fois.

    Je suppose que ton problème provient du fait des valeurs en décimales sur le forex ? As-tu testé les valeurs retournés par tes calculs de chiffre rond ?

    #159866 quote
    philippe59139philippe59139
    Participant
    Senior

    merci pour ton retour Nicolas,

    testé avec variable décimal le upper passe à zero ainsi que le lower

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

indicateurs de niveaux sur le forex


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by philippe59139philippe59139
5 years, 7 months ago.

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