6.9 Two in a row

Two in a row patterns are 2-day patterns. It is completely opposite of engulfing or harami patterns. The real bodies of two day candles are completely disjoint.

6.9.1 Kicking up

Bullish signal:

  1. bearish candle on day 1
  2. bullish candle on day 2
  3. gap up between day 1 and day 2

Here is an exmample:

price <- MSFT['2011-11-08/2011-11-14']
candleChart(price, theme='white')

We can identify the pattern through the following code:

kick.up <-c(NA)
for (i in 2:length(Cl(MSFT))){
  if (D[i-1]>0 &&
      U[i]>0 && 
      OP[i]>=CL[i-1]){
    kick.up [i] <- 1
  } else{
    kick.up[i] <- 0
  } 
}
kick.up <- reclass(kick.up,Cl(MSFT))

Let us check if our code does the job:

kick.up['2011-11-08/2011-11-14']
##            [,1]
## 2011-11-08    0
## 2011-11-09    0
## 2011-11-10    0
## 2011-11-11    1
## 2011-11-14    0

6.9.2 Kicking Down

Bearish signal:

  1. bullish candle on day 1
  2. bearish candle on day 2
  3. gap down between day 1 and day 2

Here is an exmample:

price <- MSFT['2010-08-16/2010-08-19'] 
candleChart(price, theme='white')