Announcement

Collapse
No announcement yet.

tweak the custmoStoch.efs

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

  • tweak the custmoStoch.efs

    When I try to tweak the custmoStoch.efs by adding 0.5 to the following line, there are no syntax erros but when I add the study to a symbol, I only see "Pending.": It never display anything. When I take away the 0.5, then I see the plots of the study. What am I doing wrong?

    xStochK = stochK(KLength,KSmoothing,DLength,sym(vSymbol));

  • #2
    rcbenjamin
    What exactly do you mean by "adding 0.5 to the following line"?
    You should post the script - or relevant section of it - as you have it modified so that others who may be trying to help you do not have to guess what you are doing
    Alex


    Originally posted by rcbenjamin View Post
    When I try to tweak the custmoStoch.efs by adding 0.5 to the following line, there are no syntax erros but when I add the study to a symbol, I only see "Pending.": It never display anything. When I take away the 0.5, then I see the plots of the study. What am I doing wrong?

    xStochK = stochK(KLength,KSmoothing,DLength,sym(vSymbol));

    Comment


    • #3
      I apologize for not being clear. Let's try it again:

      Original Script: xStochK = stochK(KLength,KSmoothing,DLength,sym(vSymbol));
      Modified Script: xStochK = stochK(KLength,KSmoothing,DLength,sym(vSymbol))+0. 5;

      After checking the syntax for no errors, I add the revised customStoch.efs to a chart and get "Pending". When I delete the 0.5, it runs perfectly

      Comment


      • #4
        rcbenjamin
        When you modify through some math (ie addition, subtraction, etc) a series object - such as the one you are initializing in the original line of code - the result is a value and not a series object.
        In the return statement the script is calling for a series object [using getSeries(xStochK)] and cannot find it - because of what I just explained above - thereby hanging in the process. This is not a syntax error [which is what the syntax checker looks for] but a logic error which is why you do not get any error messages when verifying the script.
        To accomplish what you want you should add 0.5 in the return statement ie getSeries(xStochK)+0.5 rather than in the initialization routine
        Alex


        Originally posted by rcbenjamin View Post
        I apologize for not being clear. Let's try it again:

        Original Script: xStochK = stochK(KLength,KSmoothing,DLength,sym(vSymbol));
        Modified Script: xStochK = stochK(KLength,KSmoothing,DLength,sym(vSymbol))+0. 5;

        After checking the syntax for no errors, I add the revised customStoch.efs to a chart and get "Pending". When I delete the 0.5, it runs perfectly

        Comment


        • #5
          Alex,

          It looks like this issue is a very easy fix and should not require too much more of your time which is a good. There is still something wrong--and I am sure it is in my understanding because when I write this new line below the original script, I still get the "Pending" error. Would you please writ the corrected code that will give allow the script to stop hanging up. Thanks for your help

          Original Script: xStochK = stochK(KLength,KSmoothing,DLength,sym(vSymbol));
          New Line Below the Original Script: xStochK=xStochK+0.5;

          Comment


          • #6
            rcbenjamin
            As I indicated in my prior message the solution to what you are trying to do is to simply change getSeries(xStochK) to getSeries(xStochK)+0.5 in the return statement of the original formula (ie in line 88).
            Alex.


            Originally posted by rcbenjamin View Post
            Alex,

            It looks like this issue is a very easy fix and should not require too much more of your time which is a good. There is still something wrong--and I am sure it is in my understanding because when I write this new line below the original script, I still get the "Pending" error. Would you please writ the corrected code that will give allow the script to stop hanging up. Thanks for your help

            Original Script: xStochK = stochK(KLength,KSmoothing,DLength,sym(vSymbol));
            New Line Below the Original Script: xStochK=xStochK+0.5;

            Comment

            Working...
            X