title: Condition that previous week days are up days
body: <p>The following script creates this <a href="https://www.tradingview.com/x/PeSh31NK/" rel="nofollow noreferrer">https://www.tradingview.com/x/PeSh31NK/</a></p>
  <pre><code>//@version=4
  study(&quot;Session bars&quot;, overlay= true)
  t = time(timeframe.period, &quot;1700-1700:2&quot;)
  bgcolor(not na(t) and close / open &gt; 1 ? color.aqua : na, transp = 80)
  </code></pre>
  <p>If I would like to put in the condition that Friday and Thursday has to be an up day as well, how can I do that?</p>
  <p>Thanks in advance!</p>