Indicators: ExCandles2

 

ExCandles2:

ExCandles-v2 indicator shows candlesticks combinations on a chart using the arrows. This indicator is the enhanced version of ExCandles.

Supported candlestick patterns:

  1. Shooting star
  2. Inverted hammer
  3. Hanging man
  4. Hammer
  5. Bearish Engulfing
  6. Bullish Engulfing
  7. Dark Cloud Cover
  8. Piercing Line
  9. Evening Star
  10. Morning Star
  11. Evening Doji Star
  12. Morning Doji Star

Author: Nikolay Kositsin

ExCandles2 candlestick patterns indicator

 

Forum

Libraries: MQL5 Wizard - Candlestick Patterns Class

newdigital, 2013.09.10 15:21

Just some basic for traders -

Candlestick Basics

Candlestick charts are an effective way of visualizing price movements. There are two basic candlesticks:

  • Bullish Candle: When the close is higher than the open (usually green or white)
  • Bearish Candle: When the close is lower than the open (usually red or black)


Candlestick Parts

There are three main parts to a candlestick:

  • Upper Shadow: The vertical line between the high of the day and the close (bullish candle) or open (bearish candle)
  • Real Body: The difference between the open and close; colored portion of the candlestick
  • Lower Shadow: The vertical line between the low of the day and the open (bullish candle) or close (bearish candle)
Candlestick Patterns

The power of Candlestick Charts is with multiple candlesticks forming reversal and continuation patterns:

  • Bullish Engulfing Pattern
  • Bearish Engulfing Pattern
  • Dark Cloud Cover
  • Doji
  • Dragonfly Doji
  • Evening Star
  • Gravestone Doji
  • Hammer
  • Hanging Man
  • Harami
  • Inverted Hammer
  • Morning Star
  • Piercing Pattern
  • Shooting Star
  • Tweezer Tops & Bottoms
  • Windows




 

Forum

Libraries: MQL5 Wizard - Candlestick Patterns Class

newdigital, 2013.09.10 19:03

Real Body and Upper and Lower Shadows


The rectangular area between the opening and the close of a session of trading is called the real body. The thin lines that look like candle wicks above and below the real body are called shadows. The shadow above the real body is called the upper shadow, the top end of the upper shadow corresponding to the high of the session of trading, and the shadow below the real body is called the lower shadow, where the bottom end of the lower shadow corresponds to the low of the session of trading.

Bullish Candlestick


When discussing trading sessions based on a trading day (morning to afternoon), generally speaking the two most significant times of the trading day are the opening and the close. The opening and the close create the real body of the candlestick; hence, the most important part of a candlestick is the real body. By looking at a candlestick, a person can quickly tell whether traders were eagerly buying throughout the day (bulls were in charge for the trading day) - the candlestick is green, or whether traders were eagerly selling throughout the day (bears dominated the trading day) - the candlestick is red. By looking at the size of the real body of the candlestick, a trader can tell if the bulls were significantly in charge of the trading day (a tall green candlestick) or only moderately in charge of the trading day (a small green candlestick). Similarly, if a trader sees a large red candle, he or she can assume that the selling pressure of the bears overpowered the bulls for the day; however, if the candlestick is very small and red, then the trader can see that the bears were only slightly more powerful that day than the bulls. In summary, the real body of a candlestick can summarize the outcome of a period of trading in an easy to see way – green = bulls win the trading session, red = bears win the trading session; and the height of the candle equals the margin of victory for the bulls or the bears.


Steve Nison (1994) states that “for a [bullish] candle to have meaning, some Japanese candlestick traders believe that the real body should be at least three times as long as the previous day’s real body.” (p. 20). Roads (2008) suggests the following: “determine the area covered by the difference between the close and the open. If it’s at least 90 percent of the area covered by the difference between the high and low, you have a long white candle” (p. 76). An example of a computer charting package’s definition is: “Its Close price is higher than the Open price; Its body is longer than each shadow; Its body is longer than the average body size calculated for the specified number of preceding candles” (ThinkorSwim, 2011).


Bullish Marubozu

There are specific versions of the bullish candle. The first is a very bullish candlestick called the bullish marubozu. The rough translation of marubozu is “bald or little hair” (Rhoads, 2008, p. 74). A marubozu is bald or has little hair because a marubozu has no upper or lower shadow, or at least a very small upper and/or lower shadow. This is the most extreme form of the bullish candlestick because bulls were in charge from the opening to the close; bears were unable to push prices below the opening price and the trading session ended with bulls still buying pushing prices upward until the close.


 

Forum

Libraries: MQL5 Wizard - Candlestick Patterns Class

newdigital, 2013.09.11 16:10

