Announcement

Collapse
No announcement yet.

getValue for EFS2

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

  • getValue for EFS2

    After multiple ways of trying to figure out why I cannot get this to work, I have come to you guys once again.

    When using "getValue" to try and call the value including the "inv" added in EFS2 I am having no luck.

    As stated in the KnowledgeBase here are the way the fields are suppose to work.

    PHP Code:
    getValuebarTypebarIndex [,numBars] [, sym()] [, inv()] ) 
    I have tried the following ways to be able to retrieve the value, but it seems to ignore the "inv" and just pull from the interval currently loaded on the chart.

    PHP Code:
    getValue"Close", -1nullnullinv(90)); 
    PHP Code:
    getValue"Close", -1inv(90)); 
    Am I missing something here?
    Excellent book on JavaScript for beginners

  • #2
    Hi Dan,

    Try either close(-1, inv("90")) or close(-1, inv(90)) as both of these work well.

    Comment


    • #3
      Hi Steve,

      Are you suggesting I drop the "getValue"? (Sorry, I was'nt clear about that.)

      What about the ability to use the "numBars"?

      I am sorry, but this one has looped me.

      I ran into further in my code where I came across trying to use this for "getValue".

      PHP Code:
      var myVar getValue ("Low"0, -19nullinv(15)); 

      Comparing to what the Knowledgebase says it would appear I coded it right, but no go.

      PHP Code:
      getValuebarTypebarIndex [,numBars] [, sym()] [, inv()] ) 
      Excellent book on JavaScript for beginners

      Comment


      • #4
        Hi Dan,

        I believe that using the format I suggested is simpler to use. Please check this link out.

        Comment


        • #5
          Thanks for the help Steve.

          Unfortunately I need to use the "getvalue" on this one unless I go back and rework my code. I did go back and look through the KnowledgeBase and the EFS2 toolbox and some others stuff.

          I think the updated "getValue" doc in the KnowledgeBase may have a typo because I can't find any uses of 'inv" in "getValue".

          I will email support to see if this is an actual option or if it was just a typo.

          Thanks again,
          Excellent book on JavaScript for beginners

          Comment


          • #6
            FibbGann
            The option to return a specified number of bars (ie the "numBars" parameter you are referring to) is not available with the EFS2 series functions. You can however retrieve any specific value of a series by using either the syntax Steve suggested ie
            var myVar = close(-x, inv(your_interval))
            or by first declaring the series and then retrieving the value ie
            var myVar = close(inv(your_interval));
            var myVar_X = myVar.getValue(-x);

            where -x is the bar index offset (for example -1 will retrieve the value of 1 bar back, -2 that of 2 bars back, -19 that of 19 bars back, etc)
            The sym() and/or inv() series objects are not avalialble with the EFS1 function getValue(). You can however specify a symbol or a symbol/interval in getValue() as in the following example
            var myVar = getValue("Low", 0, -19, "ES Z5, 60")
            For more information on getValue() see this article in the EFS KnowledgeBase
            Alex

            Comment


            • #7
              Alex,

              Your right, as I came to that conclusion last night after reading some more.

              Thank you both for your time.
              Excellent book on JavaScript for beginners

              Comment

              Working...
              X