sigThreshold | R Documentation |
Many strategies, including RSI or MACD styles, make trading decisions when an indicator is over or under a specific threshold. This function generates the appropriate signal based on such a threshold.
sigThreshold(
label,
data = mktdata,
column,
threshold = 0,
relationship = c("gt", "lt", "eq", "gte", "lte"),
cross = FALSE
)
label |
text label to apply to the output |
data |
data to apply comparison to |
column |
named column to apply comparison to |
threshold |
numeric threshold to test for |
relationship |
one of c("gt","lt","eq","gte","lte") or reasonable alternatives |
cross |
if TRUE, will return TRUE only for the first observation to cross the threshold in a run |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.