plus haut et plus bas entre 2 horaires

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #163926 quote
    tianel76tianel76
    Participant
    Junior

    bonjour pourrez t on creer une zone coloré avec les plus haut et plus bas sur une periode genre 22h00 a 9h00 tout les jour a cette heure merci

    #163948 quote
    NicolasNicolas
    Keymaster
    Legend

    Le code ci-dessous affiche le plus haut / bas entre les horaires Start et End, pour colorier la zone, ajouter une zone de couleur dans les paramètres du prix.

    start = 220000
    end = 090000
    
    tc = time>=start or time<end
    if tc then 
     if not tc[1] then 
      hh=high
      ll=low
     endif
     hh=max(high,hh)
     ll=min(low,ll)
    endif 
    
    return hh,ll
    
    
    #163963 quote
    tianel76tianel76
    Participant
    Junior

    merci

    #163964 quote
    tianel76tianel76
    Participant
    Junior

    comment j ecrit 15h30 dans le code

    #163988 quote
    JC_BywanJC_Bywan
    Moderator
    Master

    Le format étant HHMMSS (par exemple 22h00mn00s a été écrit 220000), 15h30 sera 153000

    #164014 quote
    tianel76tianel76
    Participant
    Junior

    j essaie de modifier le code pour avoir les plus haut de 9h a 9h15 je n y arrive pas merci

    #164044 quote
    JC_BywanJC_Bywan
    Moderator
    Master

    Se modifie ainsi:

    start = 90000
    end = 91500
    
    tc = time>start and time<=end
    if tc then
    if not tc[1] then
    hh=high
    ll=low
    endif
    hh=max(high,hh)
    ll=min(low,ll)
    endif
    
    return hh,ll
    #164053 quote
    tianel76tianel76
    Participant
    Junior

    merci beaucoup ces nickel

    #166474 quote
    tianel76tianel76
    Participant
    Junior

    bonjour je ne comprend le code ne fonctionne pas de 17h30 a 22h00 pourtant j ai ecrit 173000 a 220000

    merci de votre aide

    #166486 quote
    NicolasNicolas
    Keymaster
    Legend

    Pour des horaires à cheval entre 2 journées, il faut prendre le premier code fournit: https://www.prorealcode.com/topic/plus-haut-et-plus-bas/#post-163948

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

plus haut et plus bas entre 2 horaires


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
author-avatar
tianel76 @tianel76 Participant
Summary

This topic contains 9 replies,
has 3 voices, and was last updated by NicolasNicolas
5 years, 5 months ago.

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