Skip to content

Commit

Permalink
Removed quantmod dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
serkor1 committed Oct 6, 2023
1 parent 8eb9713 commit 881baee
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.3
Suggests:
knitr,
quantmod,
rmarkdown,
testthat (>= 3.0.0)
Config/testthat/edition: 3
Expand All @@ -20,7 +21,6 @@ Imports:
jsonlite (>= 1.8.7),
magrittr (>= 2.0.3),
plotly (>= 4.10.2),
quantmod,
rlang (>= 1.1.1),
TTR,
xts (>= 0.13.1),
Expand Down
1 change: 0 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ importFrom(plotly,add_annotations)
importFrom(plotly,layout)
importFrom(plotly,plot_ly)
importFrom(plotly,subplot)
importFrom(quantmod,HLC)
importFrom(rlang,abort)
importFrom(rlang,trace_back)
importFrom(xts,as.xts)
Expand Down
10 changes: 5 additions & 5 deletions R/chart.R
Original file line number Diff line number Diff line change
Expand Up @@ -67,19 +67,18 @@ chart <- function(
)
)

# add Bollinger bands
quote_ <- cbind(
quote_,
TTR::BBands(
HLC = quantmod::HLC(quote),
HLC = quote[,2:4],
n = min(
20,
max(5, floor(nrow(quote_)/2))
)
)
)
)

suppressMessages(

candlestick <- candlestick %>% plotly::add_lines(
data = quote_,
x = rownames(quote_),
Expand Down Expand Up @@ -108,7 +107,8 @@ chart <- function(
),
inherit = FALSE
)
)




# 3) create volume
Expand Down
1 change: 0 additions & 1 deletion R/cryptoQuotes-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#' @importFrom plotly layout
#' @importFrom plotly plot_ly
#' @importFrom plotly subplot
#' @importFrom quantmod HLC
#' @importFrom rlang abort
#' @importFrom rlang trace_back
#' @importFrom TTR BBands
Expand Down
2 changes: 2 additions & 0 deletions man/cryptoQuotes-package.Rd

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

File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ library(cryptoQuotes)

### Introduction

The ```cryptoQuotes``` package provides access to most major cryptocurrency exchanges around the world and it uses ```xts``` and ```zoo``` such that it seamlessly works with powerful packages like ```quantmod``` and ```ttr```.
The ```cryptoQuotes``` package provides access to most major cryptocurrency exchanges around the world and it uses ```xts``` and ```zoo``` such that it seamlessly works with powerful packages like ```quantmod``` and ```TTR```.

### Charting using quantmod

Expand Down

0 comments on commit 881baee

Please sign in to comment.