[tech-spec] BBchart

  • From: BBands <BBands@xxxxxxxxxxxxxxxxxx>
  • To: 'tech-spec' <tech-spec@xxxxxxxxxxxxx>
  • Date: Thu, 21 Oct 2004 11:43:24 -0700

I put way too much time in this, but I learned a lot...
Attached please find three files:

BBchart.R
priceIts2.R
BB.R

BBchart.R contains an R function, BBchart(), that downloads a security from
Yahoo! and draws a Bollinger Band chart.

priceIts2.R is a version of priceIts I patched to allow for daily, weekly
and monthly data retrieval.

BB.R is a startup file that loads its, priceIts2 and BBchart, then prints an
example.

So in R enter source(BB.R), then:
BBchart()
BBchart('csco')
BBchart('gm', periods=104, compress="w")
etc...

BBchart has lots of parameters, see the head of BBchart.R for details.

BBchart() is part of Crusher. Dirk Eddelbuettel,
http://dirk.eddelbuettel.com/, and I wrote the first version this spring
with Dirk doing all the heavy R lifting. Note the especially cool way he
calcs the bands. I extensively modified it this fall.

Comments most welcome.

Enjoy,

    --jab



-- Binary/unsupported file stripped by Ecartis --
-- Type: application/octet-stream
-- File: BB.R


-- Binary/unsupported file stripped by Ecartis --
-- Type: application/octet-stream
-- File: BBchart.R


-- Binary/unsupported file stripped by Ecartis --
-- Type: application/octet-stream
-- File: priceIts2.R



Other related posts: