You are on page 1of 1

( 2 days ago ha-open = 2 days ago ha-high and 1 day ago ha-close >= 2 days ago ha-close and

1 day ago ha-high >= 2


days ago ha-high and 1 day ago ha-low >= 2 days ago ha-low and latest ha-close >= 1 day ago ha-close and latest ha-
high >= 1 day ago ha-high and latest ha-low >= 1 day ago ha-low and latest ha-open = latest ha-low

and latest volume > 100000 and latest avg true range ( 1 ) > latest avg true range ( 14 ) and latest rsi ( 14 ) > 50 ) )

11

// Identify engulfing candles

bullishEC = ((ha_open[2] == ha_high[2]) and (ha_close[1] >= ha_close[2]) and (ha_high[1] >= ha_high[2]) and (ha_low[1]
>= ha_low[2]) and (ha_close >= ha_close[1]) and (ha_high >= ha_high[1]) and (ha_low >= ha_low[1]) and (ha_open ==
ha_low))

bearishEC = ((ha_open[2] == ha_low[2]) and (ha_close[1] <= ha_close[2]) and (ha_high[1] <= ha_high[2]) and (ha_low[1]
<= ha_low[2]) and (ha_close <= ha_close[1]) and (ha_high <= ha_high[1]) and (ha_low <= ha_low[1]) and (ha_open ==
ha_high))

// Identify engulfing candles

// Identify engulfing candles

bullishEC = ((ha_close[4] < ha_close[5]) and(ha_close[3] < ha_close[4]) and(ha_close[2] < ha_close[3]) and (ha_close[1] <
ha_close[2]) and (ha_close > ha_close[1]))

bearishEC = ((ha_close[4] > ha_close[5]) and(ha_close[3] > ha_close[4]) and(ha_close[2] > ha_close[3]) and (ha_close[1]
> ha_close[2]) and (ha_close < ha_close[1]))

You might also like