title: Pivot point for next day
body: <p>I have drawn levels based previous day high low. But I want to place that level on next day. I tried lot not luck.
  Can anyone please help me here.</p>
  <pre><code>//@version = 4
  study(title=&quot;Previous days highs and lows00&quot;, overlay = true)
     
  PrevBars = input(title = &quot;Show previous highs and lows?&quot;, type =input.bool, defval=true)
  condition = not(timeframe.isweekly or timeframe.ismonthly) 
  
  h = security(syminfo.tickerid,&quot;D&quot;,high,barmerge.gaps_off,barmerge.lookahead_on) 
  l = security(syminfo.tickerid,&quot;D&quot;,low,barmerge.gaps_off,barmerge.lookahead_on)
  
  //plotshape(series = condition and PrevBars ? h[1] : na, title = &quot;Previous high&quot;,color = #0E6720,location=location.absolute ,transp=0,editable = true)
  //plotshape(series = condition and PrevBars ? l[1] : na, title = &quot;Previous low&quot;,color =#AF0D26,location = location.absolute ,transp=0, editable = true)
  
  // Draw lines from the previous highs and lows
  newSession = change(time('D'))
  count = barssince(newSession)
  
  
  vR1 = h  + (h - l) * 0.10
  vR2 = h  + (h - l) * 0.30
  
  vS1 = l - (h - l) * 0.10
  vS2 = l - (h - l) * 0.30
  
  vP1 = h - (h - l) *  0.50
  vP2 = l + (h - l) *  0.50
  
  plotshape(series = condition and PrevBars ? vR1[1] : na, title = &quot;Previous high&quot;,color = #0E6720,location=location.absolute ,transp=0,editable = true)
  plotshape(series = condition and PrevBars ? vR2[1] : na, title = &quot;Previous high&quot;,color = #0E6720,location=location.absolute ,transp=0,editable = true)
  </code></pre>