| |
Learning how to combine rules is an essential
part of EDS building.
This section will cover how to use the
logical operators user to combine rules.
The logical operators are or, and, not, and
not, then.
Or
Example: Rule if [close]>[open].
Rule1 if [close]>50.
Rule2 if rule1 or rule.
This example combines Rule and Rule1 with
"or" and returns stocks that had either a close that was greater
than the open or a close that was greater than $50.
Example: Rule if [close]>[open].
Rule1 if [close]>50.
Rule2 if rule1 and rule.
This example combines Rule and Rule1 with
"and" and returns stocks that had both a close that was greater
than the open or a close that was greater than $50.
Not
Example: Rule1 if [close]>50.
Rule2 if not rule1.
Rule2 uses the "not" operator to only return
tickers less than $50.
And Not
-
And not is used to return the opposite of the specified
condition.
-
And not can be used to combine multiple conditions.
-
One rule can meet its condition and the other rule cannot
meet its condition.
Example: Rule if [close]>[open].
Rule1 if [close]>50.
Rule2 if rule1 and not
rule.
Rule2 will return tickers that have a close greater
than $50 and do not close greater than the open.
Then
Example: Rule if [close]>[open].
Rule1 if [close]>50.
Rule2 if rule1 then rule.
Rule2 will only evaluate rule if rule1 is true.
|