Create simple close price indicator

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #13928 quote
    FTSE101
    Participant
    New

    Hi all

    I am trying to create a simple indicator to show the closing price at 6:45 am on the chart to change each day at 6:45 am. I have tried to program this but have failed spectacularly (I am absolutely new to all of this!).  Here’s the code I have created – please can someone give me a clue (or preferably the solution!) as to how to get it to do what I want it to do. I can see that the code doesn’t look at the price each day (just for one day) which obviously wont work but I don’t know where to even go to in order to work it out – but very happy to put in the effort!

    Thanks
    James

    // This indicator shows the close price of 6:30am 15m candlestick ie the close at 6:45am
    
    a = (Time = 064500)
    
    RETURN Close [a]
    #13949 quote
    Wing
    Participant
    Veteran

    If you want to change on what bar/time the chart day begins, you need to change the timezone. To just show the 064500 price in an indicator, see below.

    If you are using for example the 15 minute time frame, you can do this :

     

    once LastClose = 0
    
    if time>063000 and time<070000 then
    LastClose=close
    endif
    
    return LastClose
    
    #13991 quote
    FTSE101
    Participant
    New

    A-ha that’s brilliant – thank you so much!

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

Create simple close price indicator


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
FTSE101 @ftse101 Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by FTSE101
9 years, 4 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 09/29/2016
Status: Active
Attachments: No files
Logo Logo
Loading...