Description Usage Arguments Value
add a stop loss rule to a strategy
1 2 3 |
strategy |
an object of type 'strategy' to add the rule to |
name |
name of the stop loss rule, must correspond to an R function |
arguments |
named list of default arguments to be passed to an rule function when executed |
parameters |
vector of strings naming parameters to be saved for apply-time definition |
label |
arbitrary text label for rule output, NULL default will be converted to '<name>.rule' |
parent |
the label of the parent rule for a chain rule, unavailable |
type |
should be exit, and it is default |
... |
any other passthru parameters |
enabled |
TRUE/FALSE whether the rule is enabled for use in applying the strategy, default TRUE |
indexnum |
if you are updating a specific rule, the index number in the $rules[type] list to update |
path.dep |
TRUE/FALSE whether rule is path dependent, default TRUE, see Details |
timespan |
an xts/ISO-8601 style time subset, like "T08:00/T15:00", see Details |
store |
TRUE/FALSE whether to store the strategy in the .strategy environment, or return it. default FALSE |
storefun |
TRUE/FALSE whether to store the function in the rule, default TRUE. setting this option to FALSE may slow the backtest, but makes |
if strategy
was the name of a strategy, the name. It it was a strategy, the updated strategy.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.