[Candlesticks-commits] r34 - in pkg: . R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Sep 6 19:34:31 CEST 2018


Author: wotuzu17
Date: 2018-09-06 19:34:30 +0200 (Thu, 06 Sep 2018)
New Revision: 34

Modified:
   pkg/CHANGES
   pkg/DESCRIPTION
   pkg/R/CSPNLongCandles.R
Log:
fixed CSPNLong(White|Black)Candles functions

Modified: pkg/CHANGES
===================================================================
--- pkg/CHANGES	2018-09-01 19:09:01 UTC (rev 33)
+++ pkg/CHANGES	2018-09-06 17:34:30 UTC (rev 34)
@@ -1,3 +1,4 @@
 0.1-1 va            initial version
 0.2-5 va 2015-05-25 svn update to trigger build process on R-forge
 0.2-6 va 2018-09-01 lag -> stats::lag to prevent issues with dplyr
+0.2-7 va 2018-09-06 fixed CSPNLong(White|Black)Candles functions

Modified: pkg/DESCRIPTION
===================================================================
--- pkg/DESCRIPTION	2018-09-01 19:09:01 UTC (rev 33)
+++ pkg/DESCRIPTION	2018-09-06 17:34:30 UTC (rev 34)
@@ -1,8 +1,8 @@
 Package: candlesticks
 Type: Package
 Title: Candlestick Pattern Recognition
-Version: 0.2-6
-Date: 2018-09-01
+Version: 0.2-7
+Date: 2018-09-06
 Author: Andreas Voellenklee
 Maintainer: Andreas Voellenklee <wotuzu17 at gmail.com>
 Depends: R (>= 2.13), xts (>= 0.8-2), quantmod (>= 0.3-17), TTR (>= 0.21-0)

Modified: pkg/R/CSPNLongCandles.R
===================================================================
--- pkg/R/CSPNLongCandles.R	2018-09-01 19:09:01 UTC (rev 33)
+++ pkg/R/CSPNLongCandles.R	2018-09-06 17:34:30 UTC (rev 34)
@@ -6,7 +6,7 @@
     stop("N has to be a integer >= 1")
   }
   LWC <- CSPLongCandle(TS, n=n, threshold=threshold)[,1] # LongWhiteCandle
-  result <- reclass(as.xts(apply(stats::lag(LWC,k=0:(N-1)),1,all), dateFormat=indexClass(try.xts(TS)[1])), TS)
+  result <- reclass(as.xts(apply(stats::lag(LWC,k=0:(N-1)),1,all)), TS)
   colnames(result) <- paste(N, "LongWhiteCandles", sep="")
   xtsAttributes(result) <- list(bars=N)
   return (result)
@@ -20,7 +20,7 @@
     stop("N has to be a integer >= 1")
   }
   LBC <- CSPLongCandle(TS, n=n, threshold=threshold)[,2] # LongBlackCandle
-  result <- reclass(as.xts(apply(stats::lag(LBC,k=0:(N-1)),1,all), dateFormat=indexClass(try.xts(TS)[1])), TS)
+  result <- reclass(as.xts(apply(stats::lag(LBC,k=0:(N-1)),1,all)), TS)
   colnames(result) <- paste(N, "LongBlackCandles", sep="")
   xtsAttributes(result) <- list(bars=N)
   return (result)
@@ -34,7 +34,7 @@
     stop("N has to be a integer >= 1")
   }
   LWCB <- CSPLongCandleBody(TS, n=n, threshold=threshold)[,1] # LongWhiteCandleBody
-  result <- reclass(as.xts(apply(stats::lag(LWCB,k=0:(N-1)),1,all), dateFormat=indexClass(try.xts(TS)[1])), TS)
+  result <- reclass(as.xts(apply(stats::lag(LWCB,k=0:(N-1)),1,all)), TS)
   colnames(result) <- paste(N, "LongWhiteCandleBodies", sep="")
   xtsAttributes(result) <- list(bars=N)
   return (result)
@@ -48,7 +48,7 @@
     stop("N has to be a integer >= 1")
   }
   LBCB <- CSPLongCandleBody(TS, n=n, threshold=threshold)[,2] # LongBlackCandleBody
-  result <- reclass(as.xts(apply(stats::lag(LBCB,k=0:(N-1)),1,all), dateFormat=indexClass(try.xts(TS)[1])), TS)
+  result <- reclass(as.xts(apply(stats::lag(LBCB,k=0:(N-1)),1,all)), TS)
   colnames(result) <- paste(N, "LongBlackCandleBodies", sep="")
   xtsAttributes(result) <- list(bars=N)
   return (result)



More information about the Candlesticks-commits mailing list