[Blotter-commits] r470 - pkg/blotter/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Nov 24 19:51:57 CET 2010


Author: braverock
Date: 2010-11-24 19:51:57 +0100 (Wed, 24 Nov 2010)
New Revision: 470

Modified:
   pkg/blotter/R/updatePosPL.R
Log:
- add defaults if instrument not found

Modified: pkg/blotter/R/updatePosPL.R
===================================================================
--- pkg/blotter/R/updatePosPL.R	2010-11-24 17:02:24 UTC (rev 469)
+++ pkg/blotter/R/updatePosPL.R	2010-11-24 18:51:57 UTC (rev 470)
@@ -18,6 +18,7 @@
     tmp_instr<-try(getInstrument(Symbol))
     if(inherits(tmp_instr,"try-error") | !is.instrument(tmp_instr)){
 	    warning(paste("Instrument",Symbol," not found, things may break"))
+		tmp_instr<-list(currency="USD",multiplier=1)
     }
 	
 	if(is.null(Prices)){



More information about the Blotter-commits mailing list