Announcement

Collapse
No announcement yet.

stochastic question

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

  • stochastic question

    I have placed a stochastic 25,3,3 (Stochastic Basic Study) and am trying to coordinate data w/ a partner using cqg. When testing end of bar data, I'm finding that the %K is almost exact, but the %D is pretty far off. He has said that this has something to do with smoothing not being turned on. I'm not sure where or how to turn smoothing on or off when I edit that basic study, or if this could be something else. Also, I have the feeling this may need to be a custom EFS, but not sure how to proceed. Any insight is appreciated.

  • #2
    If I remember rightly (this was more than a few years ago, and my memory ain't what it used to be) I determined that eSignal uses a simple MA when figuring %D. Which means if your partner is using an other method for calculating %D, then yes the values will be a might different.

    I don't think that eSignal allows you to change the method (as they do with MACD), so I think a custom EFS is in your future if you want to do this.

    I'll look to see if I kept my stoch.efs I wrote to determine how eSignal does their %d. If i find it, I'll post it to give you a starting point.

    Garth
    Garth

    Comment


    • #3
      thanks for the post. If you can find your stoch.efs to get started with, I'd much appreciate it, or if anyone else has info on setting up an efs that lets you edit the %D parameter to smoothing, thanks in advance

      Comment


      • #4
        Hi,

        Just some follow up. I spent a bit of my morning looking for the stoch.efs I wrote I couldn't find it. I may have very well deleted it during my cleanup of my files. Sorry, but if you run into problems let me know.

        Stochastic's isn't that hard to code, but it isn't trivial like a simple MA or ROC...

        Garth
        Garth

        Comment


        • #5
          stvchez
          The attached efs allows the price sources to be selected (defaults are Close, High, Low)
          This version was created by combining into one single script slightly modified versions of StochasticK.efs, StochasticHH.efs and StochasticLL.efs that are available in the Library folder. Then simple and exponential moving averages were added to create %D.
          All parameters for the Stochastic and moving averages studies can be modified using Edit Studies
          Alex
          Attached Files

          Comment


          • #6
            Thanks Alex,
            I think this is what I'm looking for. I opened up the efs in editor and modified it is as I saw fit. here is the modification I made:

            var fp4 = new FunctionParameter("STOMAType", FunctionParameter.STRING);
            fp4.setName("%D Type");
            fp4.addOption("MAStudy.SIMPLE");
            fp4.addOption("MAStudy.EXPONENTIAL");
            fp4.addOption("MAStudy.WEIGHTED");
            fp4.setDefault("MAStudy.SMOOTHED"); //Edit this value to set a new default

            When I test the data with the "standard" stochastic study, I get the exact same data and wonder if I missed anything from what you sent

            Comment


            • #7
              stvchez
              ("MAStudy.SMOOTHED") that you inserted as the default for the STOMAType is not an available moving average type in the builtin efs.
              I am actually surprised you are not getting a syntax error. It is possible that efs just interprets it as SIMPLE which is why the plot is the same as that of the Basic Studies Stochastic.
              Anyhow to change the type of moving average used in the Stochastic you do not need to edit the efs, just right click the indicator window, select Edit Studies and then select Simple, Exponential or Weighted from the dropdown list.
              Alex

              Comment


              • #8
                The attached revision of Stochastic(Adjust-Source-%D).efs now adds HL/2, HLC/3 and OHLC/4 as price sources.
                Alex
                Attached Files

                Comment

                Working...
                X