Description Usage Arguments Details Value See Also
This adds a signal definition to a strategy object.
1 2 |
strategy |
an object (or the name of an object) of type 'strategy' to add the signal to |
name |
name of the signal, must correspond to an R function |
arguments |
named list of default arguments to be passed to an signal function when executed |
parameters |
vector of strings naming parameters to be saved for apply-time definition,default NULL, only needed if you need special names to avoid argument collision |
label |
arbitrary text label for signal output, default NULL |
... |
any other passthru parameters |
enabled |
TRUE/FALSE whether the signal is enabled for use in applying the strategy, default TRUE |
indexnum |
if you are updating a specific signal, the index number in the $signals list to update |
store |
TRUE/FALSE whether to store the strategy in the .strategy environment, or return it. default FALSE |
Signals denote times at which the strategy may want to
take action. Common signals types from the literature include
crossovers, thresholds, or other interactions between your mktdata
and your indicators.
if label
is not supplied, NULL default will be converted to '<name>.sig'
if the signal function returns one named column, we use that, and ignore the label.
If the signal function returns multiple columns, the label will be
paste
'd to either the returned column names or the
respective column number.
if strategy
was the name of a strategy, the name. It it was a strategy, the updated strategy.
applySignals
add.indicator
link{add.rule}
sigComparison
sigCrossover
sigFormula
sigPeak
sigThreshold
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.