Announcement

Collapse
No announcement yet.

Retrieval of Close data for previous 3 days

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Retrieval of Close data for previous 3 days

    I need to retrieve the previous 3 days close data. I have no problem with previous tick data intra-day, but need the close of the previous 3 days. I have reviewed a number of the posts on this forum but so far am unable to retrieve the data that I need.

  • #2
    Re: Retrieval of Close data for previous 3 days

    lcornell
    Are you trying to retrieve the daily Close from previous days?
    If that is the case then the easiest and most basic method is to use the close() function and pass to it the corresponding bar index and interval using the inv() function eg
    var yesterdayDailyClose = close(-1, inv("D"))
    Alternatively assign the series to a variable and then use the getValue() method to retrieve the value from the series eg
    var dailyClose = close(inv("D"))
    var yesterdayDailyClose = dailyClose.getValue(-1)

    For the syntax, description and more examples on the use of these functions see the links to the corresponding articles in the EFS KnowledgeBase
    Alex


    Originally posted by lcornell
    I need to retrieve the previous 3 days close data. I have no problem with previous tick data intra-day, but need the close of the previous 3 days. I have reviewed a number of the posts on this forum but so far am unable to retrieve the data that I need.

    Comment


    • #3
      Alex,

      Thank you very much for the prompt reply. Your code worked fine and I have that part of the script running.

      Comment


      • #4
        lcornell
        My pleasure
        Alex


        Originally posted by lcornell
        Alex,

        Thank you very much for the prompt reply. Your code worked fine and I have that part of the script running.

        Comment

        Working...
        X