Unité de temps 5m sur graphe 1m

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #65362 quote
    Matriciel
    Participant
    Master

    Bonjour Nicolas,

    J’ai créé un indicateur qui affiche l’unité de temps 5 minutes sur le graphique 1 minute. Pour l’instant, je l’ai rédigé de 9H00 à 11H30.

    J’aimerais qu’il s’incrémente tout seul toutes les 5 minutes, cela m’éviterait d’écrire des centaines de fois les mêmes lignes !

    Peux-tu m’aider s’il te plait ?

    Merci de m’accorder de ton temps.

     

    DJ

    //Indicateur Unité de temps 5m sur 1m
    //Le 15 mars 2018
    //Matriciel @ www.prorealcode.com
    //Sharing ProRealTime knowledge
    
    c1 = open[4]
    c2 = highest[5](high)
    c3 = lowest[5](low)
    c4 = close
    
    Hausse = (open[5] <= close)
    Baisse = (open[5] >= close)
    
    If Hausse and time >= 090000 and time < 090100 then
    drawcandle (c1,c2,c3,c4) coloured (0,255,0)
    Endif
    If Baisse and time >= 090000 and time < 090100 then
    drawcandle (c1,c2,c3,c4) coloured (255,0,0)
    Endif
    
    If Hausse and time >= 090500 and time < 090600 then
    drawcandle (c1,c2,c3,c4) coloured (0,255,0)
    Endif
    If Baisse and time >= 090500 and time < 090600 then
    drawcandle (c1,c2,c3,c4) coloured (255,0,0)
    Endif
    
    If Hausse and time >= 091000 and time < 091100 then
    drawcandle (c1,c2,c3,c4) coloured (0,255,0)
    Endif
    If Baisse and time >= 091000 and time < 091100 then
    drawcandle (c1,c2,c3,c4) coloured (255,0,0)
    Endif
    
    If Hausse and time >= 091500 and time < 091600 then
    drawcandle (c1,c2,c3,c4) coloured (0,255,0)
    Endif
    If Baisse and time >= 091500 and time < 091600 then
    drawcandle (c1,c2,c3,c4) coloured (255,0,0)
    Endif
    
    If Hausse and time >= 092000 and time < 092100 then
    drawcandle (c1,c2,c3,c4) coloured (0,255,0)
    Endif
    If Baisse and time >= 092000 and time < 092100 then
    drawcandle (c1,c2,c3,c4) coloured (255,0,0)
    Endif
    
    If Hausse and time >= 092500 and time < 092600 then
    drawcandle (c1,c2,c3,c4) coloured (0,255,0)
    Endif
    If Baisse and time >= 092500 and time < 092600 then
    drawcandle (c1,c2,c3,c4) coloured (255,0,0)
    Endif
    
    If Hausse and time >= 093000 and time < 093100 then
    drawcandle (c1,c2,c3,c4) coloured (0,255,0)
    Endif
    If Baisse and time >= 093000 and time < 093100 then
    drawcandle (c1,c2,c3,c4) coloured (255,0,0)
    Endif
    
    If Hausse and time >= 093500 and time < 093600 then
    drawcandle (c1,c2,c3,c4) coloured (0,255,0)
    Endif
    If Baisse and time >= 093500 and time < 093600 then
    drawcandle (c1,c2,c3,c4) coloured (255,0,0)
    Endif
    
    If Hausse and time >= 094000 and time < 094100 then
    drawcandle (c1,c2,c3,c4) coloured (0,255,0)
    Endif
    If Baisse and time >= 094000 and time < 094100 then
    drawcandle (c1,c2,c3,c4) coloured (255,0,0)
    Endif
    
    If Hausse and time >= 094500 and time < 094600 then
    drawcandle (c1,c2,c3,c4) coloured (0,255,0)
    Endif
    If Baisse and time >= 094500 and time < 094600 then
    drawcandle (c1,c2,c3,c4) coloured (255,0,0)
    Endif
    
    If Hausse and time >= 095000 and time < 095100 then
    drawcandle (c1,c2,c3,c4) coloured (0,255,0)
    Endif
    If Baisse and time >= 095000 and time < 095100 then
    drawcandle (c1,c2,c3,c4) coloured (255,0,0)
    Endif
    
    If Hausse and time >= 095500 and time < 095600 then
    drawcandle (c1,c2,c3,c4) coloured (0,255,0)
    Endif
    If Baisse and time >= 095500 and time < 095600 then
    drawcandle (c1,c2,c3,c4) coloured (255,0,0)
    Endif
    
    If Hausse and time >= 100000 and time < 100100 then
    drawcandle (c1,c2,c3,c4) coloured (0,255,0)
    Endif
    If Baisse and time >= 100000 and time < 100100 then
    drawcandle (c1,c2,c3,c4) coloured (255,0,0)
    Endif
    
    If Hausse and time >= 100500 and time < 100600 then
    drawcandle (c1,c2,c3,c4) coloured (0,255,0)
    Endif
    If Baisse and time >= 100500 and time < 100600 then
    drawcandle (c1,c2,c3,c4) coloured (255,0,0)
    Endif
    
    If Hausse and time >= 101000 and time < 101100 then
    drawcandle (c1,c2,c3,c4) coloured (0,255,0)
    Endif
    If Baisse and time >= 101000 and time < 101100 then
    drawcandle (c1,c2,c3,c4) coloured (255,0,0)
    Endif
    
    If Hausse and time >= 101500 and time < 101600 then
    drawcandle (c1,c2,c3,c4) coloured (0,255,0)
    Endif
    If Baisse and time >= 101500 and time < 101600 then
    drawcandle (c1,c2,c3,c4) coloured (255,0,0)
    Endif
    
    If Hausse and time >= 102000 and time < 102100 then
    drawcandle (c1,c2,c3,c4) coloured (0,255,0)
    Endif
    If Baisse and time >= 102000 and time < 102100 then
    drawcandle (c1,c2,c3,c4) coloured (255,0,0)
    Endif
    
    If Hausse and time >= 102500 and time < 102600 then
    drawcandle (c1,c2,c3,c4) coloured (0,255,0)
    Endif
    If Baisse and time >= 102500 and time < 102600 then
    drawcandle (c1,c2,c3,c4) coloured (255,0,0)
    Endif
    
    If Hausse and time >= 103000 and time < 103100 then
    drawcandle (c1,c2,c3,c4) coloured (0,255,0)
    Endif
    If Baisse and time >= 103000 and time < 103100 then
    drawcandle (c1,c2,c3,c4) coloured (255,0,0)
    Endif
    
    If Hausse and time >= 103500 and time < 103600 then
    drawcandle (c1,c2,c3,c4) coloured (0,255,0)
    Endif
    If Baisse and time >= 103500 and time < 103600 then
    drawcandle (c1,c2,c3,c4) coloured (255,0,0)
    Endif
    
    If Hausse and time >= 104000 and time < 104100 then
    drawcandle (c1,c2,c3,c4) coloured (0,255,0)
    Endif
    If Baisse and time >= 104000 and time < 104100 then
    drawcandle (c1,c2,c3,c4) coloured (255,0,0)
    Endif
    
    If Hausse and time >= 104500 and time < 104600 then
    drawcandle (c1,c2,c3,c4) coloured (0,255,0)
    Endif
    If Baisse and time >= 104500 and time < 104600 then
    drawcandle (c1,c2,c3,c4) coloured (255,0,0)
    Endif
    
    If Hausse and time >= 105000 and time < 105100 then
    drawcandle (c1,c2,c3,c4) coloured (0,255,0)
    Endif
    If Baisse and time >= 105000 and time < 105100 then
    drawcandle (c1,c2,c3,c4) coloured (255,0,0)
    Endif
    
    If Hausse and time >= 105500 and time < 105600 then
    drawcandle (c1,c2,c3,c4) coloured (0,255,0)
    Endif
    If Baisse and time >= 105500 and time < 105600 then
    drawcandle (c1,c2,c3,c4) coloured (255,0,0)
    Endif
    
    If Hausse and time >= 110000 and time < 110100 then
    drawcandle (c1,c2,c3,c4) coloured (0,255,0)
    Endif
    If Baisse and time >= 110000 and time < 110100 then
    drawcandle (c1,c2,c3,c4) coloured (255,0,0)
    Endif
    
    If Hausse and time >= 110500 and time < 110600 then
    drawcandle (c1,c2,c3,c4) coloured (0,255,0)
    Endif
    If Baisse and time >= 110500 and time < 110600 then
    drawcandle (c1,c2,c3,c4) coloured (255,0,0)
    Endif
    
    If Hausse and time >= 111000 and time < 111100 then
    drawcandle (c1,c2,c3,c4) coloured (0,255,0)
    Endif
    If Baisse and time >= 111000 and time < 111100 then
    drawcandle (c1,c2,c3,c4) coloured (255,0,0)
    Endif
    
    If Hausse and time >= 111500 and time < 111600 then
    drawcandle (c1,c2,c3,c4) coloured (0,255,0)
    Endif
    If Baisse and time >= 111500 and time < 111600 then
    drawcandle (c1,c2,c3,c4) coloured (255,0,0)
    Endif
    
    If Hausse and time >= 112000 and time < 112100 then
    drawcandle (c1,c2,c3,c4) coloured (0,255,0)
    Endif
    If Baisse and time >= 112000 and time < 112100 then
    drawcandle (c1,c2,c3,c4) coloured (255,0,0)
    Endif
    
    If Hausse and time >= 112500 and time < 112600 then
    drawcandle (c1,c2,c3,c4) coloured (0,255,0)
    Endif
    If Baisse and time >= 112500 and time < 112600 then
    drawcandle (c1,c2,c3,c4) coloured (255,0,0)
    Endif
    
    If Hausse and time >= 113000 and time < 113100 then
    drawcandle (c1,c2,c3,c4) coloured (0,255,0)
    Endif
    If Baisse and time >= 113000 and time < 113100 then
    drawcandle (c1,c2,c3,c4) coloured (255,0,0)
    Endif
    
    RETURN
    #65375 quote
    Nicolas
    Keymaster
    Master

    Sauf erreur de ma part, c’est exactement ce qu’à fait Toto dans son topic dans le forum Anglais, vous vous êtes donné le mot ? 🙂

    MULTI TIME FRAMES : 5min candles on 1min chart

    Matriciel thanked this post
    #65376 quote
    Matriciel
    Participant
    Master

    Je n’étais pas au courant du topic à Toto. C’est vrai, c’est étonnant ! 🙂

    Nous n’avons pas le même résultat tous les deux. Voir photo ci-dessous.

    De plus, je ne comprends pas bien son code; je ne suis pas fort concernant la programmation sous PRT !

    PRT-1.jpg PRT-1.jpg
    #65380 quote
    Matriciel
    Participant
    Master

    Mon indicateur comporte un gros défaut, je ne peux pas appliquer les “Bandes de Bollinger” ni même une simple moyenne mobile.

    As-tu une solution à cela ?

    #65382 quote
    Nicolas
    Keymaster
    Master

    Je pense que tu n’affiches le chandelier qu’une fois que la barre est clôturée, ce qui n’est pas le cas dans l’indicateur de Toto, la barre bouge en temps réel et donc les chandeliers s’agrège avec les données Close/High et Low durant 5 minutes.

    C’est logique que tu ne puisses pas appliquer une moyenne mobile, puisque les données du tableau de données seront celles liées au temps qui s’écoule, soit au barindex. En fonction de l’indicateur, la façon de faire serait différente, mais pour une moyenne mobile, tu peux essayer d’utiliser ce que j’ai pu faire dans l’indicateur de moyenne mobile sur Renko: https://www.prorealcode.com/topic/new-renko-system/page/2/#post-63626

    Matriciel thanked this post
    #65398 quote
    Matriciel
    Participant
    Master

    Merci pour les conseils, je vais voir ce que je peux faire à mon niveau.

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.

Unité de temps 5m sur graphe 1m


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
author-avatar
Matriciel @matriciel Participant
Summary

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

Topic Details
Forum: ProBuilder : Indicateurs & Outils Personnalisés
Language: French
Started: 03/15/2018
Status: Active
Attachments: 1 files
Logo Logo
Loading...