View source: R/evaluate_macroeconomic_event.R
evaluate_macroeconomic_event | R Documentation |
Function is reading the content of the file 01_MacroeconomicEvent.csv. Content of the file can be either 1 or 0. 1 - when Macro Economic event is present, 0 - when it's not. Function will also read magic number of the trading robots. This is indicated in the file 'Setup.csv'. Final outcome of the function is the series of files written to the destination directories. These files will either enable or disable opening of new positions in the trading robots
evaluate_macroeconomic_event(
setup_file_path,
setup_file_name = "Setup.csv",
macro_event_path,
macro_file_name = "01_MacroeconomicEvent.csv",
path_T1,
path_T3
)
setup_file_path |
string, path to the folder with Setup.csv file |
setup_file_name |
string, name of the file 'Setup.csv' |
macro_event_path |
string, path to the folder with a file '01_MacroeconomicEvent.csv' |
macro_file_name |
string, name of the file '01_MacroeconomicEvent.csv' |
path_T1 |
Path of the Terminal 1 |
path_T3 |
Path of the Terminal 3 |
This function is used exclusively with Market Type recognition system.
Final evaluation will consist in writing a dedicated file with a simple information:
When Macro economic even is not present:
"Magic","IsEnabled" 8139125,1
or, when Macro economic event is present:
"Magic","IsEnabled" 8139125,0
Function will write files indicating to enable or disable trading systems to open new orders
# evaluate data on macroeconomic event (required to start trading)
library(dplyr)
library(readr)
library(lazytrade)
dir <- normalizePath(tempdir(),winslash = "/")
evaluate_macroeconomic_event(setup_file_path = system.file('extdata', package = "lazytrade"),
setup_file_name = "Setup.csv",
macro_event_path = system.file('extdata', package = "lazytrade"),
macro_file_name = "01_MacroeconomicEvent.csv",
path_T1 = dir, path_T3 = dir)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.