Requests & Ideas (MQL5 only!) - page 16

 
Vladimir Karputov :

A series of pattern studies. The first experimental - "Bullish and Bearish Engulfing".

...


Bullish and Bearish Engulfing version 1.000 -

This version does not yet trade, but allows a debugging mode to pause, in order to check visually the operation.

 

Bullish and Bearish Engulfing version 1.002 -

Corrected copy.

Also, a preliminary conclusion: the pattern of "Bullish and Bearish Engulfing" or a little-profitable or even unprofitable.


Version with fixes (1.004):

Bullish and Bearish Engulfing

 

Следующий паттерн: "Evening Star".

Evening Star

...

 

Just about Evening Star pattern:

Forum on trading, automated trading systems and testing trading strategies

Libraries: MQL5 Wizard - Candlestick Patterns Class

Sergey Golubev, 2013.09.14 19:53

Evening Star

The Evening Star Pattern is a bearish reversal pattern, usually occuring at the top of an uptrend. The pattern consists of three candlesticks:

  • Large Bullish Candle (Day 1)
  • Small Bullish or Bearish Candle (Day 2)
  • Large Bearish Candle (Day 3)


The first part of an Evening Star reversal pattern is a large bullish green candle. On the first day, bulls are definitely in charge, usually new highs were made.

The second day begins with a bullish gap up. It is clear from the opening of Day 2 that bulls are in control. However, bulls do not push prices much higher. The candlestick on Day 2 is quite small and can be bullish, bearish, or neutral.

Generally speaking, a bearish candle on Day 2 is a stronger sign of an impending reversal. But it is Day 3 that is the most significant candlestick.

Day 3 begins with a gap down, (a bearish signal) and bears are able to press prices even further downward, often eliminating the gains seen on Day 1.

Evening Star Candlestick Chart Example

The chart below of Exxon-Mobil (XOM) stock shows an example a Evening Star bearish reversal pattern that occured at the end of an uptrend:


Day 1 of the Evening Star pattern for Exxon-Mobil (XOM) stock above was a strong bullish candle, in fact it was so strong that the close was the same as the high (very bullish sign). Day 2 continued Day 1's bullish sentiment by gapping up. However, Day 2 was a Doji, which is a candlestick signifying indecision. Bulls were unable to continue the large rally of the previous day; they were only able to close slightly higher than the open.

Day 3 began with a bearish gap down. In fact, bears took hold of Exxon-Mobil stock the entire day, the open was the same as the high and the close was the same as the low (a sign of very bearish sentiment). Also, Day 3 powerfully broke below the upward trendline that had served as support for XOM for the past week. Both the trendline break and the classic Evening Star pattern gave traders a signal to sell short Exxon-Mobil stock.

The Evening Star pattern is a very powerful three candlestick bearish reversal pattern. The bullish equivalent of the Evening Star is the Morning Star pattern

 
Sergey Golubev :

Just about Evening Star pattern:



Unfortunately, if we look for such a strict correspondence -


- we will find very few coincidences. Therefore, I will enter several settings (type bool) to facilitate automation:

Strict match 1

Strict match 2

Strict match 3.

Parameter of strict compliance "Gap" (true -> exact match, false -> gap is not taken into account):

Evening Star Gap

Parameter of strict compliance "Candle 2 type" (true -> exact match, false -> type of candle number 2 is not taken into account):

Evening Star Candle 2 type

Parameter of strict compliance "Candle sizes" (true -> exact match, false -> candle sizes are not taken into account):

Evening Star Candle sizes

It seems, all. Now it is possible to start coding.

 

According to the image - we are having 3 candles:

  1. bullish candle #1 (or Day 1 on the image);
  2. small bearish or small bullish candle #2 (or Day 2 on the image above);
  3. bearish candle (#3, or day 3 on the image above).

- close for candle 1 < open for candle 2, and
- close for candle 2 > open for candle 3.

But ... candle #2 should be 'small candle' ... I have no idea how to define "small candle" ... in pips or any ...
or ... may be the following:

- body of candle 1 > body of candle 2, and
- body of candle 3 > body of candle 2

----------------

So, the situation may be the following (it is not programming description, it is just what I understood from the description of this pattern):

close for candle 1 < open for candle 2, and
close for candle 2 > open for candle 3, and
body of candle 1 > body of candle 2, and
body of candle 3 > body of candle 2, where body = close - open (or open - close).

----------------

But I agree - it will be few coincidences.

 
Sergey Golubev :

...


But ... candle #2 should be 'small candle' ... I have no idea how to define "small candle" ... in pips or any ...
or ... may be the following:

- body of candle 1 > body of candle 2, and
- body of candle 3 > body of candle 2

...


A good option. That's exactly what I'll do.
 

Evening Star version   "1.001"

Does not yet sell.

In the Debugging on History Data, you can visually assess the quality of the detected patterns.

Files:
 
I think - before EA - it is the better to create the indicator with arrows so we can check the patterns on the charts in easy way.
 
Sergey Golubev:
I think - before EA - it is the better to create the indicator with arrows so we can check the patterns on the charts in easy way.


Unexpected offer. I like this idea!