Announcement

Collapse
No announcement yet.

HELP! efsInternal returning 2 data series

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

  • HELP! efsInternal returning 2 data series

    Hi

    I am trying to return and use two data series from an efsInternal call ... I cannot get it working ... nothing is even produced by the debug statement - ANY help much appreciated.

    Thanks

    Paul


    function main () {




    barState = getBarState();
    barIndex = getCurrentBarIndex();



    if (barIndex == 0) {

    var p = efsInternal("fib05");

    var a = p.getSeries(p,0);
    var b = p.getSeries(p,1);

    debugPrintln("a "+a.getValue(0)+" b "+b.getValue(0));

    drawLineRelative(-10, a,0, a,PS_SOLID,4,Color.green ,107);
    drawLineRelative(-10, b,0, b,PS_SOLID,4,Color.green ,108);
    }


    }

    function fib05() {

    x = lowest (55,low (inv( 5)));
    y = highest(55,high(inv( 5)));

    r = y.getValue(0) - x.getValue(0);

    z = x.getValue(0) + 38.2/100 * r;
    v = x.getValue(0) + 61.8/100 * r;

    return new Array (z,v);

    }

  • #2
    Paul
    The syntax used to retrieve the individual series from the efsInternal() call is incorrect. Replace
    var a = p.getSeries(p,0);
    var b = p.getSeries(p,1);

    with
    var a = getSeries(p,0);
    var b = getSeries(p,1);

    and it should work
    Alex

    Comment


    • #3
      Alex

      Thanks so much again !!! That was a dumb one from me!

      Paul

      Comment

      Working...
      X