Announcement

Collapse
No announcement yet.

Capturing Previous Data

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

  • Capturing Previous Data

    I'm trying to capture the previous result of a Moving Average to put in a Watch List. Tried to change a few functions like Prev_Close.efs, PrevWeeksHHLL.efs, getPrevWeeksOHLC.efs, but no success so far. Anyone here that can shed some light I'd appreciated.

    Thanks.

    RicaVespa

  • #2
    RicaVespa
    Just use the built-in Moving Average and apply to it an Offset of 1 which essentially displaces the entire average forward by one bar thereby returning the prior bar's Moving Average value on the current bar
    Alex


    Originally posted by RicaVespa View Post
    I'm trying to capture the previous result of a Moving Average to put in a Watch List. Tried to change a few functions like Prev_Close.efs, PrevWeeksHHLL.efs, getPrevWeeksOHLC.efs, but no success so far. Anyone here that can shed some light I'd appreciated.

    Thanks.

    RicaVespa

    Comment


    • #3
      Errr !!! can't believe it it was there in front of my nose all this time.

      You Senior User guys rock,

      Thank you Alex.

      Comment


      • #4
        Why the getPrevWeeksOHLC.efs formula can't be used in a watch list? I'm trying to retrieve those prices (O/H/L/C) from the previous week bar, even the built-in formulas "PrevOpen.efs", "PrevHigh.efs", "PrevLow.efs" and "PrevClose.efs" do not work on the watch list. Does anyone know why that happens?
        Thanks.

        RicaVespa

        Comment


        • #5
          RicaVespa

          Why the getPrevWeeksOHLC.efs formula can't be used in a watch list?
          I am assuming that you are referring to the formula in this article in the EFS KnowledgeBase
          If so then the explanation is contained in the Notes section of that same article [and for that matter in a comment in the formula itself] that clearly indicates that the formula is meant to be used in conjunction with other formulas and/or functions calling it.
          That aside that formula is at this point somewhat outdated as it uses legacy functions rather that the EFS2 functions which provide multi-interval capabilities directly.

          even the built-in formulas "PrevOpen.efs", "PrevHigh.efs", "PrevLow.efs" and "PrevClose.efs" do not work on the watch list. Does anyone know why that happens?
          Again this should be apparent if you open any one of those the formulas where you would see that:
          a) those formulas will interrupt execution if the interval on which they are running is Daily, Weekly or Monthly (see line 26 and 27 of any one of the formulas you referenced). The Watch List column in which you are running those formulas is likely to be Daily (as that is the default) in which case the formula will not execute. If you change the interval of the column to an intraday interval you would see that those formulas actually work.
          b) furthermore each of those formulas specifically sets the corresponding function to use the Daily interval (see line 30 of any one of the formulas you mentioned).
          For more information on the functions used in those formulas together with detailed examples of their use see the related articles in the EFS KnowledgeBase. You can search the EFS KnowleddgeBase for close() or high() etc, See also this post in the EFS forum for additional examples.
          If you are unfamiliar with programming in EFS you may want to take some time to learn about it especially if you are planning on using EFS.
          To this effect I would suggest that you review the JavaScript for EFS videos and the Core JavaScript Reference Guide
          Those will provide you with a thorough introduction to programming in JavaScript which is at the foundation of EFS. Then go through the EFS KnowledgeBase and study the Help Guides and Tutorials which will provide you with the specifics of EFS. Also search the forums as they are an invaluable resource in as much as many of the things you may be trying to do may have already been discussed before (and some times at length)
          Lastly, I already provided you a simple method on how to accomplish what you are seeking. Just apply the same logic and set the interval of the column to Weekly and the Length of the Average to 1
          Alex


          Comment


          • #6
            Many thanks Alex for the thorough explanation,
            I observe the formula notes right after I had posted my question,
            Little by little I'm digging into the JavaScript processes as I'm already reading the material you cited above and messing around with those efs formulas,
            As I'm looking forward to use more of the efs capabilities in the future.

            Once again Thank you,

            RicaVespa

            Comment

            Working...
            X