We can draw a candlestick chart using the chart series function. chartSeries(Cl(PSEC))I created some custom values ( I1 , I2 and I3 ). which I want to focus (apply) beyond the candlestick pattern. I used addTA()for this purpose
chartSeries(Cl(PSEC)), TA="addTA(I1,col=2);addTA(I2,col=3);addTA(I3,col=4)")
The problem is that it allocates four graphs for Cl (PSEC), I1, I2 and I3 separately instead of the two graphs that I want Cl (PSEC) and (I1, I2, I3)
EDITED
For clarity, I give a sample code with the variable I1, I2, and I3 created for this purpose.
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)")