Function will write a policy 'decision' to the csv file specific for each Expert Advisor
rl_record_policy(
x,
last_result,
trading_system,
path_terminal,
fileName = "SystemControl"
)
- Dataframe containing columns MarketType and Policy
- character vector of the last result of the trade
- character vector of length 1 with Trading System Magic Number information
- path to the sandbox where this Policy/Decision must be written
- string, desired control file prefix e.g. 'SystemControl'
nothing is returned but function will write csv file to the supplied directory
# NOT RUN {
library(stringr)
library(magrittr)
library(dplyr)
data(TradeStatePolicy)
dir <- normalizePath(tempdir(),winslash = "/")
rl_record_policy(x = TradeStatePolicy,
last_result = "tradewin",
trading_system = 8118101,
path_terminal = dir,
fileName = "SystemControlRL")
# }
Run the code above in your browser using DataLab