title: why is this pine script no longer working?
body: <p>This pine script stopped working about 2 weeks ago or longer. I assume its when the language was upgraded to V4 or something along those lines. The code is below.</p>
  <pre><code>exch = input(0, type = integer, minval=0, maxval=8,
      title=&quot;Exch: NYSE=0 NASDAQ=1 AMEX=2 OTC=3 TSX=4 TSXV=5 ETFS=6 Total=7 CAD Total=8&quot;)
  adv_ticker = 
      exch == 8 ? &quot;AVVX&quot; : 
      exch == 7 ? &quot;AVVT&quot; : 
      exch == 6 ? &quot;AVVE&quot; : 
      exch == 5 ? &quot;AVVV&quot; : 
      exch == 4 ? &quot;AVVS&quot; : 
      exch == 3 ? &quot;AVVD&quot; : 
      exch == 2 ? &quot;AVLU&quot; : 
      exch == 1 ? &quot;AVVQ&quot; : 
      &quot;AVVN&quot;
  dec_ticker = 
      exch == 8 ? &quot;DVCX&quot; : 
      exch == 7 ? &quot;DVCT&quot; : 
      exch == 6 ? &quot;DVCE&quot; : 
      exch == 5 ? &quot;DVCV&quot; : 
      exch == 4 ? &quot;DVCS&quot; : 
      exch == 3 ? &quot;DVCD&quot; : 
      exch == 2 ? &quot;DVCA&quot; : 
      exch == 1 ? &quot;DVCQ&quot; : 
      &quot;DVCN&quot;  
  adv1 = security(adv_ticker, period, close)
  dec = security(dec_ticker, period, close)
  cvi = cum(adv1 - dec)
  </code></pre>