Announcement

Collapse
No announcement yet.

Series parameter syntax

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

  • Series parameter syntax

    Hi,

    Series Syntax (eg.)

    cci( nLength [, Series | sym() | inv() ][, nBarIndex ] )

    why not?

    cci( nLength [, Series ] [, sym() ] [, inv() ][, nBarIndex ] )

    Around these parameters to combine must always form a function:

    // <--- snip
    function main()
    {
    var sCCI20 = cci(20, efsInternal("hlc3", inv(5)));
    }

    function hlc3()
    {
    return ((high() + low() + close()) / 3); //calculate hlc3
    }
    // <--- snip

    You should fire your system designers!

    Regards,
    geme
    Last edited by geme; 02-06-2009, 12:05 AM.

  • #2
    Hello geme,

    The built-in study functions are overloaded functions, which allow for a number of combinations to be used without having to pass nulls for the unused parameter choices.

    This allows you to use a combination of parameters that will always be 3 or less.



    The second parameter that you are highlighting is a choice of one of the three options, Series, sym() or inv(). A Series can have an external symbol and/or interval embedded. The sym() parameter could also have in external interval embedded. The current design gives you the following possibilities.

    1 cci( nLength , Series )
    2 cci( nLength , sym() )
    3 cci( nLength , inv() )
    4 cci( nLength , Series , nBarIndex )
    5 cci( nLength , sym() , nBarIndex )
    6 cci( nLength , inv() , nBarIndex )

    To use your suggestion, a null value would have to be passed for the unused parameters to specify any of the optional parameters that follow it, which would require the following syntax for the six possibilities above.

    1 cci( nLength , Series )
    2 cci( nLength , null , sym() )
    3 cci( nLength , null , null , inv() )
    4 cci( nLength , Series , null , null , nBarIndex )
    5 cci( nLength , null , sym() , null , nBarIndex )
    6 cci( nLength , null , null , inv() , nBarIndex )

    Hope this helps.
    Jason K.
    Project Manager
    eSignal - an Interactive Data company

    EFS KnowledgeBase
    JavaScript for EFS Video Series
    EFS Beginner Tutorial Series
    EFS Glossary
    Custom EFS Development Policy

    New User Orientation

    Comment

    Working...
    X