Announcement

Collapse
No announcement yet.

calling max function

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

  • calling max function

    I'de like the MAX( v1,v2,v3) within efs program.
    I used the max function(above) and get the msg...function not defined?
    how would i define this function?
    thanks,
    Peter.

  • #2
    Hi Peter,

    Try Math.max(v1,v2,v3).

    Steve

    Comment


    • #3
      thanks steve, that works for the locating largest variable...
      I am trying to locate the highest SMA value as in MATH.max(sma(100), sma(50), sma(200));
      that is where I get the MATH function not defined???
      Peter.

      Comment


      • #4
        It is Math.max() I believe.

        sma(100), sma(50), sma(200) in this context may be series, I am not sure. Try debugPrintln(typeof(sma(100)) to see if it is a Series.

        Comment


        • #5
          Peter,

          forgot to say that JavaScript is case sensitive, so this may be part of the problem.

          Steve

          Originally posted by stevehare2003 View Post
          It is Math.max() I believe.

          sma(100), sma(50), sma(200) in this context may be series, I am not sure. Try debugPrintln(typeof(sma(100)) to see if it is a Series.

          Comment

          Working...
          X