Announcement

Collapse
No announcement yet.

Math.max(C, D(0), E)

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

  • Math.max(C, D(0), E)

    Code:
    x = (A+B) Math.max(C, D(0), E) + Math.min(F, G(0), H )  ) / 4;
    Hi Folks,

    Still working on learning code. I need some help with the above.

    I think it is saying, add A and B together.

    Then take the highest of C, D(0), E and add it to the lowest of F, G(0), H.

    Multiply the total by the result of (A+B) [I am thinking it is multiplication since they are next to each other with no operator].

    Then divide the result by 4.

    Also, D and G have (0) which I am translating as the current period.

    How did I do?
    Don

  • #2
    Re: Math.max(C, D(0), E)

    Don
    I am assuming you are referring to the following section of code in the HA_ZeroLag_TEMA.efs.
    PHP Code:
    var nHaCl = (n4 nHaO +
            
    Math.max(n4high(0), nHaO) +
            
    Math.min(n4low(0), nHaO )  ) / 4
    If that is the case then the parenthesis after the B in your code should be a plus sign
    That aside your understanding of the code is correct
    Alex


    Originally posted by schu7044
    Code:
    x = (A+B) Math.max(C, D(0), E) + Math.min(F, G(0), H )  ) / 4;
    Hi Folks,

    Still working on learning code. I need some help with the above.

    I think it is saying, add A and B together.

    Then take the highest of C, D(0), E and add it to the lowest of F, G(0), H.

    Multiply the total by the result of (A+B) [I am thinking it is multiplication since they are next to each other with no operator].

    Then divide the result by 4.

    Also, D and G have (0) which I am translating as the current period.

    How did I do?

    Comment


    • #3
      Yes, you are correct. It should be a plus sign.

      Thank you
      Don

      Comment


      • #4
        Don
        You are welcome
        Alex


        Originally posted by schu7044
        Yes, you are correct. It should be a plus sign.

        Thank you

        Comment

        Working...
        X