Announcement

Collapse
No announcement yet.

stochK

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

  • stochK

    stochK( nKLength , nKSmoothing , nDLength [, Series | sym() | inv() ][, nBarIndex ] )


    Why is nDLength an input to the stochK function? It appears to be unused by the function which is what I would expect. To confirm this I vary values for nDLength while holding the other values constant and there appears to be no change what so ever to the output of the function.

    Can anyone confirm this? It would be proper for eSignal to publish the actual formula or even the actual code for indicator functions like this so that the community can see precisely how they are defined.

  • #2
    Hello Mike,

    nDLength is the number of periods for smoothing the %K line. The parameter is working properly on my end. You may have some type of error in your code. Please post your code and we'll take a look.

    To see how this study is calculated you can view the code for StochasticK.efs and StochasticD.efs in \Formulas\Library\ folder.
    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


    • #3
      Actually Mike, for the stochK() function, that parameter is not used. Your observations were correct. The parameter was included in the function for the sake of consistency with the stockD() function.
      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


      • #4
        Ok

        Below is the simple code I've used to experiment with the stochK function. I've also attached some screen shots to show that as I modify the nDLength from 1 to 5 to 10 the indicator graph does not change.

        As I examine the definition of the stochastic as defined in the public literature I see that the only two parameters in that definition are the kLength and kSmoothing. DLength only comes into play in the %D calculation.

        Stochastic defintion as I find it in the public domain:

        %K = 100 x ((close - Low(nK)) / (High(nK) - Low(nK)))

        and kSmoothing is used to average (smooth) the raw %k.

        As I examine the Forumulas/Library/StochasticK.efs it appears as though my suspicion is correct. The main function in StochasticK.efs only has two parameters; length and smooting. There are no 3rd, 4th etc parameters in that main function.

        Is Forumlas/Library/StochasticK.efs the actual implementation of the stochK function? Or is it there for some other purpose?
        Attached Files
        Last edited by mikem2006; 03-12-2009, 10:42 AM.

        Comment


        • #5
          Originally posted by eSignal_JasonK
          Actually Mike, for the stochK() function, that parameter is not used. Your observations were correct. The parameter was included in the function for the sake of consistency with the stockD() function.
          Ah I just saw this after my 2nd post.

          So then would it not be appropriate to correct the efs documentation?

          Thanks

          Comment


          • #6
            Hello Mike,

            The documentation is actually correct. You will need to specify the nDLength parameter so that any of the optional parameters can be accepted properly (if used).
            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


            • #7
              Originally posted by eSignal_JasonK
              Hello Mike,

              The documentation is actually correct. You will need to specify the nDLength parameter so that any of the optional parameters can be accepted properly (if used).
              Ok that's confusing. You just said the parameters are not used for the stochK function, that they're only there for consistency with the stochD function.

              Are you now modifying that statement?

              I see on the doc page on stochK stochD that in order to pass the functions a series object one would have to pass the DLength in order to get the Series object in the 4th parameter. But I still don't think that the DLength is used in calculating the stochK function. Agreed?

              Would it be accurate to say that in the stochK function the 4th argument nDLength is a dummy or placeholder argument? And that it is not actually used for anything?

              If that is accurate then I think the documentation should reflect it.

              Comment

              Working...
              X