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.
Announcement
Collapse
No announcement yet.
application of an array of objects in EFS
Collapse
X
-
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.
ChrisAttached Files
-
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.
GGarth
Comment
Comment