title: Pinescript print a straight line in session with vwap close from session before
body: <p>Im clueless how to use vwap in pinescript, my use case is:</p>
  <p>Print a straight line for the day with the value of VWAP close from yesterday.</p>
  <pre><code>study(title=&quot;Volume-weighted average example&quot;, overlay=true)
  
  // Calculate moving average
  vwapValue = vwap(close)
  
  // Plot value
  plot(series=vwapValue, color=teal, linewidth=2, trackprice=true)
  </code></pre>
  <p>This is just very basic what I have but I have no clue how to get the value of the close for the last day and print it like I described as a horizontal line spanning from session open to session end. Help would be greatly appreciated.</p>