title: How to get stma- ltma crossover if i have stma and ltma values in seperate lists in python?
body: <p>A crossover occurs at day <code>i</code> if only if <code>STMA(i)</code> and <code>LTMA(i)</code> both are defined at days <code>i</code> and <code>i-1</code>, and either one of the below conditions is fulfilled:</p>
  
  <pre><code>STMA(i-1) &gt; LTMA(i-1) and  STMA(i) &lt;= LTMA(i)
  
  STMA(i-1) &lt; LTMA(i-1) and  STMA(i) &gt;= LTMA(i)
  
  STMA(i-1) = LTMA(i-1) and  STMA(i) != LTMA(i)
  </code></pre>
  
  <p>how to get the values of <code>i</code> for crossover ?</p>