AIQ is a part of Track Data Corporation (NASD symbol TRAC) www.trackdata.com


Combine Rules




 
 

 


 

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

  • Or is used to evaluate multiple conditions without all of the condition having to be true.

  • If you evaluate multiple conditions and only one condition is true then the rule will be true.

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.

And

  • And is used to combine multiple conditions.

  • If you use And to combine multiple conditions both conditions must be true to make the rule true.

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

  • Not is used to return the opposite of the specified condition.

  • Not can only include one rule.

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

  • Then is used to evaluate the first condition, if the first condition is true, then it will evaluate the second condition.

Example:  Rule if [close]>[open].

Rule1 if [close]>50.

Rule2 if rule1 then rule.

Rule2 will only evaluate rule if rule1 is true.