0% found this document useful (0 votes)
92 views1 page

DSFDGFHFHHGJJHKHK, KJ, GH

The document contains code to identify bullish and bearish engulfing candlestick patterns. It defines conditions for an engulfing candle, including that the current period's open equals the prior period's high/low, the bodies entirely engulf/are engulfed by the prior period's body, and the current period's close is above/below the prior close. It provides multiple examples of how to programmatically check for these patterns using historical candle data.

Uploaded by

shekhu26
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
92 views1 page

DSFDGFHFHHGJJHKHK, KJ, GH

The document contains code to identify bullish and bearish engulfing candlestick patterns. It defines conditions for an engulfing candle, including that the current period's open equals the prior period's high/low, the bodies entirely engulf/are engulfed by the prior period's body, and the current period's close is above/below the prior close. It provides multiple examples of how to programmatically check for these patterns using historical candle data.

Uploaded by

shekhu26
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 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