nextCandlePosition: Position and color of the next candle in a OC price series

Description Usage Arguments Details Value Note Author(s) See Also Examples

View source: R/nextCandlePosition.R

Description

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.

Usage

1

Arguments

TS

xts Time Series containing Open and Close Prices

Details

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.

Value

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)

Note

This function uses the Next function of the quantmod package.

Author(s)

Andreas Voellenklee

See Also

Next

Examples

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)

candlesticks documentation built on Feb. 2, 2020, 3:01 a.m.