Variables, Lists, Pipes
Actions, Variables, and Data Pipes
Variables provide a way of labeling data with a descriptive name, so code can be understood more clearly.
The notation “->” designates a data pipe used to send a time series or other data to an action.
Actions take data in and produce data out and are formatted as
nameOfAction(parameters)
.
Multiple actions can be chained together in a single statement:
Comments
The characters "//" start a comment. Anything following on the same line is not executable EQL. There is no syntax for multi-line comments.
Parentheses
Parentheses can be used to control the order of execution of complex statements. For example, to sum rows and pass the sum to an action:
List Brackets [ ]
Brackets are used to group lists of items:
Ensembling Brackets @[:]
Brackets can be used to create a list (ensemble) from a set of consecutive rows.
This can be used to create a list of candidates for further operations.
Braces { }
Braces are used to denote a specific item in a list. The indexing is one-based.
They are most commonly used to address a specific TimeSeries in a list of TimeSeries
Symbols and Attributes
The symbol names of assets (cryptocurrency, security, ETF, etc) must always be capitalized
Attributes are values or metrics attached to a symbol or symbolList, using a period plus the attribute name.
The current list of attributes available:
open, high, low, close
ohlc
volume
The ohlc attribute displays a candlestick chart of open, high, low, and close. When used in further calculations, ohlc is equivalent to the close attribute.
Last updated