Announcement

Collapse
No announcement yet.

Study on Study?

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

  • Study on Study?

    Hi

    Where can I find a general outline for study on study and learn how to do it?

    -Rupe
    Last edited by rupe; 06-07-2006, 08:24 AM.

  • #2
    Hello Rupe,

    When looking at the EFS2 reference articles in the EFS KnowledgeBase for the Built-in Study Functions, anytime you see the "source" parameter option means you can specify another study as the source for that built-in. This can be done in-line or you can pass a Series Object variable to the function.

    Take the sma() function for example.
    sma( length [, source | sym() | inv()] [, barIndex] )

    If we wanted to create an sma() of sma() we could do the following.

    PHP Code:
    var xMyStudy null;

    function 
    main() {
        if (
    xMyStudy == nullxMyStudy sma(10sma(5) );
        return 
    xMyStudy.getValue(0);

    This creates a sma(10) of an sma(5) study.

    Alternatively we could do it this way.

    PHP Code:
    var xMyStudy1 null;
    var 
    xMyStudy2 null;
    var 
    bInit false;  // initialize flag

    function main() {
        if (
    bInit false) {
            
    xMyStudy1 sma(5);
            
    xMyStudy2 sma(10xMyStudy1);
            
    bInit true;  // studies are now initialized
        
    }

        return 
    xMyStudy2.getValue(0);

    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