How to improve the bullish engulfing pattern.

When testing certain chart patterns it is sometimes useful to filter the markets that you are testing by the length of time that they have been in either an up-trend or a down-trend.

For example, the bullish engulfing candlestick pattern is known to be a reversal signal of a down-trend. When testing the pattern, it is therefore necessary to include the rule that any market is actually in a down-trend before you are allowed to trade the signal.

When ignoring that the pattern needs to be preceded by a down-trend, the bullish engulfing pattern can simply be written as:

Bullish Engulfing Pattern Amibroker Code.

BlackBody = C < O;

WhiteBody = C > O;

Engulfing = Max(O,C) > Ref(Max(O,C),-1) AND Min(O,C) < Ref(Min(O,C),-1);

BullishEngulf = Ref(blackbody,-1) AND whitebody AND engulfing;

The following chart includes a bullish engulfing pattern that has occurred during a market that is clearly not in a down-trend.

Using Amibroker language you can include the following formula to ensure that any bullish engulfing pattern that is traded during a back-test has occurred when price was making new lows.

DownTrend = L < Ref (LLV (L, 10 ),-1);

//In the line of code that I have just written, a down-trend is defined as the low of a bar being the lowest low of the past 10 bars. If you prefer to define a down-trend as the price making new 20 day lows , simply change the 10 to 20 . //.

A Bullish Engulfing Pattern during a down-trend.

The following formula includes the rule that a bullish engulfing pattern is only valid if the low of the first day in the pattern is the lowest low in the past 10 days.

DownTrend = L < Ref (LLV (L, 10 ),-1);

BlackBody = C < O;

WhiteBody = C > O;

Engulfing = Max(O,C) > Ref(Max(O,C),-1) AND Min(O,C) < Ref(Min(O,C),-1);

BullishEngulf = Ref(blackbody,-1) AND whitebody AND engulfing AND Ref(downtrend,-1);

To illustrate the reason that defining a down-trend is important when trading the bullish engulfing pattern, I have done some tests.

All tests were completed using 10 years of historical U.S. stock price data – the database included all stocks that currently exist on the NYSE.

No de-listed stocks are included in the database.

I only want to test the efficacy of the raw signal – No compounding, commissions or slippage are included in the returns.

I have set the maximum open positions to 10,

I use 10% equity per trade and all positions are closed after a 5 day holding period.

I have also filtered out stocks under $5.00 and with less than 100,000 shares average (20) daily volume.

Positions are ranked by highest volume.

The first test results are simply trading the bullish engulfing pattern with no regard for the preceding trend.

Bullish Engulfing Pattern, no down-trend filter, 5 day holding period

Notable metrics that help us gauge whether the bullish engulfing pattern provides a decent entry signal include a 51.46% win rate and a 0.16% average 5 day return.

For the next test, I wanted to illustrate that the bullish engulfing pattern provides far better signals if we only trade them during a clearly defined down-trend.

I ran an optimisation that tested the pattern when a down-trend is defined as the first day of the pattern making the lowest low in the past 1 – 40 days.

DownTrend = L < Ref (LLV (L, optimize(10,1,40,1 ) ),-1):

The following charts plot the (x) day low that was used to define a down-trend and the corresponding 5 day average profit/loss % and the average win-rate %.

The above charts immediately tell us that including a specific down-trend filter when trading bullish engulfing candlestick patterns improves the 5 day returns and win-rate of the signal.

The areas of most stability seem to be when we define a down-trend as being a bar that has made the lowest low of the past 17 – 24 bars. If we simply take the middle value (we’ll round down to 20), we come to the final definition of a down-trend as it pertains to our bullish engulfing candlestick pattern.

The Bullish Engulfing Pattern Final Formula

DownTrend = L < Ref (LLV (L, 20 ),-1);

BlackBody = C < O;

WhiteBody = C > O;

Engulfing = Max(O,C) > Ref(Max(O,C),-1) AND Min(O,C) < Ref(Min(O,C),-1);

BullishEngulf = Ref(blackbody,-1) AND whitebody AND engulfing AND Ref(downtrend,-1);

Bullish Engulfing Pattern, with 20 day low down-trend filter, 5 day holding period

Example Trade:

Notable metrics when including the 20 day low down-trend filter include a 53.64 % win-rate and a 0.40% average 5 day profit/loss %.

As we can see, the bullish engulfing pattern can be improved as an entry signal if it is only traded when occurring at the bottom of an established down-trend.

There are many other filters that can be used to greatly improve the win-rate % and average profit/loss % of the bullish engulfing pattern, but that is a topic which I shall leave for another article.

Do you trade the bullish engulfing pattern?

Do you have a rule that defines the prior trend?

Let me know in the comments!

If you enjoyed this article, you might enjoy my best-selling book. See more here.

Leave A Response Cancel reply

Login to Members Area…

Search For Financial Data

Amibroker Tutorial: Identifying a…

Narrow Range Day NR7 Trading Strategy…

Moving Momentum Strategy Test Results

CVR3 VIX Market Timing Strategy Test…

Ichomoku Cloud Trading Strategy Test…

Disclaimer - Forex, futures, stock, and options trading is not appropriate for everyone. There is a substantial risk of loss associated with trading these markets. Losses can and will occur. No system or methodology has ever been developed that can guarantee profits or ensure freedom from losses. Nor will it likely ever be. No representation or implication is being made that using the BacktestWizard methodology or system or the information contained within any BacktestWizard material will generate profits or ensure freedom from losses. HYPOTHETICAL OR SIMULATED PERFORMANCE RESULTS HAVE CERTAIN LIMITATIONS. UNLIKE AN ACTUAL PERFORMANCE RECORD, SIMULATED RESULTS DO NOT REPRESENT ACTUAL TRADING. ALSO, SINCE THE TRADES HAVE NOT BEEN EXECUTED, THE RESULTS MAY HAVE UNDER-OR-OVER COMPENSATED FOR THE IMPACT, IF ANY, OF CERTAIN MARKET FACTORS, SUCH AS LACK OF LIQUIDITY. SIMULATED TRADING PROGRAMS IN GENERAL ARE ALSO SUBJECT TO THE FACT THAT THEY ARE DESIGNED WITH THE BENEFIT OF HINDSIGHT. NO REPRESENTATION IS BEING MADE THAT ANY ACCOUNT WILL OR IS LIKELY TO ACHIEVE PROFIT OR LOSSES SIMILAR TO THOSE SHOWN.


/

Download Best Pattern Indicator