Announcement

Collapse
No announcement yet.

slow stochastic

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

  • slow stochastic

    I am look for a slow stochastic. The variables should be %K. %K smoothed and %D smoothed. I downloaded the file Stochastic%D, and it had what I was look for. But esignal kept giving me an error with the file.

    the beggar

  • #2
    mforeman
    What error message are you getting?
    Also, in order for someone to try an replicate the issue you need to provide a link to where you downloaded the efs or attach the efs itself.
    Alex

    Comment


    • #3
      function main(inputKLength, inputKSmoothing, inputDSmoothing) {
      if(inputKLength == null)
      inputKLength = 14;
      if(inputKSmoothing == null)
      inputKSmoothing = 1;
      if(inputDSmoothing == null)
      inputDSmoothing = 3;

      var nSmoothing = inputDSmoothing;
      var i;
      var ret;
      var sum = 0;
      var negi;


      for(i = 0; i < nSmoothing; i++) {
      ret = Call("StochasticK.efs", inputKLength, inputKSmoothing, -i);
      if(ret == null)
      return -1.0;

      sum += ret;
      }

      sum = sum / nSmoothing;

      return sum;
      }

      It was downloaded from tsSupport StochasticD.eft


      Line:23
      formula file not found: Stochastic.efs

      Thanks in advance
      ret = Call("StochasticK.efs", inputKLength, inputKSmoothing, -i);

      Comment


      • #4
        mforeman
        You are getting that error message because the efs is located in a different folder from the one that contains the called efs and/or there is no path defined to that efs in the Call() function.
        You have two solutions to fix this. Either move this efs to the Library folder [which contains the called efs] or change line 23 to the following
        ret = Call("\\Library\\StochasticK.efs", inputKLength, inputKSmoothing, -i);
        Alex

        Comment


        • #5
          It worked, but I thought it was going to plot SlowD and Slow K. Is there a way for me to add slow K to the chart with it? Or modify the efs to display SlowK

          The Beggar

          Comment


          • #6
            mforeman
            Actually the script you posted calculates and plots Slow %K and not Slow %D.
            If you want a script that calculates Slow %D then use Stoch(SlowD).efs that is available here
            Alex

            Comment


            • #7
              The script is showing stochK, stochD, and SlowD. How can I get the slow K to show up on the same chart? Would I have to use a separate slowK efs and overlay them?

              Comment


              • #8
                mforeman
                The script already calculates and plots the Slow %K. Just set the %K Smooth parameter to a value other than 1 (which is the default).
                Alex

                Comment

                Working...
                X