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.
myVariable = BTC.close
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).
btcClose = BTC.close -> sma(20)
Multiple actions can be chained together in a single statement:
btcClose = BTC.close -> rsi(20) -> sma(20)


The characters "//" start a comment. Anything following on the same line is not executable EQL. There is no syntax for multi-line comments.
// This is a full-line comment
x = BTC.close // this is also a comment


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:
rowSum = (BTC.close + ETH.close + ATOM.close) -> cume()

List Brackets [ ]

Brackets are used to group lists of items:
myList = [BTC, ETH, SOL].close
myList= [BTC.close, ADA.close, ETH.close]

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.
BTC.close -> sma(40)
ETH.close -> sma(40)
SOL.close -> sma(40)
listOfRows = @[fromHere : toHere]

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
closeList = [BTC,ETH,SOL].close
thirdClose = closeList{3}

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
// Price attribute (ohlc shows a candlestick chart with open/high/low/close):
// Price/volume attribute:
// Attribute applied to a list of symbols
[BTC, ETH].close
[BTC, ETH].priceVolumeFactor
// Attributes can be applied inside a list
[BTC.open, BTC.close, ETH.open, ETH.close]
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.