CSPThreeLineStrike: Three Line Strike Candlestick Pattern

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

View source: R/CSPThreeLineStrike.R

Description

Look for bullish and bearish Three Line Strike Patterns in a Open/Close price series

Usage

1
  CSPThreeLineStrike(TS, n=25,  minbodysizeMedian=.5)

Arguments

TS

xts Time Series containing Open and Close prices

n

number of preceding candles to calculate median candle length

minbodysizeMedian

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

Details

Number of candle lines: 4

For the bullish Three Line Strike, the first three candles must all be white with not too small candle bodies. The close of the second candle is above the close of the first. The close of the third candle is above the close of the second. The open of the last candle is at or above the close of the third candle, then in the same period the price moves down heavily and closes at or below the open of the first candle.

The bearish Three Line Strike is the opposite, with three black candles followed by a long white candle.

This formation is very rare.

Value

A xts object containing the column:

Bull.ThreeLineStrike

TRUE if bullish Three Line Strike pattern detected

Bear.ThreeLineStrike

TRUE if bearish Three Line Strike pattern detected

Note

The function filters patterns that look like three line strikes, without considering the current trend direction. If only pattern in uptrends or downtrends should be filtered, a external trend detection function must be used. See examples.

Author(s)

Andreas Voellenklee

References

The following site(s) were used to code/document this indicator:
https://hitandruncandlesticks.com/bullish-three-line-strike/
https://hitandruncandlesticks.com/bearish-three-line-strike/
http://thepatternsite.com/ThreeLineStrikeBull.html

See Also

CSPNLongWhiteCandleBodies CSPNLongBlackCandleBodies

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
## Not run: 
  Sys.setenv(TZ="UTC")

  getSymbols('COG')
  TLS <- CSPThreeLineStrike(COG)
  
  # how often does that occur?
  colSums(TLS, na.rm=TRUE)
  
  # when did that occur?
  TLS[TLS[,1]>0 | TLS[,2]>0,]
  
  # filter for bearish three line strikes that occur in downtrends 
  TLS1 <- CSPThreeLineStrike(COG)[,"Bear.ThreeLineStrike"] & 
    TrendDetectionChannel(lag(COG,k=4))[,"DownTrend"]
  TLS1[TLS1[,1]>0,]
  
  # show in a chart
  chartSeries(COG["2014-09/2014-10"])

## End(Not run)

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