title: Why do these two code snippets produce different plots?
body: <p>I've created a few scripts and experiments in pine. Try as I might I cannot get my head around what I would call some of pinescripts "idiosyncrasies". Here is one I would greatly appreciate an explanation of:</p>
  
  <p>Exhibit A:</p>
  
  <pre><code>len = input(14, 'length', input.integer)
  highrsi = rsi(high, len)
  lowrsi = rsi(low, len)
  val = rsi(close, len) &gt; 50 ? highrsi : lowrsi
  plot(val)
  </code></pre>
  
  <p>Exhibit B:</p>
  
  <pre><code>len = input(14, 'length', input.integer)
  val = rsi(close, len) &gt; 50 ? rsi(high, len) : rsi(low, len)
  plot(val)
  </code></pre>
  
  <p>In any other language, these two pieces of code would be equivalent since all I did was store the result of the rsi() function in a couple of variables in exhibit A.</p>
  
  <p>What am I missing?</p>