Announcement

Collapse
No announcement yet.

New EFS2 Functions - Using EFS1 as input

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

  • New EFS2 Functions - Using EFS1 as input

    Alex,

    I did not want to reply to your original post [looks too good as is], but I have a question related to your MACD example in that post:

    Is it possible to achieve the same thing without declaring the "new MACDStudy(....)" three times, but using its three outputs [macd, signal, hist]?

    Somewhat related question: Is it allowed to declare a new series as the diference betwen other two, without using esfInternal?
    Ex: newSeries = Series1 - Series2, where Series 1 and 2 are declared.

    Thank you,
    Mihai
    Mihai Buta

  • #2
    Mihai

    Is it possible to achieve the same thing without declaring the "new MACDStudy(....)" three times, but using its three outputs [macd, signal, hist]?

    That is now possible with the enhanced efsInternal() or efsExternal() functions that are available with version 7.9.1 (currently in Release Candidate). You would create only one external function/efs that returns the array (ie macd, signal and hist) then using getSeries() you would retrieve the elements of the array from efsInternal() or efsExternal().

    Is it allowed to declare a new series as the diference betwen other two, without using esfInternal?

    No the result will be a value not a series so you need to use efsInternal() or efsExternal() if you want it to be a series.
    Alex

    Comment


    • #3
      Alex,

      Thank you.

      I also assume that in 7.9.1 we can use any EFS1 study as input for EFS2 series. Is this a correct assumption?

      When can we download the 7.9.1?

      Mihai
      Mihai Buta

      Comment


      • #4
        Mihai

        I also assume that in 7.9.1 we can use any EFS1 study as input for EFS2 series. Is this a correct assumption?

        Not sure as to what you are asking. Do you mean use it directly or through efsInternal()/efsExternal()?
        Also just to verify that we are referring to the same thing I am specifically referring to this post in which I show an example of how to use an EFS1 study in an EFS2 context.

        You can download 7.9.1 Release Candidate 4 here
        Alex

        Comment


        • #5
          Alex,

          Actually, both cases are useful.

          Example:

          var studyMACD = NewStudy MACD(...);
          var MACD = getValue(StudyMACD, MACDStudy.MACD);
          var MACDRSI = rsi(y, MACD);
          or
          var NormalizedMACD = esfInternal("MACDNormalizationFunction");

          where
          function MACDNormalizationFunction(Study) {
          var NormalizationValue = zzz;
          return getSeries(Study)*NormalizationValue;
          }
          Last edited by mbuta; 07-02-2005, 03:32 PM.
          Mihai Buta

          Comment


          • #6
            Mihai
            You cannot use the EFS1 study as a source of an EFS2 study as shown in your first example.
            Alex

            Comment


            • #7
              Alex,

              Can you please modify the example in your original post, to show the correct way to use the three components of an EFS1 MACD study to declare new EFS2 series?

              If allowed, please declare the EFS1 study outside main.

              Thank you.
              Mihai Buta

              Comment


              • #8
                Mihai
                You already have an example of the new efsInternal() functionality in this post.
                All you need to do is modify function example() as shown below
                Alex

                PHP Code:
                var myMACD null;

                function 
                example(){

                    if(
                myMACD==nullmyMACD = new MACDStudy(12,26,9,"Close",false,false);

                    return new Array (
                myMACD.getValue(MACDStudy.MACD), myMACD.getValue(MACDStudy.SIGNAL), myMACD.getValue(MACDStudy.HIST))

                Comment


                • #9
                  Alex,

                  Thank you.
                  Just to make sure I understand correctly:
                  b/ any function can become an EFS2 data series, as long as it is called with efsInternal and
                  b/ inside that function we can use complex calculations and EFS1 and/or EFS2 studies.

                  Are there any restrictions we need to observe?

                  Thank you [and that would be all for this holiday weekend].
                  Mihai Buta

                  Comment


                  • #10
                    Mihai
                    That is correct. A function or efs becomes a series when called with efsInternal() or efsExternal() and can contain complex calculations, EFS1 and/or EFS2 studies. As to restrictions I can't think of any off the top of my head (which is not the same as saying that there are none)
                    Alex

                    Originally posted by mbuta
                    Alex,

                    Thank you.
                    Just to make sure I understand correctly:
                    b/ any function can become an EFS2 data series, as long as it is called with efsInternal and
                    b/ inside that function we can use complex calculations and EFS1 and/or EFS2 studies.

                    Are there any restrictions we need to observe?

                    Thank you [and that would be all for this holiday weekend].

                    Comment

                    Working...
                    X