Skip to content

Commit

Permalink
oanda_quote() writes new line
Browse files Browse the repository at this point in the history
  • Loading branch information
shikokuchuo committed Jan 3, 2024
1 parent 3ba129f commit 4343047
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 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.12
Version: 1.4.12.9000
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
6 changes: 6 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# ichimoku 1.4.12.9000 (development)

#### Updates:

* `oanda_quote()` now correctly writes a new line after each quote.

# ichimoku 1.4.12

#### Updates:
Expand Down
2 changes: 1 addition & 1 deletion R/oanda.R
Original file line number Diff line number Diff line change
Expand Up @@ -967,7 +967,7 @@ oanda_quote <- function(instrument, price = c("M", "B", "A"), server, apikey) {
data <- getPrices(instrument = instrument, granularity = "D", count = 1, price = price,
server = server, apikey = apikey, .validate = FALSE)
pctchg <- 100 * (data[["c"]] / data[["o"]] - 1)
cat(sprintf("%s %s open: %.6g high: %.6g low: %.6g last:\u001b[7m %.6g \u001b[27m %%chg: %.4f %s",
cat(sprintf("%s %s open: %.6g high: %.6g low: %.6g last:\u001b[7m %.6g \u001b[27m %%chg: %.4f %s\n",
instrument, format.POSIXct(.Call(ichimoku_psxct, data[["t"]])),
data[["o"]], data[["h"]], data[["l"]], data[["c"]], pctchg, price), file = stdout())

Expand Down

0 comments on commit 4343047

Please sign in to comment.