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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Mar 31 17:06:49 CEST 2010


Author: jryan
Date: 2010-03-31 17:06:49 +0200 (Wed, 31 Mar 2010)
New Revision: 318

Modified:
   pkg/blotter/R/chart.Posn.R
Log:
o  utilize new current.chob() call in quantmod (rev 542)
   to allow for one final plot to happen instead of the iterative
   add_TA during chart.Posn calls - jar


Modified: pkg/blotter/R/chart.Posn.R
===================================================================
--- pkg/blotter/R/chart.Posn.R	2010-03-30 22:28:19 UTC (rev 317)
+++ pkg/blotter/R/chart.Posn.R	2010-03-31 15:06:49 UTC (rev 318)
@@ -61,10 +61,11 @@
     if(!is.null(Dates)) Prices=Prices[Dates]
     
     chart_Series(Prices, TA=NULL,...)
-    if(nrow(Buys)>=1) plot(add_TA(Buys,pch=2,type='p',col='green', on=1));
-    if(nrow(Sells)>=1) plot(add_TA(Sells,pch=6,type='p',col='red', on=1));
-    if(nrow(Position)>=1) plot(add_TA(Position,type='b',col='blue', lwd=2));
-    if(!is.null(CumPL))  plot(add_TA(CumPL, col='darkgreen', lwd=2))
+    if(nrow(Buys)>=1) (add_TA(Buys,pch=2,type='p',col='green', on=1));
+    if(nrow(Sells)>=1) (add_TA(Sells,pch=6,type='p',col='red', on=1));
+    if(nrow(Position)>=1) (add_TA(Position,type='b',col='blue', lwd=2));
+    if(!is.null(CumPL))  (add_TA(CumPL, col='darkgreen', lwd=2))
+    plot(current.chob())
 }
 
 ###############################################################################
@@ -77,4 +78,4 @@
 #
 # $Id$
 #
-###############################################################################
\ No newline at end of file
+###############################################################################



More information about the Blotter-commits mailing list