title: Adding indicator on Indicator
body: <p>I have added Chande Momentum Oscillator and DMI in a single script successfully. Now I am trying to add a 10 period Simple Moving Average on the 9 period Chande Momentum Oscillator. But, I am encountering several different errors. Please help me to resolve this issue. My code is as follows -</p>
  <pre><code>//@version=5
  indicator(title=&quot;Chande Momentum Oscillator&quot;, shorttitle=&quot;ChandeMO&quot;, format=format.price, precision=2, timeframe=&quot;&quot;, timeframe_gaps=true)
  length = input.int(9, minval=1)
  src = input(close, &quot;Source&quot;)
  momm = ta.change(src)
  f1(m) =&gt; m &gt;= 0.0 ? m : 0.0
  f2(m) =&gt; m &gt;= 0.0 ? 0.0 : -m
  m1 = f1(momm)
  m2 = f2(momm)
  sm1 = math.sum(m1, length)
  sm2 = math.sum(m2, length)
  percent(nom, div) =&gt; 100 * nom / div
  chandeMO = percent(sm1-sm2, sm1+sm2)
  plot(chandeMO, &quot;Chande MO&quot;, color=#2962FF)
  h1 = hline(+50, &quot;Upper Band&quot;, color=#787B86)
  hm = hline(0, color=#787B86, linestyle=hline.style_dashed, title=&quot;Zero Line&quot;)
  h2 = hline(-50, &quot;Lower Band&quot;, color=#787B86)
  
  lensig_ma = input.int(title=&quot;Moving Average&quot;, shorttitle=&quot;MA&quot;, overlay=true, timeframe=&quot;&quot;, timeframe_gaps=true)
  len = input.int(9, minval=1, title=&quot;Length&quot;)
  data = input(close, title=&quot;Source&quot;)
  offset = input.int(title=&quot;Offset&quot;, defval=0, minval=-500, maxval=500)
  out = ta.sma(data, len)
  plot(out, color=color.blue, title=&quot;MA&quot;, offset=offset)
  
  indicator(title=&quot;Moving Average&quot;, shorttitle=&quot;MA&quot;, overlay=true, timeframe=&quot;&quot;, timeframe_gaps=true)
  len = input.int(9, minval=1, title=&quot;Length&quot;)
  src = input(close, title=&quot;Source&quot;)
  offset = input.int(title=&quot;Offset&quot;, defval=0, minval=-500, maxval=500)
  out = ta.sma(src, len)
  plot(out, color=color.blue, title=&quot;MA&quot;, offset=offset)
  </code></pre>
  <p>Please help. Thanks &amp; regards.</p>