opt_create_graphs: Function to create summary graphs of the trading results

Description Usage Arguments Details Value Examples

View source: R/opt_create_graphs.R

Description

Create graphs and store them into pdf file

[Stable]

Usage

1
opt_create_graphs(x, outp_path, graph_type = "pdf")

Arguments

x
  • dataframe with aggregated trading results

outp_path
  • path to the folder where to write file

graph_type
  • character, one of the options c('ts', 'bars', 'pdf')

Details

bar graph and time series optionally written to the pdf file. File is named with a date of analysis to the location specified by the user

Value

graphic output

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
 library(lazytrade)
 library(readr)
 library(dplyr)
 library(magrittr)
 library(lubridate)
 library(ggplot2)
 data(DFR)
 dir <- normalizePath(tempdir(),winslash = "/")
 # create pdf file with two graphs
 opt_create_graphs(x = DFR, outp_path = dir)

 # only show time series plot
 opt_create_graphs(x = DFR, graph_type = 'ts')

lazytrade documentation built on June 21, 2021, 1:08 a.m.