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


Syntax




 
 

 


 

The syntax of EDS is very basic programming language.

We will go over the basic terms and structure of EDS language.

Rules

  • Rules are the back bone of EDS.

  • Rules tell EDS what results you want to see from your reports.

  • Rules are made up of a Rule name and the Rule body.

  • Rules always have "if" separating the Rule name and Rule body.

  • A Rule always begins with a Rule name and ends with a period.

Rule name

  • A Rule name is a name, specified by you, given to the rule you are creating.

  • A Rule name must be a single word of 64 characters or less.

  • A Rule name may contain only letters and numbers.

  • A Rule name must start with an alpha (A - Z) character.

Rule body

  • The Rule body is what you want your Rule to accomplish. 

  • The Rule body contains Fields, Key words, and Functions.

Fields

  • Data values that are available to use in an EDS report. 

  • Price, volume, indicator, and expert rating values are accessible.

  • Fields are always enclosed in brackets [ ].

Key words

  • Mathematical, logical operators and conditions are all Key words.

  • (=,+,*,>,and,or,not,>) Are examples of Key words.

Functions

  • Functions are preset mathematical operations programmed into EDS.

  • Functions require parentheses ( ) to surround the computation.

  • Functions are the most important concept of EDS to learn.

  • See the Functions section of this web site for more help with functions.

Example of a Rule: Rule if val([Close],1) > 10.

  • Rule is the Rule name.

  • "if" attaches the Rule body to the Rule name.

  • val([Close],1) > 10 is the Rule body.

  • val is a Function.

  • [Close] is a Field.

  • > is a Key Word.

    

This example will return all tickers that had a closing price yesterday of greater than $10

User Defined Functions(UDF's)

  • UDF's are used to create custom indicators, add special columns to reports, and to simplify rule building.
  • A UDF name (name of function) always occurs first followed by a blank space. 
  • The UDF body which follows is only capable of returning a numeric value or a date.
  • UDF's are always created by the user.
  • A UDF can only be used within the document in which it was created.
  • A UDF always begins with a UDF name and ends with a period.

      UDF name

  • A UDF name can contain up to a maximum of 64 characters.
  • A UDF name is always followed by "is".
  • A UDF name may contain only letters and numbers.
  • A UDF name must start with an alpha (A - Z) character.

UDF body

  • The UDF body contains Fields, Key words, and Functions.
  • The UDF body defines a value to the UDF name

Example of a UDF: Close is [close].

  • Close is the UDF name.
  • "is" attaches the UDF name to the UDF body.
  • [close] is a field that returns the close.

This example returns the current close price of the ticker.

Close can be added as a custom indicator,  a column in EDS, or to use to help build rules.

 

User Constants

  • Must begin with the word define and end with a period.

  • Constant name follows define.

  • Constant name can contain up to 64 characters.

  • The Constant name can only be assigned a  numerical value.

  • User Constants are used to simplify EDS design.

Example of a User Constant: Define ER 95.

  • Define is the function that will assign the value to the Constant name.

  • ER is the Constant name.

  • 95 is the numerical value that ER will equal.

Comments

  • A comment is used to explain EDS code or to trouble shoot EDS code.

  • A comment must begin with a exclamation point and doesn't need to end with a period.

  • All comments are ignored by the EDS compiler.

Example of a User Constant: !This rule will return stocks that are greater than $10.

  • "!" defines the statement as a comment.

  • Anything after the "!" is only a comment and is not recognized or computed by EDS.