Announcement

Collapse
No announcement yet.

Absolute value of open - close

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

  • Absolute value of open - close

    I'de like to use the math function abs to calculate difference between close and open so I don't have to use separate tests for long and short candles.

    This statement works: if (open() - close() <.01)....continue...
    Adding the abs function: if (abs(open() - close())<.01)....continue
    returns error in formula.(no error details).
    I don't have the math library loaded...not sure how to do that.
    Thanks for any suggestions.
    PeterJerome

  • #2
    Re: Absolute value of open - close

    PeterJerome
    The syntax is Math.abs() and not abs().
    For more information on the Math Object you may want to review this article in the EFS KnowledgeBase
    Alex


    Originally posted by peterjerome
    I'de like to use the math function abs to calculate difference between close and open so I don't have to use separate tests for long and short candles.

    This statement works: if (open() - close() <.01)....continue...
    Adding the abs function: if (abs(open() - close())<.01)....continue
    returns error in formula.(no error details).
    I don't have the math library loaded...not sure how to do that.
    Thanks for any suggestions.
    PeterJerome

    Comment

    Working...
    X