Announcement

Collapse
No announcement yet.

legacy EFS code question

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

  • legacy EFS code question

    Guys I am looking at some older EFS1 code:

    var Price = getValue("close", 0, -6);

    now it is the two numbers after the series name "close" that are confusing me. one or both are possibly bar indexes...

    if anyone can translate this into close(...) format or has any ideas I'd appreciate a shout...

    thanks

  • #2
    I am starting to think that Price is in fact an array (!) that takes 7 values from close(0) to close(-6)????

    Comment


    • #3
      mitboy,

      This should already be in the knowledgebase. Here is some cut/paste from the EFS Developer's Reference help file.

      getValue( barType, barIndex [, numBars] [, symbol] )
      Returns the value of the specified type at the specified bar index relative to the bar currently being processed.

      //retrieve the close from 10 bars ago
      myVar = getValue( "close", -10 );
      //retrieve the most recent 20 high values into an array
      myArray = getValue( "high", 0, -20 );

      In your case it is putting bars 0 to -6 into an array as you guessed.

      Steve

      Comment

      Working...
      X