How to overlay multiple TA in new plot using quantmod?
<p>We can plot candle stick chart using chart series function <code>chartSeries(Cl(PSEC))</code> I have created some custom values (<strong>I1</strong>,<strong>I2</strong> and <strong>I3</strong>) which I want to plot together(overlay) outside the candle stick pattern. I have used <code>addTA()</code> for this purpose</p>

<pre><code>chartSeries(Cl(PSEC)), TA="addTA(I1,col=2);addTA(I2,col=3);addTA(I3,col=4)")
</code></pre>

<p>The problem is that it plots four plots for <strong>Cl(PSEC),I1,I2</strong> and <strong>I3</strong> separately instead of two plots which I want <strong>Cl(PSEC)</strong> and <strong>(I1,I2,I3)</strong></p>

<p><strong>EDITED</strong></p>

<p>For clarity I am giving a sample code with I1, I2 and I3 variable created for this purpose</p>

<pre><code>library(quantmod)
PSEC=getSymbols("PSEC",auto.assign=F)
price=Cl(PSEC)
I1=SMA(price,3)
I2=SMA(price,10)
I3=SMA(price,15)
chartSeries(price, TA="addTA(I1,col=2);addTA(I2,col=3);addTA(I3,col=4)")
</code></pre>