limite de validité indicateur

Viewing 15 posts - 31 through 45 (of 67 total)
  • Author
    Posts
  • #113697 quote
    Nicolas
    Keymaster
    Master

    @remy92400

    Merci pour votre patience et remercions celle de Roberto également.

    Pour mémoire,  Roberto ne parle pas français et utilise un outil de traduction automatique.

    robertogozzi thanked this post
    #113708 quote
    remy92400
    Participant
    Average

    Bonjour,

    Je vais essayer avec les modifs, je vous tiens au courant, oui merci bien Roberto pour l’aide apportée 🙂

    #113710 quote
    remy92400
    Participant
    Average

    Voici le code que je vais tester donc

    DEFPARAM DrawOnLastBarOnly = true
    IF BarIndex = 0 THEN
    MyDate   = 20191128        //Valide jusqu'au  28 novembre
    Validity = 1                //1=valide     0=expiré
    ENDIF
    IF OpenDay = 28 AND OpenDay[1] <> OpenDay AND OpenDate >= MyDate THEN //On the 28th of the above it expires
    Validity = 0
    ENDIF
    IF Validity = 0 THEN
    DRAWTEXT("veuillez re télécharger l’indicateur",barindex,high + 5 * pipsize)
    ELSE
    P      = 10 // number of high periods
    q      = 21 // name periods bas
    haut   = highest[p](high[1])
    bas    = lowest[q](low[1])
    milieu =(highest[p](high)+lowest[q](low))/2
    ENDIF
    return haut,bas,milieu
    
    #113961 quote
    remy92400
    Participant
    Average

    Bonjour,

    Avec le code dans le précédent message, cela fonctionne pas de mon côté:(

    #113962 quote
    robertogozzi
    Moderator
    Master

    Cela ne s'est-il pas arrêté à 00:00 le 28 novembre?

    #113967 quote
    remy92400
    Participant
    Average

    Bonjour,

    J’ai allumé ma plateforme prorealtime, mon espace personnel s’est chargé avec l’indicateur et il y avait le canal, la dernière bougie sur le graphique date bien du 29 novembre donc il semblerait que ça ne fonctionne pas.

    #114096 quote
    robertogozzi
    Moderator
    Master

    Ce code a fonctionné jusqu’au 3 décembre à 00:59:59 (vieux jour – Pic1), puis la première bougie du nouveau jour  s’est ouverte et le message a été affiché (Pic2).

    J’ai bien peur de ne plus pouvoir vous aider.

    DEFPARAM DrawOnLastBarOnly = true
    IF BarIndex = 0 THEN
       MyDate   = 20191200        //Valide jusqu'a decembre
       Validity = 1               //1=valide     0=expiré
    ENDIF
    gg = 3                        //Valide jusqu'u 2 decembre
    IF OpenDay = gg AND OpenDay[1] <> OpenDay AND OpenDate >= MyDate THEN
       Validity = 0
    ENDIF
    IF Validity = 0 THEN
       DRAWTEXT("veuillez re télécharger l’indicateur",barindex,high + 5 * pipsize)
    ELSE
       P      = 10 // number of high periods
       q      = 21 // name periods bas
       haut   = highest[p](high[1])
       bas    = lowest[q](low[1])
       milieu =(highest[p](high)+lowest[q](low))/2
    ENDIF
    return haut,bas,milieu
    Pic1.jpg Pic1.jpg Pic2.jpg Pic2.jpg
    #114102 quote
    Nicolas
    Keymaster
    Master

    @remy92400

    testé sur quel instrument et timeframe stp ?

    #114103 quote
    remy92400
    Participant
    Average

    ok merci quand même Roberto 🙂

    Nicolas, sur l’action société générale en daily, capture ci-joint

    Capture.jpg Capture.jpg
    #114108 quote
    Nicolas
    Keymaster
    Master

    Avec cette version, ça fonctionne, l’indicateur arrête ses calculs:

    DEFPARAM DrawOnLastBarOnly = true
    
    MyDate = 20191101
    
    haut=undefined
    bas=undefined
    milieu=undefined
    
    if opendate<=MyDate then 
    P      = 10 // number of high periods
    q      = 21 // name periods bas
    haut   = highest[p](high[1])
    bas    = lowest[q](low[1])
    milieu =(highest[p](high)+lowest[q](low))/2
    else
    DRAWTEXT("veuillez re télécharger l’indicateur",barindex,high + 5 * ticksize) coloured(255,100,2)
    ENDIF
    
    return haut,bas,milieu, opendate<=MyDate
    limite-validite-indicateur.png limite-validite-indicateur.png
    #114121 quote
    remy92400
    Participant
    Average

    Je vais essayer, je vous tiens au courant merci Nicolas

    #114281 quote
    remy92400
    Participant
    Average

    Bonjour,

    ça marche merci beaucoup Nicolas et Roberto pour ton temps aussi:) par contre est-ce que c’est possible d’enlever les traits horizontaux quand il ne calcul plus?

    #114302 quote
    Nicolas
    Keymaster
    Master

    On ne peut pas mettre une valeur à NULL, il faudrait rendre les lignes transparentes dans ce cas.

    DEFPARAM DrawOnLastBarOnly = true
    
    MyDate = 20191101
    
    haut=undefined
    bas=undefined
    milieu=undefined
    
    if opendate<=MyDate then 
    P      = 10 // number of high periods
    q      = 21 // name periods bas
    haut   = highest[p](high[1])
    bas    = lowest[q](low[1])
    milieu =(highest[p](high)+lowest[q](low))/2
    alpha=255
    else
    DRAWTEXT("veuillez re télécharger l’indicateur",barindex,high + 5 * ticksize) coloured(255,100,2)
    alpha=0
    ENDIF
    
    return haut coloured(100,100,100,alpha),bas coloured(100,100,100,alpha),milieu coloured(100,100,100,alpha), opendate<=MyDate

    (non testé)

    remy92400 thanked this post
    #114309 quote
    remy92400
    Participant
    Average

    ok merci Nicolas 🙂

    #169178 quote
    pierre66
    Participant
    Senior

    Bonjour,

    Je voudrais invalidé mon petit indicateur à un date précise , comme je l’ai vu dans le forum”limite de validité indicateur”, mais quand je le charge il ne marche pas.

    Est ce que vous pouvez m’aider code:

    DEFPARAM DrawOnLastBarOnly = True
    IF Date > 202121231 THEN
    wup = low[0] > low[1] and low[1] <low[2]
    wdown= High[0]<high[1] and high[1]>high[2]
    
    atr=Averagetruerange[14]
    
    
    IF wup and  close> high[1]THEN
     
    DRAWsegment(barindex[1],low[1],barindex+Extension,low[1])coloured(255,0,0)
    DRAWsegment(barindex[1],HIGH[1],barindex+Extension,HIGH[1])coloured(0,255,0)
    drawarrowup(barindex[1], low[1] -0.5*atr ) coloured (0,255,0)
    endif
    
    if wdown and  close< LOW[1]  then
    drawarrowdown(barindex[1], high[1]+0.5*atr) coloured (255,0,0)
    DRAWsegment(barindex[1],low[1],barindex+Extension,low[1])coloured(255,0,0)
    DRAWsegment(barindex[1],HIGH[1],barindex+Extension,HIGH[1])coloured(0,255,0)
    endif
    
    
    endif
    
    RETURN
Viewing 15 posts - 31 through 45 (of 67 total)
  • You must be logged in to reply to this topic.

limite de validité indicateur


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
author-avatar
remy92400 @remy92400 Participant
Summary

This topic contains 66 replies,
has 5 voices, and was last updated by warningff
4 years, 7 months ago.

Topic Details
Forum: ProBuilder : Indicateurs & Outils Personnalisés
Language: French
Started: 11/13/2019
Status: Active
Attachments: 5 files
Logo Logo
Loading...