Announcement

Collapse
No announcement yet.

Retrieving specific values at specific times

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

  • Retrieving specific values at specific times

    If I try to get the close( -1, 0, sym( "ES #F,D" ), it doesn't give me the close of the E-Minis with respect to the closing time of the stock market -- it gives me the last tick of the day. This is causing problems with my models.

    What I would like to do is retrieve the closest tick for any given product to a specified time. So for example, let's say I wanted the closest [in the time domain] tick after 4PM of the previous day and the day before the previous day for GE and the S&P E-Mini futures, how would I do that?

    How do I go about doing this? I tried the dsgetValueAtTime() function with very little success and keep getting null values as my return.

    Alternatively, is there any way to cycle through raw ticks and just export all of them, in addition to: the exchange on which the tick occurred, the time stamp [in eastern time], and the actual tick itself easily into just a few arrays?

    Let's say I want every single tick that happened on Globex for the S&P E-Mini futures from three days ago until today. How would I retrieve all of this in one array, and also have the time stamps for each individual tick?

  • #2
    Re: Retrieving specific values at specific times

    Hello ptumati,

    In this thread, I posted a code example that shows how to drill down to the 1T level to look at the time stamp of a specific tick, which would be in local time. You could use this as a basis to get what you need. What you could do is initialize the xClose series inside the tickTime() function instead of main. Then you could use the time stamp logic there and loop through the xClose series until you find the trade at or after your specified time stamp. You could also pass the 1T data into an array within such a loop if you desire. To base the xClose series on an external symbol create the series with xClose = close(sym("GE,1T"));.

    At this time, EFS does not have the ability to access the exchange information you're after, however. Please feel free to submit a request for this to [email protected].
    Jason K.
    Project Manager
    eSignal - an Interactive Data company

    EFS KnowledgeBase
    JavaScript for EFS Video Series
    EFS Beginner Tutorial Series
    EFS Glossary
    Custom EFS Development Policy

    New User Orientation

    Comment

    Working...
    X