Bullish Engulfing Pattern

The Bullish Engulfing Candlestick Pattern is a bullish reversal pattern, usually occuring at the bottom of a downtrend. The pattern consists of two Candlesticks:

  • Smaller Bearish Candle (Day 1)
  • Larger Bullish Candle (Day 2)

The bearish candle real body of Day 1 is usually contained within the real body of the bullish candle of Day 2.

On Day 2, the market gaps down; however, the bears do not get very far before bulls take over and push prices higher, filling in the gap down from the morning's open and pushing prices past the previous day's open.

The power of the Bullish Engulfing Pattern comes from the incredible change of sentiment from a bearish gap down in the morning, to a large bullish real body candle that closes at the highs of the day. Bears have overstayed their welcome and bulls have taken control of the market.


The chart below of the S&P 500 Depository Receipts Exchange Traded Fund (SPY) shows an example of a Bullish Engulfing Pattern occuring at the end of a downtrend:


Bullish Engulfing Buy Signal

There are three main times to buy using the Bullish Engulfing Pattern; the buy signals that are presented below are ordered from the most aggressive to most conservative:

  1. Buy at the close of Day 2 when prices rallied upwards from the gap down in the morning. A strong indication that the rally on Day 2 was significant and truly a reversal of market sentiment, is if there was a substantial increase in volume that accompanied the large move upward in price.
  2. Buy on the day after the Bullish Engulfing Pattern occurs; by waiting until the next day to buy, a trader is making sure that the bullish reversal and enthusiasm of the prior day is continuing and was not just a one day occurance like a short covering rally. In the chart above of the SPY's, a trader would likely not enter the market long on the day after the Bullish Engulfing Pattern because the market gapped down significantly and even made new lows. A trader using methodology #2, would likely wait for a more concrete buy signals such as the one presented in method #3 next.
  3. After a trader sees the Bullish Engulfing Pattern, the trader would wait for another signal, mainly a price break above the downward resistance line, before entering a buy order.

An example of what usually occurs intra-day during a Bullish Engulfing Pattern is presented next.

Intra-day Bullish Engulfing Pattern

The following 15-minute chart of the S&P 500 exchange traded fund (SPY) is of the 2-day period comprising the Bullish Engulfing Pattern example on the prior page:


  • Day 1: As is seen in the chart above, Day 1 was a down day, even closing the day at the low (bearish sentiment).
  • Day 2: The open was a gap down, very bearish sign; but the bulls appeared to have had enough because the price of the SPY's went up the rest of the day, closing near the day's highs (bullish sentiment) and higher than Day 1's high.
The Bullish Engulfing Pattern is one of the strongest candlestick reversal patterns. Its opposite is the Bearish Engulfing Pattern

 

Forum

Libraries: MQL5 Wizard - Candlestick Patterns Class

newdigital, 2013.09.11 16:21

Bearish Engulfing Pattern


The Bearish Engulfing Candlestick Pattern is a bearish reversal pattern, usually occuring at the top of an uptrend. The pattern consists of two Candlesticks:

  • Smaller Bullish Candle (Day 1)
  • Larger Bearish Candle (Day 2)


Generally, the bullish candle real body of Day 1 is contained within the real body of the bearish candle of Day 2.

The market gaps up (bullish sign) on Day 2; but, the bulls do not push very far higher before bears take over and push prices further down, not only filling in the gap down from the morning's open but also pushing prices below the previous day's open.

With the Bullish Engulfing Pattern, there is an incredible change of sentiment from the bullish gap up at the open, to the large bearish real body candle that closed at the lows of the day. Bears have successfully overtaken bulls for the day and possibly for the next few periods.

The chart below of Verizon (VZ) stock shows an example two Bearish Engulfing Patterns occuring at the end of uptrends:


Bearish Engulfing Sell Signal

Three methodologies for selling using the Bearish Engulfing Pattern are listed below in order of most aggressive to most conservative:

  1. Sell at the close of Day 2. An even stronger indication to sell is given when there is a substantial increase in volume that accompanies the large move downward in price.
  2. Sell on the day after the Bearish Engulfing Pattern occurs; by waiting until the next day to sell, a trader is making sure that the bearish reversal pattern is for real and was not just a one day occurance. In the chart above of Verizon, a trader would probably entered on the day after the Bearish Engulfing Pattern because the selling continued.
  3. Usually trader's wait for other signals, such as a price break below the upward support line, before entering a sell order. However, in the case of Verizon above, the Bearish Engulfing Pattern occured at the same time as the trendline break below support.

An example of what usually occurs intra-day during a Bearish Engulfing Pattern is presented next.

Intra-day Bearish Engulfing Pattern

