[Blotter-commits] r1058 - pkg/quantstrat/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Jun 20 14:57:10 CEST 2012


Author: opentrades
Date: 2012-06-20 14:57:10 +0200 (Wed, 20 Jun 2012)
New Revision: 1058

Modified:
   pkg/quantstrat/R/ruleSignal.R
Log:
throwing warming when trying to exit/all pos while orderqty sign is wrong



Modified: pkg/quantstrat/R/ruleSignal.R
===================================================================
--- pkg/quantstrat/R/ruleSignal.R	2012-06-18 17:48:44 UTC (rev 1057)
+++ pkg/quantstrat/R/ruleSignal.R	2012-06-20 12:57:10 UTC (rev 1058)
@@ -154,7 +154,10 @@
 				updateOrders(portfolio, symbol, oldstatus="open", newstatus='canceled', statustimestamp=timestamp, orderset=orderset)
 
 			if(((orderqty>0 && orderside=='long') || (orderqty<0 && orderside=='short')))
+			{
+				warning('trying to exit/all position but orderqty sign is wrong')
 				orderqty = NULL		# dirty trick to suppress adding order below JH; (why?)
+			}
 		}
 
         }



More information about the Blotter-commits mailing list