[R] algo trading mcx india
arun
smartpink111 at yahoo.com
Sun Jun 8 09:11:39 CEST 2014
Hi VP,
Not sure what you wanted.
Perhaps:
library(XML)
URL <-
"http://money.securebank.in/index.php?option=com_dashboard&view=history&Itemid=56&startdate=01/01/2013&enddate=6/9/2014&exchange=MCX&sid=1"
doc <- htmlParse(URL)
tableNodes <- getNodeSet(doc, "//table")
dat1 <- readHTMLTable(tableNodes[[4]], colClasses=c("numeric","character", "character", "numeric", "character", "numeric", "numeric", "character", "numeric"),stringsAsFactors=FALSE)
dat1$DATE <- as.Date(dat1$DATE, "%d-%m-%Y")
str(dat1)
#'data.frame': 6910 obs. of 9 variables:
# $ TRADE NO. : num 59084 59085 59063 59059 59054 ...
# $ DATE : Date, format: "2014-06-05" "2014-06-05" ...
# $ SCRIP : chr "Nickel" "Natural Gas" "Natural Gas" "Aluminium" ...
# $ LOT SIZE : num 250 1250 1250 5000 5000 250 100 1000 250 1250 ...
# $ TRADE : chr "SHORT" "LONG" "SHORT" "SHORT" ...
# $ TRADE EXECUTED AT: num 1126 278 276 109 124 ...
# $ TRADE CLOSED AT : num 1124 278 275 109 124 ...
# $ PROFIT TAKEN AT : chr "1123.8-EOD" "278.50-EOD" "274.10-T2" "108.55-T1" ...
# $ PROFIT PER LOT : num 1500 1500 3000 2250 -750 ...
A.K.
On Saturday, June 7, 2014 2:17 PM, "veepsirtt at gmail.com" <veepsirtt at gmail.com> wrote:
Hi AK
http://money.securebank.in/index.php?option=com_dashboard&view=history&Itemid=56&startdate=01/01/2013&enddate=6/9/2014&exchange=MCX&sid=1
How you could help me?
thanks
vp
_____________________________________
Sent from http://r.789695.n4.nabble.com
More information about the R-help
mailing list