Problème d’affichage suivant le sous-jacent

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #218286 quote
    finplusfinplus
    Participant
    Master
    period=50
    
    plusDM = (MAX(HIGH-HIGH[1], 0))*10
    minusDM = (MAX(LOW[1]-LOW, 0))*10
    
    IF plusDM > minusDM THEN
    minusDM = 0
    ENDIF
    
    IF plusDM < minusDM THEN
    plusDM = 0
    ENDIF
    
    IF plusDM = minusDM THEN
    plusDM = 0
    minusDM = 0
    ENDIF
    
    plusDI = WILDERAVERAGE[period](plusDM)
    minusDI = WILDERAVERAGE[period](minusDM)
    
    DM = plusDI-minusDI
     
    moy = exponentialaverage[period]((DM/pipsize))
    
    
    if Moy<Moy[1] and Moy[1]>Moy[2] and Moy[1]>0 then
    RetB5=RetB4
    RetB4=RetB3
    RetB3=RetB2
    RetB2=RetB1
    RetB1=Moy[1]
    RetBmoy=(RetB1+RetB2+RetB3+RetB4+RetB5)/5
    endif
    
    if Moy>Moy[1] and Moy[1]<Moy[2] and Moy[1]<0 then
    RetH5=RetH4
    RetH4=RetH3
    RetH3=RetH2
    RetH2=RetH1
    RetH1=Moy[1]
    RetHmoy=(RetH1+RetH2+RetH3+RetH4+RetH5)/5
    endif
    
    if abs(retBmoy-0) > abs(retHmoy-0) then
    limitUP = retBmoy
    elsif abs(retBmoy-0) < abs(retHmoy-0) then
    LimitUp = -RetHmoy
    endif
    
    if abs(RetHmoy-0) > abs(RetBmoy-0) then
    limitDn = RetHmoy
    elsif abs(RetHmoy-0) < abs(RetBmoy-0) then
    LimitDn = - RetBmoy
    endif
    
    
    if DM > 0 and DM > LimitUp then
    drawcandle (0,0, DM, DM) COLOURED (32,0,192)
    elsif DM>  0 and DM < LimitUp then
    drawcandle (0,0, DM, DM) COLOURED (0,204,255)
    endif
    
    if DM < 0 and DM < LimitDn then
    drawcandle (0,0, DM, DM) COLOURED (255,0,0)
    elsif DM < 0 and DM > LimitDn then
    drawcandle (0,0, DM, DM) COLOURED (255,204,153)
    endif
    
    
    Return DM/pipsize as "DM", moy as "DM Moy", RetBmoy as "Moyenne 5 derniers retournements baissiers", RetHmoy as "Moyenne 5 derniers retournements haussiers"

    Bonjour, je rencontre un problème d’affichage sur l’indicateur suivant : suivant le sous-jacent, le “DM” n’apparaît pas (il n’apparaît pas lorsque le sous-jacent est de faible montant par ex : lorsqu’il s’agit d’une paire de devises qui côte 0,95667). je pense qu’il peut s’agir d’un problème d’échelle.

    Quelqu’un aurait-il une solution ? Merci.

    #218326 quote
    fifi743fifi743
    Participant
    Master

    bonjour,

    j’ai modifié la ligne 22 et enlevé “/pointsize sur le reste des DM

    voici le code marche sur audcad

     

    period=50
    
    plusDM = (MAX(HIGH-HIGH[1], 0))*10
    minusDM = (MAX(LOW[1]-LOW, 0))*10
    
    IF plusDM > minusDM THEN
    minusDM = 0
    ENDIF
    
    IF plusDM < minusDM THEN
    plusDM = 0
    ENDIF
    
    IF plusDM = minusDM THEN
    plusDM = 0
    minusDM = 0
    ENDIF
    
    plusDI = WILDERAVERAGE[period](plusDM)
    minusDI = WILDERAVERAGE[period](minusDM)
    
    DM = (plusDI-minusDI)/pipsize
     
    moy = exponentialaverage[period]((DM))
    
    
    if Moy<Moy[1] and Moy[1]>Moy[2] and Moy[1]>0 then
    RetB5=RetB4
    RetB4=RetB3
    RetB3=RetB2
    RetB2=RetB1
    RetB1=Moy[1]
    RetBmoy=(RetB1+RetB2+RetB3+RetB4+RetB5)/5
    endif
    
    if Moy>Moy[1] and Moy[1]<Moy[2] and Moy[1]<0 then
    RetH5=RetH4
    RetH4=RetH3
    RetH3=RetH2
    RetH2=RetH1
    RetH1=Moy[1]
    RetHmoy=(RetH1+RetH2+RetH3+RetH4+RetH5)/5
    endif
    
    if abs(retBmoy-0) > abs(retHmoy-0) then
    limitUP = retBmoy
    elsif abs(retBmoy-0) < abs(retHmoy-0) then
    LimitUp = -RetHmoy
    endif
    
    if abs(RetHmoy-0) > abs(RetBmoy-0) then
    limitDn = RetHmoy
    elsif abs(RetHmoy-0) < abs(RetBmoy-0) then
    LimitDn = - RetBmoy
    endif
    
    
    if DM > 0 and DM > LimitUp then
    drawcandle (0,0, DM, DM) COLOURED (32,0,192)
    elsif DM>  0 and DM < LimitUp then
    drawcandle (0,0, DM, DM) COLOURED (0,204,255)
    endif
    
    if DM < 0 and DM < LimitDn then
    drawcandle (0,0, DM, DM) COLOURED (255,0,0)
    elsif DM < 0 and DM > LimitDn then
    drawcandle (0,0, DM, DM) COLOURED (255,204,153)
    endif
    
    
    Return DM as "DM", moy as "DM Moy", RetBmoy as "Moyenne 5 derniers retournements baissiers", RetHmoy as "Moyenne 5 derniers retournements haussiers"
    finplus and Nicolas thanked this post
    #218327 quote
    finplusfinplus
    Participant
    Master

    Un grand merci Fifi743.

    Bonne fin de week-end.

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

Problème d’affichage suivant le sous-jacent


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
author-avatar
finplus @finplus Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by finplusfinplus
3 years, 1 month ago.

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