I am trying to add a vertical line near the end of a chart plot, using the following code segment:

> getSymbols('GTAT')
> ticker <- last(GTAT,'3 months')
> n <- dim(ticker)[1]
> candleChart(ticker,TA='addLines(v=ticker[n-5])',theme='white',up.col='green',dn.col='red',major.ticks='months',minor.ticks=FALSE,show.grid=FALSE)

Instead of adding a single vertical line at the 5th last bar of the plot, which is what I want, it adds a number of them (3 or 4 or more?) near the beginning. How do I get this to work?

Thanks.
	[[alternative HTML version deleted]]

