Announcement

Collapse
No announcement yet.

new MAStudy(); previous bar value

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

  • new MAStudy(); previous bar value

    Hi, I have a study that is looking for the 60 minute VWAP to be curving up or down.

    var xMA3 = new MAStudy(60, 0, "Close", MAStudy.VOLUMEWEIGHTED);

    var nVWAP3_1 = xMA3.getValue(-1);

    this is returning null?

    Am i trying to do something that should be done using another method? In my function return I am not sending out nVWAP3_1 as I dont want to plot I just want to access this inside the main() function.

    Any ideas on why this is returning null into the EFS output window when I debug out to window?

  • #2
    markswall
    The method used to retrieve the value is incorrect and should be xMA3.getValue(MAStudy.MA,-1);
    See this article in the EFS KnowledgeBase for the complete syntax required by the function.
    Alex

    Comment

    Working...
    X