<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Global History on Kustom HQ</title><link>https://docs.kustom.rocks/tags/global-history/</link><description>Recent content in Global History on Kustom HQ</description><generator>Hugo</generator><language>en</language><atom:link href="https://docs.kustom.rocks/tags/global-history/index.xml" rel="self" type="application/rss+xml"/><item><title>GH - global history</title><link>https://docs.kustom.rocks/docs/reference/functions/gh/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.kustom.rocks/docs/reference/functions/gh/</guid><description>&lt;h1>GH: global history (get historical value of a global variable by index or timestamp)&lt;/h1>
&lt;h3>Syntax&lt;/h3>
gh(var, index_or_timestamp)
&lt;h3>Arguments&lt;/h3>
&lt;ul>
 &lt;li>&lt;b>var&lt;/b>: The key of the global to retrieve&lt;/li>
 &lt;li>&lt;b>index_or_timestamp&lt;/b>: Index (0–999) or timestamp (number >= 1000 or date string like r30m)&lt;/li>
&lt;/ul>
&lt;h3>Examples&lt;/h3>
&lt;table> &lt;tr>
 &lt;th>&lt;b>Formula&lt;/b>&lt;/th>
 &lt;th>&lt;b>Description&lt;/b>&lt;/th>
 &lt;/tr>
 &lt;tr>
 &lt;td width="250px">&lt;b>$gh(myvar, 0)$&lt;/b>&lt;/td>
 &lt;td>Returns the current (most recent) value of myvar&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td width="250px">&lt;b>$gh(myvar, 5)$&lt;/b>&lt;/td>
 &lt;td>Returns the value of myvar at index 5 (6th most recent value)&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td width="250px">&lt;b>$gh(temperature, df("X", r30m))$&lt;/b>&lt;/td>
 &lt;td>Returns the temperature value from 30 minutes ago&lt;/td>
 &lt;/tr>
&lt;/table></description></item></channel></rss>