CHANGE Function

You are here:
< All Topics

The CHANGE function will allow you to easily compute for the percent or value change for the past periods. The OUTPUT can be either % or value.

Syntax:
CHANGE(source, period, output)

Source – any variable such as open, high, low, close, etc.
Period – number of previous bars or periods. You can also use YTD, MTD or WTD which will automatically compute the current Year to Date, Month to Date or Week to Date periods.
*Note on period, we start counting from the current period bar. Meaning if you input 3 as period and today is a Wednesday, the starting value will be Monday. So you’ll be computing the change from Monday to Wednesday.
Output – % or value

Example:

Set 5PeriodChange = CHANGE(close, 5, %)
Set 3PeriodDifference = CHANGE(close, 3, value)
Set YTDchange = CHANGE(close, YTD, %)

If you want to get the source value, example the close on Monday, you can put in source instead of % or value as the third variable.

Example:

Set StartofWeek = CHANGE(close, WTD, source)

Table of Contents