title: How to customise a chart in Pinescript?
body: <p>I'm trying to create my own chart. Interested in customized trading hours on the chart.</p>
  
  <p>Found a similar code. But it does not work correctly. The problem is that it cuts out the beginning and end of all data. And I need to cut the beginning and the end of every day.</p>
  
  <pre><code>study("Candle cutter", overlay=false)
  
  bar_num = nz(bar_num[1]) + 1
  threshold = input(1, "candle # start")
  
  _open = (bar_num &gt; threshold) ? open : na
  _high = (bar_num &gt; threshold) ? high : na
  _low = (bar_num &gt; threshold) ? low : na
  _close = (bar_num &gt; threshold) ? close : na
  
  plotcandle(_open, _high, _low, _close, title='Title', color = _open &lt; _close ? green : red, wickcolor=black)
  </code></pre>
  
  <p>Tell me, how is it possible to change? How to solve the problem?</p>