CSPNLongWhiteCandles: N consecutive long candles / bodies of same color

Description Usage Arguments Value Author(s) See Also Examples

View source: R/CSPNLongCandles.R

Description

look for N consecutive long candles / long candle bodies of same color

Usage

1
2
3
4
CSPNLongWhiteCandles(TS, N=2, n=20, threshold=1)
CSPNLongBlackCandles(TS, N=2, n=20, threshold=1)
CSPNLongWhiteCandleBodies(TS, N=2, n=20, threshold=1)
CSPNLongBlackCandleBodies(TS, N=2, n=20, threshold=1)

Arguments

TS

xts Time Series containing OHLC prices

N

number of candles to test

n

number of preceding candles to calculate median candle length

threshold

minimum/maximum candle length in relation to the median candle length of n preceding candles

Value

A xts object containing the columns:

<N>LongWhiteCandles

TRUE if current candle is the N-th consecutive long white candle

<N>LongBlackCandles

TRUE if current candle is the N-th consecutive long black candle

<N>LongWhiteCandleBodies

TRUE if current candle is the N-th consecutive long white candle body

<N>LongBlackCandleBodies

TRUE if current candle is the N-th consecutive long black candle body

Author(s)

Andreas Voellenklee

See Also

CSPLongCandle CSPLongCandleBody

Examples

1
2
3
4
5
6
7
8
## Not run: 
  getSymbols('YHOO',adjust=TRUE)
  CSPNLongWhiteCandles(YHOO)
  CSPNLongBlackCandles(YHOO, N=3)  
  CSPNLongWhiteCandleBodies(YHOO)
  CSPNLongBlackCandleBodies(YHOO, N=4, n=50, threshold=1.2)

## End(Not run)

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