# write examples for the function
library(dplyr)
library(readr)
library(lubridate)
library(lazytrade)
library(magrittr)
# sample dataset
ind = system.file("extdata", "AI_RSIADXUSDJPY60.csv",
package = "lazytrade") %>% read_csv(col_names = FALSE)
# convert to POSIX format
ind$X1 <- ymd_hms(ind$X1)
# create temporary path (check output of tempdir() to check the result)
path_data <- normalizePath(tempdir(),winslash = "/")
# add tick data to the folder
tick = system.file("extdata", "TickSize_AI_RSIADX.csv",
package = "lazytrade") %>% read_csv(col_names = FALSE)
write_csv(tick, file.path(path_data, "TickSize_AI_RSIADX.csv"), col_names = FALSE)
# data transformation using the custom function for one symbol
aml_collect_data(indicator_dataset = ind,
symbol = 'USDJPY',
timeframe = 60,
path_data = path_data)
Run the code above in your browser using DataLab