Announcement

Collapse
No announcement yet.

Volume analysis

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

  • Volume analysis

    I am trying to analysis the voluem patterns on 15 minute charts and devised this efs - that is not working - to add up the volume on the each of the 15 minute bars - from the same time each day - and then report it in the Formula output window.

    Anybody see what is wrong?

    var x=new Array;
    var start=1;
    debugClear();
    function main(){

    time=(getHour()*60+getMinute())/getInterval();//should be 1-95 or so
    x(time)=x(time)+volume();
    debugPrintln(x(time))


    if(getCurrentBarIndex()==0&&start!=0){
    for(i=0;i<100;i++){
    debugPrintln("x("+i+")="+x(i))
    }
    start=0;
    }
    }

  • #2
    Hi David:

    One potential problem could be in how you are addressing the array 'x'

    ... should be x[time]

    rather than

    x(time)

    Chris

    Comment

    Working...
    X