Invalid API key entered.
Enter your API key to check your key's data access.Need an API key?
Your chart list could not be loaded due to a server error. Please try reloading the page.
The chart list is empty
The saved chart file is not compatible with this app. Please try a different file.
The Formula Builder supports a variety of argument types, depending on the specific function. Many formulas take both real numbers and time series as arguments. However, some functions will only take real numbers, and others will take only time series. There are a handful of functions that support dates. Some functions support lists. Most operations can be used in combination. To learn more about each function, view the "Syntax" tab, which will list the data type supported and will provide the appropriate syntax.
CM crypto data time series are represented by the AssetID.MetricID (e.g.,
To find MetricIDs and AssetIDs use the search functions located on the "Editor" tab. An AssetID can represent cryptoassets, exchanges, exchange-assets or indexes:
If an AssetID has a "-" (e.g., COINBASE-BTC), use the asset("Asset-ID").metricID notation e.g., asset("COINBASE-BTC").volume_reported_spot_usd_1d - for the time series. If a MetricID has a "." (e.g., SplyAdrBalNtv0.1), use the AssetID.metric("Metric.ID") notation (e.g., BTC.metric("SplyAdrValNtv.01") for the time series. Time series can be added, multiplied, subtracted and divided by one another (to name a few of the functions available). These operations are applied on a per-element basis. If one series does not have a value for a specific date, it is treated as zero at this date. Additionally, multiplication, division, and exponentiation can be applied by scalar and addition/subtraction by scalar on per element basis.
Integers and real numbers can also be added, multiplied, subtracted and divided by one another. And, formulas support both integers and real numbers. The standard operators are used for these operations: addition (+), subtraction (-), multiplication (*), division (/), modulo (%) and exponentiation (^). You can also check numbers for equality (=) and they can be compared (<,>,=<, >=), which return boolean (true/false) values. Boolean values support "and", "or" and "not" operations.
Dates are often called as an argument in a formula. Internally, a date is represented as the number of milliseconds passed since January 1st, 1970. Dates are written in the date(YYYY, MM, DD) format. Numeric values can be added/subtracted to/from dates, with the number interpreted as the number of days to add/subtract (e.g., date(2016, 4, 1) + 2 will add two days, returning April 3rd, 2016. Dates can also be subtracted from each other, returning the difference in days: date(2017, 3, 5) - date(2017, 3, 3) will return 2, for instance.
Operations follow the expected order of operations.
Formulas support conditional expressions with the following syntax: if (...) then (...) else (...). For example rsi.map(fn(date, value) (if value > 75 then 1 else 0)) where rsi is rsi(BTC.priceUsd, 90) draws a time series which has value of 1 on dates when BTC's 90 day RSI is higher than 75, and zero otherwise.