Skip to content

Commit

Permalink
CRAN release 1.4.4
Browse files Browse the repository at this point in the history
  • Loading branch information
shikokuchuo committed Jan 9, 2023
1 parent 97e2dfa commit b1e5d5c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: ichimoku
Type: Package
Title: Visualization and Tools for Ichimoku Kinko Hyo Strategies
Version: 1.4.3.9001
Version: 1.4.4
Description: An implementation of 'Ichimoku Kinko Hyo', also commonly known as
'cloud charts'. Static and interactive visualizations with tools for
creating, backtesting and development of quantitative 'ichimoku' strategies.
Expand Down
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# ichimoku 1.4.3.9001 (development)
# ichimoku 1.4.4

#### Updates:

Expand Down
5 changes: 2 additions & 3 deletions R/ichimoku.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2021-2022 Hibiki AI Limited <[email protected]>
# Copyright (C) 2021-2023 Hibiki AI Limited <[email protected]>
#
# This file is part of ichimoku.
#
Expand Down Expand Up @@ -356,7 +356,6 @@ ichimoku.default <- function(x, ticker, periods = c(9L, 26L, 52L), keep.data, ..
future <- seq.int(from = index[xlen] + periodicity, by = periodicity, length.out = p21)
}
xtsindex <- c(index, future)
x <- NULL

kumo <- cbind(open = `length<-`(open, clen),
high = `length<-`(high, clen),
Expand All @@ -371,7 +370,7 @@ ichimoku.default <- function(x, ticker, periods = c(9L, 26L, 52L), keep.data, ..
cloudT = c(rep(NA, p21), cloudT),
cloudB = c(rep(NA, p21), cloudB))

.Call(ichimoku_create, kumo, xtsindex, periods, periodicity, ticker, x)
.Call(ichimoku_create, kumo, xtsindex, periods, periodicity, ticker, NULL)

}

9 changes: 6 additions & 3 deletions src/shikokuchuo.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2021-2022 Hibiki AI Limited <[email protected]>
// Copyright (C) 2021-2023 Hibiki AI Limited <[email protected]>
//
// This file is part of ichimoku.
//
Expand Down Expand Up @@ -31,6 +31,7 @@ SEXP ichimoku_TickerSymbol;

SEXP ichimoku_klass;
SEXP ichimoku_tclass;
SEXP ichimoku_tzone;

typedef SEXP (*linked_fun) (SEXP x);

Expand Down Expand Up @@ -214,7 +215,7 @@ SEXP _tbl(const SEXP x, const SEXP type) {
SEXP _create(SEXP kumo, SEXP xtsindex, const SEXP periods,
const SEXP periodicity, const SEXP ticker, const SEXP x) {

Rf_setAttrib(xtsindex, xts_IndexTzoneSymbol, Rf_mkString(""));
Rf_setAttrib(xtsindex, xts_IndexTzoneSymbol, ichimoku_tzone);
Rf_setAttrib(xtsindex, xts_IndexTclassSymbol, ichimoku_tclass);
Rf_setAttrib(kumo, xts_IndexSymbol, xtsindex);

Expand Down Expand Up @@ -358,11 +359,13 @@ static void PreserveObjects(void) {
R_PreserveObject(ichimoku_tclass = Rf_allocVector(STRSXP, 2));
SET_STRING_ELT(ichimoku_tclass, 0, Rf_mkChar("POSIXct"));
SET_STRING_ELT(ichimoku_tclass, 1, Rf_mkChar("POSIXt"));
R_PreserveObject(ichimoku_tzone = Rf_mkString(""));
}

static void ReleaseObjects(void) {
R_ReleaseObject(ichimoku_klass);
R_ReleaseObject(ichimoku_tzone);
R_ReleaseObject(ichimoku_tclass);
R_ReleaseObject(ichimoku_klass);
}

static const R_CallMethodDef CallEntries[] = {
Expand Down

0 comments on commit b1e5d5c

Please sign in to comment.