
tradechecker
By: a guest on
Jun 21st, 2012 | syntax:
None | size: 0.60 KB | hits: 15 | expires: Never
tradechecker<-function(porty,sym){
#combine the string for ease of use
junk0<-paste(porty,sym,sep="$")
#get transactions, prices and order book
junk1<-getTxns(porty,sym)
junk2<-junk1$Txn.Price
junk3<-getOrberBook(porty)
#trim order book down to executed orders
#first combine string
junk4<-paste("junk3",junk0,sep="$")
junk5<-paste(junk4,"Order.Status",sep="$")
junk6<-which(eval(parse(text=junk4))=='closed',arr.ind=FALSE)
#get times of trades
junk7<-index(eval(parse(text=junk4))[c(junk6)])
#get Mkt data at those times
# Check if trades are within the HL range
}