Announcement

Collapse
No announcement yet.

Old script update

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

  • Old script update

    HI,

    I would like to convert a line of old code to efs2.

    Old code (3x3_DMA_EXT.efs) is (found as last statement in preMain():

    var v3x3dma = new MAStudy(3, 3, "Close", MAStudy.SIMPLE);

    My attempt (placed in function Main() within an "if (bInit == false)" statement (3x3_DMA_EXT-Alarm-Mine-hs Problem0.efs):

    v3x3dma= sma(3,close(),null,null,3);

    My attempt plots but differently (without the offset).
    Both scripts are attached in a zip file.

    Second question; Both of these statements seem to do the same thing. Is there any difference?

    return getSeries(v3x3dma);
    return v3x3dma.getValue(0);

    Thank you
    Attached Files
    Last edited by waynecd; 04-24-2008, 04:06 PM.

  • #2
    I found the function that offsets the data as in the original script [offsetSeries()].

    I still wonder what the difference is, if any, between:

    return getSeries(v3x3dma);
    return v3x3dma.getValue(0);

    Thank you.

    Comment


    • #3
      waynecd
      See this post by JasonK in reply to a similar question. Also see this thread for a practical example of what Jason explains in his post.
      In addition the getSeries() function is used also to access a specific Series Object within an array of Series Objects returned by efsInternal() or efsExternal().
      Alex


      Originally posted by waynecd
      I found the function that offsets the data as in the original script [offsetSeries()].

      I still wonder what the difference is, if any, between:

      return getSeries(v3x3dma);
      return v3x3dma.getValue(0);

      Thank you.

      Comment


      • #4
        Alex,

        Thank you.

        Comment


        • #5
          waynecd
          You are welcome
          Alex


          Originally posted by waynecd
          Alex,

          Thank you.

          Comment

          Working...
          X