rl_record_policy: Record Reinforcement Learning Policy.

Description Usage Arguments Details Value Author(s) Examples

View source: R/rl_record_policy.R

Description

Function will write a policy 'decision' to the csv file specific for each Expert Advisor

[Stable]

Usage

1
2
3
4
5
6
7
rl_record_policy(
  x,
  last_result,
  trading_system,
  path_terminal,
  fileName = "SystemControl"
)

Arguments

x
  • Dataframe containing columns MarketType and Policy

last_result
  • character vector of the last result of the trade

trading_system
  • character vector of length 1 with Trading System Magic Number information

path_terminal
  • path to the sandbox where this Policy/Decision must be written

fileName
  • string, desired control file prefix e.g. 'SystemControl'

Details

It is imperative that terminal path contains exact word Terminal3

Value

nothing is returned but function will write csv file to the supplied directory

Author(s)

(C) 2019,2021 Vladimir Zhbanko

Examples

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

lazytrade documentation built on Dec. 16, 2021, 1:06 a.m.