Announcement

Collapse
No announcement yet.

parameters for "new xxxStudy(..."

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

  • parameters for "new xxxStudy(..."

    There are several studies that can be coded using "new.xxxStudy" as I've found in some fileshare examples.
    i.e.,

    vMACD = new MACDStudy(Fast, Slow, Smoothing, Source, TypeOsc, TypeSig);

    (in the above code the last two parameters are boolean and I don't know to what they refer)

    1- Is there a link to a help file that describes the different "new.xxxStudy(..." that exist and their parameters?

    2- Also, is the following code redundant?

    /******************/
    if ( bInit == false ) {
    if (vMACD == null) vMACD = new MACDStudy(Fast, Slow, Smoothing, Source, TypeOsc, TypeSig);
    bInit = true;
    }
    /******************/

    3- If so, would the following code produce the same effect programatically by removing the "if (vMACD == null) " (the charts look the same, I'm just trying to understand the effect of the code)?

    /******************/
    if ( bInit == false ) {
    vMACD = new MACDStudy(Fast, Slow, Smoothing, Source, TypeOsc, TypeSig);
    bInit = true;
    }
    /******************/

    Thank you.
    Last edited by waynecd; 03-08-2008, 10:18 PM.

  • #2
    waynecd

    There are several studies that can be coded using "new.xxxStudy" as I've found in some fileshare examples.
    i.e.,
    Those studies are programmed using the efs1 functions. You can find a complete set of studies that use these functions in the Builtin subfolder of Formulas which is in your eSignal directory. These functions are also the ones used in the Formula Wizard.

    (in the above code the last two parameters are boolean and I don't know to what they refer)
    TypeOsc sets the MACD oscillator to be calculated using simple moving averages when true and exponential when false
    TypeSig sets the Signal Line to be calculated using a simple moving average when true and exponential when false
    These two parameters perform the same functions as the Simple Moving Average (Oscillator) and Simple Moving Average (Signal Line) checkboxes in the Basic Studies MACD
    As to your other questions
    1.You can find them listed in the EFS Glossary. These functions are recognizable because they all have "Study" in the function name (ie MACDStudy(), RSIStudy() etc). You can also search the EFS KnowledgeBase by their name
    2. In this case it is redundant. You can use either
    if(MACD==null) MACD = new MACDStudy(...)
    or the bInit routine and the result will be the same. Note however that there may be other cases where it may not be redundant
    3. Again in this case it would
    Alex


    Originally posted by waynecd
    There are several studies that can be coded using "new.xxxStudy" as I've found in some fileshare examples.
    i.e.,

    vMACD = new MACDStudy(Fast, Slow, Smoothing, Source, TypeOsc, TypeSig);

    (in the above code the last two parameters are boolean and I don't know to what they refer)

    1- Is there a link to a help file that describes the different "new.xxxStudy(..." that exist and their parameters?

    2- Also, is the following code redundant?

    /******************/
    if ( bInit == false ) {
    if (vMACD == null) vMACD = new MACDStudy(Fast, Slow, Smoothing, Source, TypeOsc, TypeSig);
    bInit = true;
    }
    /******************/

    3- If so, would the following code produce the same effect programatically by removing the "if (vMACD == null) " (the charts look the same, I'm just trying to understand the effect of the code)?

    /******************/
    if ( bInit == false ) {
    vMACD = new MACDStudy(Fast, Slow, Smoothing, Source, TypeOsc, TypeSig);
    bInit = true;
    }
    /******************/

    Thank you.

    Comment


    • #3
      Alex, Thank you.

      Comment


      • #4
        waynecd
        You are most welcome
        Alex


        Originally posted by waynecd
        Alex, Thank you.

        Comment

        Working...
        X