title: Show higher timeframe indicator on chart
body: <p>I am trying to convert a version 2 script that draws a higher timeframe indicator onto a lower timeframe chart into Pinescript version 4 to see due to the indicator being drawn under v2 script was not accurate.</p>
  
  <p>I have used other posts here to try and work out my errors, but have one that I can't work out. Shown below"</p>
  
  <blockquote>
    <p>line 21: Cannot call <code>plot</code> with arguments (series[float], title=literal string, color=literal color, offset=literal integer, linewidth=literal integer, style=literal string); available overloads: plot(series[float], const string, series[color], input integer, input integer, input bool, input integer, input float, series[integer], input bool, series[float], const bool, input integer, string) => plot; plot(fun_arg__, const string, fun_arg__, input integer, input integer, input bool, input integer, input float, series[integer], input bool, series[float], const bool, input integer, string) => plot</p>
  </blockquote>
  
  <p>Could you explain what this error message means?</p>
  
  <p>I have worked through all my other error messages, but I am new to pine-script and am struggling with this.
  Your help is truly appreciated.</p>
  
  <pre><code>study("Purple Line", overlay=true)
  //@version=4
  
  //inputs
  useCurrentRes = input(true, title="Use Current Chart Timeframe?")
  resCustom = input(title="Use Different Timeframe? Uncheck Box Above", type=input.resolution, defval="D")
  
  teethLength = 8
  teethOffset = 5
  
  res = useCurrentRes ? input.resolution : resCustom
  
  smma(src, length) =&gt;
      smma =  0.0
      smma := na(smma[1]) ? sma(src, length) : (smma[1] * (length - 1) + src) / length
      smma
  
  smmaT = smma(hl2, teethLength)
  
  teeth1 = security(syminfo.tickerid, res, smmaT[1], lookahead = barmerge.lookahead_on)
  plot(teeth1, title="Teeth", color=#800080, offset=5, linewidth=2, style=line.style_dotted)
  </code></pre>