Description Usage Arguments Details Value Note Author(s) See Also Examples
View source: R/nextCandlePosition.R
Examines open and close price of the following candle relative to the close price of the current candle. Also returns the color of the folling candle.
1 |
TS |
xts Time Series containing Open and Close Prices |
Sometimes it is suggested to wait for a confirmation in the form of a higher/lower following close and/or a white/black candle before conisdering trading the pattern. This function compares the price levels and returns a xts object with columns of boolean values for each contition.
A xts object containing the columns:
HigherOpen |
TRUE if following candle opens higher than current close |
LowerOpen |
TRUE if following candle opens lower than current close |
HigherClose |
TRUE if following candle closes higher than current close |
LowerClose |
TRUE if following candle closes lower than current close |
White |
TRUE if following candle is white (Cl>Op) |
Black |
TRUE if following candle is black (Cl<Op) |
This function uses the Next function of the quantmod package.
Andreas Voellenklee
1 2 3 4 5 6 7 8 | ## Not run:
# filter for inverted hammers in uptrends that is followed by a lower close the next day
getSymbols('YHOO', adjust=TRUE)
CSPInvertedHammer(YHOO) &
TrendDetectionChannel(YHOO)[,"UpTrend"] &
nextCandlePosition(YHOO)[,"LowerClose"]
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.