Announcement

Collapse
No announcement yet.

Formal definition of high() low(), etc.

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

  • Formal definition of high() low(), etc.

    Okay, I have a very silly question. I assumed we received a tick in EFS on each trade (after the historical bars). I assumed (incorrectly) that high(), low(), close(), and open() were the same as they would reflect the trade price.

    Based on my last test, I was wrong. So, am I wrong in assuming we get each trade? If we do get each trade, what are the formal definitions of high() open() close() and low()? Which one represents the trade price? Is the open() of the current tick equal to the close() of the last tick? Are these bid/ask price ranges between trades?

    You'd think after programming in EFS for over a year, I'd know this, but I couldn't find detailed enough descriptions in the documentation.

    Cheers,
    Michael

  • #2
    Re: Tick Definitions

    MBender,

    You know what they say about assume...

    close(0) represents the last trade price and all the other values represent their expected values as the bar progresses. This way, the close(0) value, represents the final closing price the last tick of the bar. In addition, the high(0), low(0) and open(0) values are finalized the last tick of the bar. The first tick of the new bar, everything re-indexes in reference to the current bar index.

    All all of these will be equal to the new bars initial value of close(0), and the last bar values can be accessed by referring to high(-1), low(-1), close(-1) and open(-1).

    The info is available in one of the earlier tutorials I believe, but have to admit, I'm not sure as to the exact location, it has been a while.

    You may want to look for Advanced chart and/or bar indexing to find it in the KnowledgeBase.

    FWIW, referring to to high(), low(), close(), and open() without the bar index retrieves the entire series and can be very inefficient. The ability to use this format and have it return a value was necessary to maintain backwards compatibility with efs files written in the original EFS1 format.

    Hope this makes sense and is helpful for you.

    Steve


    Originally posted by MBender
    Okay, I have a very silly question. I assumed we received a tick in EFS on each trade (after the historical bars). I assumed (incorrectly) that high(), low(), close(), and open() were the same as they would reflect the trade price.

    Based on my last test, I was wrong. So, am I wrong in assuming we get each trade? If we do get each trade, what are the formal definitions of high() open() close() and low()? Which one represents the trade price? Is the open() of the current tick equal to the close() of the last tick? Are these bid/ask price ranges between trades?

    You'd think after programming in EFS for over a year, I'd know this, but I couldn't find detailed enough descriptions in the documentation.

    Cheers,
    Michael

    Comment


    • #3
      Thank you, Steve

      Makes perfect sense. Thank you for a clear explanation.

      Interestingly, my real-time and historical tests have always tracked nicely; despite my confusion.

      Hmmmmm.

      Thanks again.
      Michael.

      Comment


      • #4
        Re: Thank you, Steve

        Hi Michael,

        You are most welcome, nice to hear it was helpful and made sense.

        Steve

        Originally posted by MBender
        Makes perfect sense. Thank you for a clear explanation.

        Interestingly, my real-time and historical tests have always tracked nicely; despite my confusion.

        Hmmmmm.

        Thanks again.
        Michael.

        Comment

        Working...
        X