The following 15-minute chart of Verizon (VZ) is of the 2-day period comprising the Bearish Engulfing Pattern example on the prior page:


  • Day 1: As is seen in the chart above, Day 1 was an up day, closing near the day's high (bullish sentiment).
  • Day 2: The open was a gap up, a very bullish sign; nevertheless, the bulls ran out of buying pressure and prices fell the rest of the day, closing near the day's lows (bearish sentiment) and lower than Day 1's lows.
The Bearish Engulfing Pattern is one of the strongest candlestick reversal patterns. Its opposite is the Bullish Engulfing Pattern

 

Forum

Libraries: MQL5 Wizard - Candlestick Patterns Class

newdigital, 2013.09.13 12:10

Dark Cloud Cover

Dark Cloud Cover is a bearish candlestick reversal pattern, similar to the Bearish Engulfing Pattern (see: Bearish Engulfing Pattern). There are two components of a Dark Cloud Cover formation:

  • Bullish Candle (Day 1)
  • Bearish Candle (Day 2)



A Dark Cloud Cover Pattern occurs when a bearish candle on Day 2 closes below the middle of Day 1's candle.

In addition, price gaps up on Day 2 only to fill the gap and close significantly into the gains made by Day 1's bullish candlestick.

The rejection of the gap up is a bearish sign in and of itself, but the retracement into the gains of the previous day's gains adds even more bearish sentiment. Bulls are unable to hold prices higher, demand is unable to keep up with the building supply.

Dark Cloud Cover Candlestick Chart Example

The chart below of Boeing (BA) stock illustrates an example of the Dark Cloud Cover Pattern:


Dark Cloud Cover Sell Signal

Traders usually suggest not selling exactly when one sees the Dark Cloud Cover Pattern (Day 1 & Day 2) until other confirming signals are given such as a break of an upward trendline or other technical indicators. One reason for waiting for confirmation is that the Dark Cloud Cover Pattern is a bearish pattern, but not as bearish as it could be: part of the gains from Day 1 have still been preserved.

A more bearish reversal pattern is the Bearish Engulfing Pattern that completely rejects the gains of Day 1 and usually closes below the lows of Day 1.


 

Forum

Libraries: MQL5 Wizard - Candlestick Patterns Class

newdigital, 2013.09.13 15:57

Dragonfly Doji

The Dragonfly Doji is a significant bullish reversal candlestick pattern that mainly occurs at the bottom of downtrends.


The Dragonfly Doji is created when the open, high, and close are the same or about the same price (Where the open, high, and close are exactly the same price is quite rare). The most important part of the Dragonfly Doji is the long lower shadow.

The long lower shadow implies that the market tested to find where demand was located and found it. Bears were able to press prices downward, but an area of support was found at the low of the day and buying pressure was able to push prices back up to the opening price. Thus, the bearish advance downward was entirely rejected by the bulls.

Dragonfly Doji Candlestick Chart Example

The chart below of the mini-Dow Futures contract illustrates a Dragonfly Doji occuring at the bottom of a downtrend:


In the chart above of the mini-Dow, the market began the day testing to find where demand would enter the market. The mini-Dow eventually found support at the low of the day, so much support and subsequent buying pressure, that prices were able to close the day approximately where they started the day.

The Dragonfly Doji is an extremely helpful Candlestick pattern to help traders visually see where support and demand is located. After a downtrend, the Dragonfly Doji can signal to traders that the downtrend could be over and that short positions should probably be covered. Other indicators should be used in conjunction with the Dragonfly Doji pattern to determine buy signals, for example, a break of a downward trendline.

The bearish version of the Dragonfly Doji is the Gravestone Doji

 

Forum

Libraries: MQL5 Wizard - Candlestick Patterns Class

newdigital, 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

 

Forum

Libraries: MQL5 Wizard - Candlestick Patterns Class

newdigital, 2013.09.16 08:38

Gravestone Doji

The Gravestone Doji is a significant bearish reversal candlestick pattern that mainly occurs at the top of uptrends.


The Gravestone Doji is created when the open, low, and close are the same or about the same price (Where the open, low, and close are exactly the same price is quite rare). The most important part of the Graveston Doji is the long upper shadow.

The long upper shadow is generally interpreted by technicians as meaning that the market is testing to find where supply and potential resistance is located.

The construction of the Gravestone Doji pattern occurs when bulls are able to press prices upward.

However, an area of resistance is found at the high of the day and selling pressure is able to push prices back down to the opening price. Therefore, the bullish advance upward was entirely rejected by the bears.

Gravestone Doji Example

The chart below of Altria (MO) stock illustrates a Gravestone Doji that occured at the top of an uptrend:


