title: Undeclared identifier `shigh`; tradingview (pinescripts)
body: <p>This code works well in <code>//@version=3</code> of pinescripts. </p>
  
  <p>I would like to convert to <code>//@version=4</code> but the following error:</p>
  
  <blockquote>
    <p>Undeclared identifier 'shigh'</p>
  </blockquote>
  
  <p>This is the code:</p>
  
  <pre><code>is_newbar(res) =&gt;
      t = time(res)
      change(t) != 0 ? 1 : 0
  
  
  shigh = is_newbar("D") ? high : (high &gt; shigh[1] ? high : nz(shigh[1], high))
  </code></pre>
  
  <p>What can be the issue that cause this error?</p>