[R] Candlestick chart? (was: Rmetrics fMultivar how to?)

Spencer Graves spencer.graves at pdf.com
Sat Oct 22 18:52:18 CEST 2005


	  Have you received a reply?  I haven't seen one.  I thought I had seen 
something on "candlestick" charts, but I could not find it now.  I 
believe there is a capability like that, but perhaps under a different 
name.  If you would still like help from this group, please submit 
another post with brief but internally complete example as outlined in 
the posting guide (www.R-project.org/posting-guide.html) describing what 
you've tried and how it is inadequate.  For example, if you had provided 
the commands you used to download WIG20.txt, that would have made it 
easier for me to at least get the same data.  I know there are 
procedures in Rmetrics for downloading data, but I don't remember how to 
do it just now, and I don't have time at the moment to research that.

	  Good Luck,
	  spencer graves

Benedict P. Barszcz wrote:
> Hi Everybody,
> I am a total beginner at this so please bear with me.
> I downloaded by hand the file WIG20.txt (Warsaw Stock Exchange Index of 20 
> most important stocks). The format is this:
> 
> Name,Date,Open,High,Low,Close,Volume 
> WIG20,19940414,1000.00,1000.00,1000.00,1000.00,71600.000 
> WIG20,19940418,1050.50,1050.50,1050.50,1050.50,99950.000 
> WIG20,19940419,1124.90,1124.90,1124.90,1124.90,138059.000 
> WIG20,19940421,1304.80,1304.80,1304.80,1304.80,154151.000 
> WIG20,19940425,1350.10,1350.10,1350.10,1350.10,228438.000 
> WIG20,19940426,1216.20,1216.20,1216.20,1216.20,16618.000 
> WIG20,19940428,1096.70,1096.70,1096.70,1096.70,32685.000 
> WIG20,19940505,1138.10,1138.10,1138.10,1138.10,113777.000 
> WIG20,19940506,1077.60,1077.60,1077.60,1077.60,137910.000 
> WIG20,19940509,1035.60,1035.60,1035.60,1035.60,97091.000
> 
> I read the data in with this command:
> 
> 
>>tabelka = read.table("/home/kb2qzv/WIG20.txt",sep=",",header=TRUE)
> 
> 
> And I can see that 'tabelka' has 2840 rows in it which is correct (this many 
> sessions since the Exchange started operating).
> Now I would like to utilize some of the functions available from RMetrics and 
> see how useful they might be. I can image that one way to know this would be 
> to plot a candlestick chart of the wig20 index and below it a TA indicator, 
> like one of these:
> 
> macdTA      MACD Indicator
> cdsTA     MACD Signal Line
> cdoTA      MACD Oscillator
> vohlTA High/Low Volatility
> 
> Trouble is there is no easy way (for me as a beginner) to start with.
> Questions:
> A) how to plot a candlestick chart with my data?
> there seems to be no 'type=candlestick' parameter in plot() function.
> 
> B) how to create a second pane where an indicator can be drawn.
> 
> thanks for any answers or tips.
> 
> 

-- 
Spencer Graves, PhD
Senior Development Engineer
PDF Solutions, Inc.
333 West San Carlos Street Suite 700
San Jose, CA 95110, USA

spencer.graves at pdf.com
www.pdf.com <http://www.pdf.com>
Tel:  408-938-4420
Fax: 408-280-7915




More information about the R-help mailing list