Highest close and lowest close for today?

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #61079 quote
    robdavrobdav
    Participant
    Veteran

    Hi

    I’m trying to get the highest close and lowest close of the day so far.

    So I can use the code below to get the low and high so far today but I would like to get the close of the highest and lowest candle today.

    TodaysLow = DLow(0)
    TodaysHigh = DHigh(0)
    
    DailyClose = DClose(0)

    Can anyone help please?

    Thanks

    Rob

    #61097 quote
    NicolasNicolas
    Keymaster
    Legend

    That code would do the trick (not tested, please give feedback):

    if intradaybarindex=0 then 
     hh=0
     ll=close*100
    endif 
    
    hh=max(hh,high)
    ll=min(ll,low)
    
    if hh<>hh[1] then 
     hclose=close[1]
    endif
    
    if ll<>ll[1] then 
     lclose=close[1]
    endif
    
    return hclose,lclose
    robdav thanked this post
    #61108 quote
    robdavrobdav
    Participant
    Veteran

    Hi Nicolas,

    Thanks but it doesn’t seem to be quite there. See attached.

    Can it be tweaked?

    Thanks

    Rob

    DAX-34-minutes.png DAX-34-minutes.png
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

Highest close and lowest close for today?


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
robdav @robdav Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by robdavrobdav
8 years, 8 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 01/31/2018
Status: Active
Attachments: 1 files
ProRealCode ProRealCode
Loading...