In the chart above of Altria (MO) stock, the market began the day testing to find where support would enter the market. Altria eventually found resistance at the high of the day, and subsequently fell back to the opening's price.

The Gravestone Doji is an extremely helpful Candlestick reversal pattern to help traders visually see where resistance and supply is likely located. After an uptrend, the Gravestone Doji can signal to traders that the uptrend could be over and that long positions should probably be exited. But other indicators should be used in conjunction with the Gravestone Doji pattern to determine an actual sell signal. A potential trigger could be a break of the upward trendline support.

The reverse of the Gravestone Doji is the bullish Dragonfly Doji

 

Forum

Libraries: MQL5 Wizard - Candlestick Patterns Class

newdigital, 2013.09.16 18:44

Hammer

The Hammer candlestick formation is a significant bullish reversal candlestick pattern that mainly occurs at the bottom of downtrends.


The Hammer formation is created when the open, high, and close are roughly the same price. Also, there is a long lower shadow, twice the length as the real body.

When the high and the close are the same, a bullish Hammer candlestick is formed and it is considered a stronger formation because the bulls were able to reject the bears completely plus the bulls were able to push price even more past the opening price.

In contrast, when the open and high are the same, this Hammer formation is considered less bullish, but nevertheless bullish. The bulls were able to counteract the bears, but were not able to bring the price back to the price at the open.

The long lower shadow of the Hammer implies that the market tested to find where support and demand was located. When the market found the area of support, the lows of the day, bulls began to push prices higher, near the opening price. Thus, the bearish advance downward was rejected by the bulls.

Hammer Candlestick Chart Example

The chart below of American International Group (AIG) stock illustrates a Hammer reversal pattern after a downtrend:


In the chart above of AIG, the market began the day testing to find where demand would enter the market. AIG's stock price eventually found support at the low of the day. In fact, there was so much support and subsequent buying pressure, that prices were able to close the day even higher than the open, a very bullish sign.

The Hammer is an extremely helpful candlestick pattern to help traders visually see where support and demand is located. After a downtrend, the Hammer can signal to traders that the downtrend could be over and that short positions should probably be covered.

However, other indicators should be used in conjunction with the Hammer candlestick pattern to determine buy signals, for example, waiting a day to see if a rally off of the Hammer formation continues or other chart indications such as a break of a downward trendline. But other previous day's clues could enter into a traders analysis. An example of these clues, in the chart above of AIG, shows three prior day's Doji's (signs of indecision) that suggested that prices could be reversing trend; in that case and for an aggressive buyer, the Hammer formation could be the trigger to go long.

The bearish version of the Hammer is the Hanging Man formation

Another similar candlestick pattern to the Hammer is the Dragonfly Doji


 

Forum

Libraries: MQL5 Wizard - Candlestick Patterns Class

newdigital, 2013.09.17 12:28

Hanging Man

The Hanging Man candlestick formation, as one could predict from the name, is a bearish sign. This pattern occurs mainly at the top of uptrends and is a warning of a potential reversal downward. It is important to emphasize that the Hanging Man pattern is a warning of potential price change, not a signal, in and of itself, to go short.


The Hanging Man formation, just like the Hammer, is created when the open, high, and close are roughly the same price. Also, there is a long lower shadow, which should be at least twice the length of the real body.

When the high and the open are the same, a bearish Hanging Man candlestick is formed and it is considered a stronger bearish sign than when the high and close are the same, forming a bullish Hanging Man (the bullish Hanging Man is still bearish, just less so because the day closed with gains).

After a long uptrend, the formation of a Hanging Man is bearish because prices hesitated by dropping significantly during the day. Granted, buyers came back into the stock, future, or currency and pushed price back near the open, but the fact that prices were able to fall significantly shows that bears are testing the resolve of the bulls. What happens on the next day after the Hanging Man pattern is what gives traders an idea as to whether or not prices will go higher or lower.

Hanging Man Candlestick Chart Example

The chart below of Alcoa (AA) stock illustrates a Hanging Man, and the large red bearish candle after the Hanging Man strengthens the bears thinking that a downward reversal is coming:


In the chart above of Alcoa, the market began the day testing to find where demand would enter the market. Alcoa's stock price eventually found support at the low of the day. The bears' excursion downward was halted and prices ended the day slightly above the close.

Confirmation that the uptrend was in trouble occured when Alcoa gapped down the next day and continued downward creating a large bearish red candle. To some traders, this confirmation candle, plus the fact that the upward trendline support was broken, gave the signal to go short.

It is important to repeat, that the Hanging Man formation is not the sign to go short; other indicators such as a trendline break or confirmation candle should be used to generate sell signals.

The bullish version of the Hanging Man is the Hammer formation

Reason: