GH: global history (get historical value of a global variable by index or timestamp)
Syntax
gh(var, index_or_timestamp)Arguments
- var: The key of the global to retrieve
- index_or_timestamp: Index (0–999) or timestamp (number >= 1000 or date string like r30m)
Examples
| Formula | Description |
|---|---|
| $gh(myvar, 0)$ | Returns the current (most recent) value of myvar |
| $gh(myvar, 5)$ | Returns the value of myvar at index 5 (6th most recent value) |
| $gh(temperature, df("X", r30m))$ | Returns the temperature value from 30 minutes ago |