Indicators

Workbench Guide

A guide to functions available in the Workbench product on Glassnode.

Workbench is a powerful tool in Glassnode studio enabling analysts to compare, assess and create a variety of metrics available on the platform.

Function Guide

The table below provides a guide to the use of various workbench functions available to analyse datasets.

Input Values

`m1, m2`

etc. refer to a particular dataset added to the chart.`n`

is a float value.`period`

is an integer value defining the number of trailing data-points considered by the function, applied to the data resolution specified (i.e. a simple moving average with period 30 will consider 30-days for daily resolution data, and 30-weeks for weekly resolution data).`since`

is a timestamp in format `"YYYY-MM-DD HH:mm:ss"`

(quotations required in syntax). Timestamps can be shortened from left to right, for example `"2010"`

will resolve from 01-Jan-2010 onwards, and `"2010-06"`

will resolve from 01-June-2010 onwards.Workbench Function

Syntax

Function Description

Horizontal Line

float value e.g.

`10.55`

Draws a horizontal line at the specified y-ordinate

Simple Moving Average

`sma(m1,period)`

Returns a simple moving average of dataset m1 with a period length specified

Exponential Moving Average

`ema(m1,period)`

Returns an exponential moving average of dataset m1 with a period length specified

Moving Median

`median(m1,period)`

Returns a moving median of dataset m1 with a period length specified.

Rolling Sum

`sum(m1,period)`

Returns a rolling sum of dataset m1 with a period length specified

Standard Deviation

`std(m1,period)`

Returns a standard deviation of dataset m1 with a period length specified

Cumulative Sum

`cumsum(m1)`

or`cumsum(m1,since)`

Calculates an expanding sum using all data from time since up to each datapoint. (See Note 1)

Cumulative Mean

`cummean(m1)`

or`cummean(m1,since)`

Calculates an expanding mean using all data from time since up to each datapoint. (See Note 1)

Cumulative Standard Deviation

`cumstd(m1)`

or`cumstd(m1,since)`

Calculates an expanding standard deviation using all data from time since up to each datapoint. (See Note 1)

Returns Over Period

`returns(m1,period)`

Returns the percentage change of m1 over the specified period. Values are returned as decimal (i.e. 0.20 indicates +20% growth over the specified 'period').

Difference Over Period

`diff(m1,period)`

Returns the absolute value change of m1 over the specified period. Calculated as the difference between each datapoint and data from the specified 'period' in the past.

Absolute Value

`abs(m1)`

Returns the absolute value of all data in m1.

Power

`pow(m1,n)`

Raises all data in m1 to the specified power 'n'.

Logarithm

`log(m1)`

Takes the logarithm (base 10) of all data in m1.

Relative Strength Index

`rsi(m1,period)`

Calculates the relative strength index for m1 using the specified input 'period'

Range

`range(m1)`

Draws a line from y=0 to y=n, increasing in increments of 1 (where n is the number of datapoints in m1)

Range (defined start/end)

`range(m1,start?,end?)`

Draws a line from y=start to y=end, changing in increments of (end-start)/n (where n is the number of datapoints in m1)

Minimum

`min(m1, m2, ..., n)`

Returns the minimum value of all data in a dataset (or n)

Maximum

`max(m1, m2, ..., n)`

Returns the maximum value of all data in a dataset (or n)

- 1.Example for cumulative sum/mean/std: the function cummean(m1,"2012-01-01") at date "2020-01-01" will return a mean of all data from 2012-01-01 to 2020-0-01, but not consider any data after this. These metrics will return zero for all periods prior to defined timestamp "since".

Last modified 4mo ago

Copy link