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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sat Nov 5 02:22:26 CET 2011


Author: bodanker
Date: 2011-11-05 02:22:25 +0100 (Sat, 05 Nov 2011)
New Revision: 832

Modified:
   pkg/quantstrat/R/orders.R
Log:
- fix spelling in ruleOrderProc (orderprice -> orderPrice)


Modified: pkg/quantstrat/R/orders.R
===================================================================
--- pkg/quantstrat/R/orders.R	2011-11-04 21:35:41 UTC (rev 831)
+++ pkg/quantstrat/R/orders.R	2011-11-05 01:22:25 UTC (rev 832)
@@ -480,15 +480,15 @@
                             } 
                             # check to see if price moved through the limit
                             if (orderQty > 0) { # positive quantity 'buy'
-                                if( (has.Lo(mktdata) && orderprice > as.numeric(Lo(mktdataTimestamp))) || 
-                                    (!has.Lo(mktdata) && orderprice >= as.numeric(getPrice(mktdataTimestamp, prefer=prefer))))
+                                if( (has.Lo(mktdata) && orderPrice > as.numeric(Lo(mktdataTimestamp))) || 
+                                    (!has.Lo(mktdata) && orderPrice >= as.numeric(getPrice(mktdataTimestamp, prefer=prefer))))
                                 {
                                     txnprice = orderPrice
                                     txntime = timestamp
                                 } else next() # price did not move through my order, should go to next order  
                             } else if(orderQty < 0) { #negative quantity 'sell'
-                                if ( (has.Hi(mktdata) && orderprice < as.numeric(Hi(mktdataTimestamp))) ||
-                                     (!has.Hi(mktdata) && orderprice <= as.numeric(getPrice(mktdataTimestamp,prefer=prefer))) )
+                                if ( (has.Hi(mktdata) && orderPrice < as.numeric(Hi(mktdataTimestamp))) ||
+                                     (!has.Hi(mktdata) && orderPrice <= as.numeric(getPrice(mktdataTimestamp,prefer=prefer))) )
                                 {
                                     txnprice = orderPrice
                                     txntime = timestamp



More information about the Blotter-commits mailing list