Skip to content

Commit

Permalink
Build 1.3.0 CRAN release
Browse files Browse the repository at this point in the history
  • Loading branch information
shikokuchuo committed Feb 21, 2022
1 parent 9d05d75 commit 6dae163
Show file tree
Hide file tree
Showing 18 changed files with 384 additions and 87 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.2.99.22
Version: 1.3.0
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
13 changes: 6 additions & 7 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
# ichimoku 1.2.99.22
# ichimoku 1.3.0

#### New features:

* Subplots now feature on the same chart and values can be read via the infotip in `iplot()` or `oanda_studio()`.
* Sub-plots now feature on the same chart and values can be read via the infotip in `iplot()` or `oanda_studio()`.
* R/S-type indicators now an option for `oanda_chart()` and `oanda_studio()`.
* `.ichimoku()` introduced as a faster technical utility version of `ichimoku()` for use when data is already in the prescribed format.

#### Updates:

* Dependency on C++ compiler, 'cpp11' and 'gtable' packages retired.
* Added `LinkingTo: xts` to mark use of C function exported from 'xts'.
* Internal rolling min/max/mean functions re-implemented directly in C.
* Various ichimoku functions now call C code internally.
* Internal rolling min/max/mean functions re-implemented directly in C; various ichimoku functions now call C code internally.
* Added `LinkingTo: xts` for use of C function exported from 'xts'.
* `df_trim()` and `extraplot()` removed as no longer required.
* The 'limit' argument for `oanda_chart()` and `oanda_stream()` has been changed to accept a time in seconds.
* The 'limit' argument for `oanda_chart()` and `oanda_stream()` changed to accept a time in seconds rather than minutes.
* `new.process = TRUE` for `oanda_studio()` now more portable and works under Windows.
* Fixes `oanda_stream()` for when multiple bid/ask liquidity levels are returned in the stream. Improvement to the handling of timestamps, now rendered as POSIXct.
* Fixes `oanda_stream()` for when multiple bid/ask liquidity levels are returned in the stream. Returned dataframe now in a revised tidier format with correct data types for ease of further processing.
* Fixes `archive()` to work correctly on R-oldrel (4.0).
* Further performance enhancements to `ichimoku()`, `mlgrid()` and plot functions.
* Documentation refresh.
Expand Down
2 changes: 1 addition & 1 deletion R/ichimoku-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
#' unaffiliated with the ichimoku package.
#'
#' Gao, C. (2021), \emph{ichimoku: Visualization and Tools for Ichimoku
#' Kinko Hyo Strategies}. R package version 1.2.99,
#' Kinko Hyo Strategies}. R package version 1.3.0,
#' \url{https://CRAN.R-project.org/package=ichimoku}.
#'
#' @useDynLib ichimoku, .registration = TRUE, .fixes = "ichimoku"
Expand Down
12 changes: 9 additions & 3 deletions R/oanda.R
Original file line number Diff line number Diff line change
Expand Up @@ -259,9 +259,6 @@ getPrices <- function(instrument, granularity, count, from, to, price, server,
#' @details This function connects to the OANDA fxTrade Streaming API. Use the
#' 'Esc' key to stop the stream and return the session data.
#'
#' All returned times are in UTC. 'b' and 'a' used in column headings are
#' abbreviations to denote 'bid' and 'ask' respectively.
#'
#' Note: only messages of type 'PRICE' are processed. Messages of type
#' 'HEARTBEAT' consisting of only a timestamp are discarded.
#'
Expand Down Expand Up @@ -314,6 +311,15 @@ oanda_stream <- function(instrument, display = 7L, limit, server, apikey) {

data <- NULL
on.exit(expr = {
xlen <- dim(data)[1L]
bids <- unlist(.subset2(data, "bids"))
ncol <- length(bids) / xlen
data[["bids"]] <- matrix(as.numeric(bids), nrow = xlen, ncol = ncol, byrow = TRUE,
dimnames = list(NULL, names(bids)[1:ncol]))
asks <- unlist(.subset2(data, "asks"))
ncol <- length(asks) / xlen
data[["asks"]] <- matrix(as.numeric(asks), nrow = xlen, ncol = ncol, byrow = TRUE,
dimnames = list(NULL, names(asks)[1:ncol]))
data[["closeoutBid"]] <- as.numeric(.subset2(data, "closeoutBid"))
data[["closeoutAsk"]] <- as.numeric(.subset2(data, "closeoutAsk"))
return(invisible(data))
Expand Down
Binary file modified R/sysdata.rda
Binary file not shown.
4 changes: 2 additions & 2 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,8 @@ df_merge <- function(...) {
#' @param new data.frame object containing new data.
#' @param key [default 'time'] column name used as key, provided as a character
#' string.
#' @param keep.attr [default 'timestamp'] name of an attribute in 'new' to retain
#' if it is present, provided as a character string.
#' @param keep.attr [default 'timestamp'] name of an attribute in 'new' to
#' retain, if present, provided as a character string.
#'
#' @return A data.frame of the existing data appended with the new data. If the
#' data in 'new' contains data with the same value for the key column as 'old',
Expand Down
2 changes: 1 addition & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ Sasaki, H. 佐々木 英信 (1996), *一目均衡表の研究 [ichimoku kinkouhy

'OANDA' and 'fxTrade' are trademarks owned by OANDA Corporation, an entity unaffiliated with the ichimoku package.

Gao, C. (2021), *ichimoku: Visualization and Tools for Ichimoku Kinko Hyo Strategies*. R package version 1.2.99, <https://CRAN.R-project.org/package=ichimoku>.
Gao, C. (2021), *ichimoku: Visualization and Tools for Ichimoku Kinko Hyo Strategies*. R package version 1.3.0, <https://CRAN.R-project.org/package=ichimoku>.

--

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ no kenkyuu]*. Tokyo, Japan: Toushi Radar.
entity unaffiliated with the ichimoku package.

Gao, C. (2021), *ichimoku: Visualization and Tools for Ichimoku Kinko
Hyo Strategies*. R package version 1.2.99,
Hyo Strategies*. R package version 1.3.0,
<https://CRAN.R-project.org/package=ichimoku>.

Expand Down
2 changes: 1 addition & 1 deletion data-raw/internal_sysdata.R
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
row.names = c(NA, -126L)
)

.user_agent <- "r-ichimoku/1.2.99"
.user_agent <- "r-ichimoku/1.3.0"

usethis::use_data(.ichimoku_themes, .oanda_instruments, .user_agent, internal = TRUE, overwrite = TRUE)

4 changes: 2 additions & 2 deletions man/df_append.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/ichimoku-package.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions man/oanda_stream.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions pkgdown/extra.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.navbar-default {
background-color: #ffffff;
}
2 changes: 1 addition & 1 deletion src/shikokuchuo.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,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) {

SEXP tzone = PROTECT(Rf_ScalarString(Rf_mkChar("")));
SEXP tzone = PROTECT(Rf_mkString(""));
Rf_setAttrib(xtsindex, xts_IndexTzoneSymbol, tzone);
SEXP tclass = PROTECT(Rf_allocVector(STRSXP, 2));
SET_STRING_ELT(tclass, 0, Rf_mkChar("POSIXct"));
Expand Down
Loading

0 comments on commit 6dae163

Please sign in to comment.