enable.rule: enable a rule in the strategy

Description Usage Arguments See Also

View source: R/rules.R

Description

function to make it easy to enable (or disable) a specific rule in a strategy

Usage

1
2
enable.rule(strategy, type = c(NULL, "risk", "order", "rebalance", "exit",
  "enter", "chain"), label, enabled = TRUE, store = FALSE)

Arguments

strategy

an object of type 'strategy' which contains the rule

type

one of "risk","order","rebalance","exit","enter","chain"

label

the label for the rule; grep will be used to match, so multiple rules may be enabled (disabled) as a result

enabled

TRUE/FALSE whether the rule is enabled for use in applying the strategy, default TRUE

store

TRUE/FALSE whether to store the updated strategy in the .strategy environment, or return it. default FALSE

See Also

add.rule applyStrategy


cloudcell/quantstrat documentation built on May 13, 2019, 8:03 p.m.