Announcement

Collapse
No announcement yet.

application of an array of objects in EFS

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

  • application of an array of objects in EFS

    Could someone please help me with the coding of an array of objects in efs. I tried to implement the example given in the help file of efs. See attachment below. When I try to print the content of the objects in the output window I get the error message: Type error: myArray[x] has no properties. There is certainly a logical error in the code, but i do not understand it.
    Attached Files

  • #2
    rugosoft:

    Your array logic was just fine. The problem was accessing historical data when BARSTATE_ALLBARS was set. Try the attached version with a slight modification and you will see it works just fine.

    Chris
    Attached Files

    Comment


    • #3
      Thanks for the quick response!, the new version works. I do not yet understand why my version does not work. Can you explain that to me. Just to get to understand the efs scripting tool a little bit better.

      Thanks

      RH

      Comment


      • #4
        When ALLBARS is true, it means all the bars are being reiterated and you are at the oldest bar...so there is no historical data to look back at.

        This means that your high(-x) was getting null returns.

        Chris changed it so that it wouldn't start calculating until you were at the next to latest bar (bar -1), so it would be a fairly safe bet that you would have the ability to look back -20.

        G
        Garth

        Comment


        • #5
          Thanks!, That makes sense. I am a little step further on my learning curve!

          Rh

          Comment

          Working...
          X