title: converting a pine script strategy to study
body: <p>I want to convert a TradingView pine script "Price Channel Strategy" to a study. can someone please help?</p>
  
  <p>The code is as given below:</p>
  
  <pre><code>//@version=4
  strategy("ChannelBreakOutStrategy", overlay=true)
  
  length = input(title="Length", type=input.integer, minval=1, maxval=1000, defval=5)
  
  upBound = highest(high, length)
  downBound = lowest(low, length)
  
  if (not na(close[length]))
      strategy.entry("ChBrkLE", strategy.long, stop=upBound + syminfo.mintick, comment="ChBrkLE")
      strategy.entry("ChBrkSE", strategy.short, stop=downBound - syminfo.mintick, comment="ChBrkSE")
  strategy.exit("long_tsl", "ChBrkLE", trail_points = 4000, trail_offset = 1500)
  strategy.exit("short_tsl", "ChBrkSE", trail_points = 4000, trail_offset = 1500)
  </code></pre>