Highest close and lowest close for today?

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #61079 quote
    robdav
    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
    Nicolas
    Keymaster
    Master

    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
    robdav
    Participant
    Veteran

    Hi Nicolas,

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

    Can it be tweaked?

    Thanks

    Rob

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

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 robdav
8 years ago.

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