evaluate_macroeconomic_event: Function used to evaluate market type situation by reading...

Description Usage Arguments Details Value Examples

View source: R/evaluate_macroeconomic_event.R

Description

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

[Stable]

Usage

1
2
3
4
5
6
7
8
evaluate_macroeconomic_event(
  setup_file_path,
  setup_file_name = "Setup.csv",
  macro_event_path,
  macro_file_name = "01_MacroeconomicEvent.csv",
  path_T1,
  path_T3
)

Arguments

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

Details

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

Value

Function will write files indicating to enable or disable trading systems to open new orders

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# 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)

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