Announcement

Collapse
No announcement yet.

Mathematical Error

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

  • Mathematical Error

    Hi,

    Can anybody help me understand why the attached EFS returns zero when Stochastic is 20?
    [Use NQ, 5min, and check 12/17 @ 8:30am PST, to reproduce].

    Thank you,
    Mihai Buta
    Attached Files
    Last edited by mbuta; 01-04-2005, 05:27 AM.
    Mihai Buta

  • #2
    Mihai
    Other than the fact that the label is showing only 2 decimals (of which the efs has no control) the math appears to be correct.
    In the top indicator pane I am plotting only vDS and in the bottom I am plotting the equation from your return statement. In blue is the result of the expression written using drawTextRelative
    Alex

    Comment


    • #3
      Alex,

      Thank you for your prompt response.
      I do fget correct returns all the time, except when stoch is 20, exactly and when the return should be [-1], but returns [-0].
      [Check NQ, 5min, Dec 17, 8:30 am PST to reproduce].

      Thank you again,
      Mihai
      Mihai Buta

      Comment


      • #4
        Please disregard this thread.
        Apparently I had a bad tick in the chart I was working with. I tried to reproduce and cannot.

        Sorry, for being stupid.

        Mihai
        Mihai Buta

        Comment


        • #5
          Mihai
          I see that the Cursor Window is reporting -0. Internally though the efs is calculating correctly (see attached image)
          Alex

          Comment


          • #6
            Mihai
            Here is an interim solution.
            Add a null check for vDS then in the return use
            return (vDS.toFixed(2) - 50)/30;
            This should return the correct value also to the Cursor Window
            Alex

            Comment

            Working...
            X