New Members: Be sure to confirm your email address by clicking on the link that was sent to your email inbox. You will not be able to post messages until you click that link.

Comparison Scans

Just wondering if there is syntax that can be used for comparing two similar measures, such ATR(5)/price “compared to” ATR(63)/price. Thanks.

Comments

  • markdmarkd mod
    edited September 2015
    Do you mean something like this?

    [group is sp500]

    and [[ATR(63)/close] > [ATR(5)/close]]

    There is no "compared to" operator, so you have to use one of the usual comparison operators " >, <, =, !=. >=, <=, and x".

    See the Instructions page for what each does (tried to paste the link in here, but it doesn't work right for some reason. I'll post it separately).


    Also, you would isolate the operations you want to compare with square brackets, not parentheses, which are reserved for functions. And finally, group the two sides of the comparison operation itself.

    So, first step:

    all statements except the first one begin with "and" and contain a pair of brackets "[ ]"

    so,

    and [ ]

    Second step

    Build the two operations you want to compare inside brackets of their own

    and [ [ATR(63)/close] [ATR(5)/close] ]

    Third step

    Decide what relationship you want between the two operations

    and [ [ATR(63)/close] > [ATR(5)/close] ]

    Done.
  • Thanks, Mark, for your reply. I've been using both '<' and '>' with good effect, but appreciate your confirmation of operations that can be used. Much appreciated. I'd been waiting for an email notification of a reply, but realized I hadn't set that preference.

    Thanks again,
    davemon
Sign In or Register to comment.