title: How to draw line from condition to current close for all occurences of the condition
body: <pre><code>condition = ta.barssince(ta.rsi(close, 14) &gt; 20) == 1
  
  var flag = false
  
  if ta.ema(close, 50) &gt; ta.ema(close, 200)
      flag := true
  
  var theLine = line.new(0, 0, 0, 0)
  
  if flag
      line.set_xy1(theLine, bar_index - ta.barssince(condition), ta.valuewhen(condition, close, 0))
      line.set_xy2(theLine, bar_index, close)
  </code></pre>
  <p>The code above will plot a line from the close of the latest occurence of the condition to the current close. How do I plot a line for every occurence of the condition to the current close?</p>
  <p><em><strong><strong>EDIT:</strong> (Here's visual representation of what I'm trying to convey.)</strong></em>
  <a href="https://i.stack.imgur.com/4PX58.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4PX58.png" alt="enter image description here" /></a></p>