Description Usage Arguments Value See Also
View source: R/indicator-define.R
Use indicator params to create a definition function for computing indicator.
The definition function is used by create_indicator
to compute
indicator timeseries of stocks.
1 2 3 4 5 6 7 | create_indicator_def_fun(
indicator_code,
indicator_expr,
rolly_window = 0,
period = c("day", "month", "quarter", "year"),
fillna_method = c("ffill", "bfill", "nfill")
)
|
indicator_code |
A character for indicator code. |
indicator_expr |
A expr as a formula to compute indicator. |
rolly_window |
A numeric as rolly computing window, default 0 means no rolling. |
period |
A periodicity of indicator, e.g. "day", "month", "quarter", "year". |
fillna_method |
A method to fill NA , e.g. "ffill", "bfill", "nfill". Default "ffill" means to use value before NAs to fill NAs; "bfill" means to use data behind NAs to fill NAs; "nfill" means to don't fill NAs. |
A function of indicator definition to compute indicator if succeed, otherwise NULL.
Other indicator define functions:
create_attribute_def_fun()
,
get_indicator_defs()
,
get_indicator_vars()
,
ind_attr_def_indcd()
,
ind_attr_def_trdstat()
,
parse_indicator_vars()
,
prioritize_indicator_defs()
,
related_indicator_defs()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.