Point bas de la journée du lundi entre deux horaires

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #209073 quote
    rwandererrwanderer
    Participant
    New

    Bonjour à tous,

    Je cherche à récuperer le plus haut et le plus bas du lundi entre deux horaires.
    Le point haut c’est OK mais mon point bas reste à 0…
    Un truc m’échappe, quelqu’un le voit-il ?

    timeframe (15 minute,updateonclose)
    
    
    if DayOfWeek = 1 AND TIME > 090000 AND TIME < 174500 then
    PointBasDay = close
    PointHautDay=max(high,PointHautDay[1])
    PointBasDay=min(low,PointBasDay[1])
    endif
    
    return PointHautDay, PointBasDay
    Capture-du-2023-02-03-19-45-35.png Capture-du-2023-02-03-19-45-35.png
    #209075 quote
    fifi743fifi743
    Participant
    Master

    et comme ceci

    timeframe (15 minute,updateonclose)
    if DayOfWeek = 1 AND time=090000 then
    PointBasDay = low
    PointHautDay=high
    endif
    
    if DayOfWeek = 1 AND TIME > 090000 AND TIME < 174500 then
    if PointHautDay low then
    PointBasDay = low
    endif
    endif
    
    return PointHautDay, PointBasDay
    rwanderer thanked this post
    #209137 quote
    rwandererrwanderer
    Participant
    New

    J’ai compris pourquoi l’initialisation ne se faisait pas sur le point bas.
    Merci Fifi !

    #209195 quote
    NicolasNicolas
    Keymaster
    Legend

    En effet ta variable PoitBasDay est égale à zéro au début du code et avec l’instruction MIN, tu ne peux pas obtenir de valeurs inférieures à zéro, il faut donc initialiser avec une valeur cette variable au préalable.

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

Point bas de la journée du lundi entre deux horaires


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
author-avatar
rwanderer @rwanderer Participant
Summary

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

Topic Details
Forum: ProBuilder : Indicateurs & Outils Personnalisés
Language: French
Started: 02/03/2023
Status: Active
Attachments: 1 files
ProRealCode ProRealCode
Loading...