rpnf is a collection of R functions for creating Point & Figure (P&F) charts and statistics for a given time series.
--------+---------------------------
53.00| X X X
52.00| XO XOXO+
51.00| XO XOXO +
50.00|X+X XOX X XOXO +
49.00| OXOXOXO+ XOXO O +
48.00| OXOXOXO + XOX O + X <==
47.00| OXOXO O + XOX OX + X
46.00| OXO OX +XOX +OXO + X
45.00| OX +OXOX XO + OXO X+X
44.00| OX + OXOXOX + O O X XOX
43.00| OX + OXOXOX+ OX XOXOX
42.00| OX+ O OXO OXOXOXOX
41.00| O O OXOXO OX
40.00| OXOX OX
39.00| OXO O
38.00| OX
37.00| OX
36.00| OX
35.00| O
--------+---------------------------
Y|111111111111111111111111111
Y|444444444555555555555555555
|
M|111111111000000000000000000
M|000001222111133677788889999
|
D|011232001012202211212220023
D|906316598558967947925671830
rpnf allows the creation of P&F charts and statistics with the following features
Install latest stable version of rpnf with
install.packages("rpnf")
rpnf is now installed, and you can continue with the getting started section.
If you want to use (for a good reason) the latest development version from Rforge, then you can install it with:
install.packages("rpnf", repos="http://R-Forge.R-project.org")
Once rpnf is installed you can start using it by loading the library:
library(rpnf) # Load rpnf library
A typical workflow for using rpnf consists of three steps:
rpnf has some sample data built in:
data(DOW) # Load some example data
You can have a look at these data with str(DOW)
or DOW
.
To determine the P&F statistics of a time series you use:
pnfdata <- pnfprocessor(
high=DOW$High,
low=DOW$Low,
date=DOW$Date,
boxsize=1L,
log=FALSE)
The data.frame returned by pnfprocessor(...)
is full of P&F statistics on the given time series. Every row consists of one observation on the time series, whereas columns have the following meaning:
This data.frame can be used either to do some statistical analysis, or it can be used to generate plots.
Generating plots from a pnf data.frame can be achieved by:
pnfplottxt(
data = pnfdata,
reversal = 3,
boxsize = 1L,
log = F)
## --------+---------------------------
## 53.00| X X X
## 52.00| XO XOXO+
## 51.00| XO XOXO +
## 50.00|X+X XOX X XOXO +
## 49.00| OXOXOXO+ XOXO O +
## 48.00| OXOXOXO + XOX O + X <==
## 47.00| OXOXO O + XOX OX + X
## 46.00| OXO OX +XOX +OXO + X
## 45.00| OX +OXOX XO + OXO X+X
## 44.00| OX + OXOXOX + O O X XOX
## 43.00| OX + OXOXOX+ OX XOXOX
## 42.00| OX+ O OXO OXOXOXOX
## 41.00| O O OXOXO OX
## 40.00| OXOX OX
## 39.00| OXO O
## 38.00| OX
## 37.00| OX
## 36.00| OX
## 35.00| O
## --------+---------------------------
## Y|222222222222222222222222222
## Y|000000000000000000000000000
## Y|111111111111111111111111111
## Y|444444444555555555555555555
## |
## M|111111111000000000000000000
## M|000001222111133677788889999
## |
## D|011232001012202211212220023
## D|906316598558967947925671830
Alternatively you can plot a graphical chart with:
pnfplot(
data = pnfdata,
reversal = 3,
boxsize = 1L,
log = F)
If you need commerical support feel free to contact Sascha Herrmann sascha.herrmann.consulting@gmail.com for an offer. You can also request a new feature development there.
For non-commerical support please refer to the r-forge project page and some online communities like stackoverflow.
Our current focus is to develop a set of wrappers and extensions to rpnf, so that it gets easier to exploit the full functionality of rpnf for creating Bullish Percent, Relative Strenght Charts, and others.