C_MornStar_EveStar (Function)
The C_MornStar_EveStarr function identifies occurrences of two Japanese candlestick patterns; Morning Star and Evening Star.
Morning Star is defined a:
-
A three candlestick pattern, the first is a long red candle, followed by a small body candle that gaps lower to form the star, the third is a green candle that closes will into the first candles real body
-
The first candle body needs to be larger than the average body
Evening Star is defined as:
-
A three candlestick pattern, the first is a long green candle, followed by a small body candle that gaps lower to form the star, the third is a red candle that closes will into the first candles real body.
-
The first candle body needs to be larger than the average body
Syntax
C_MornStar_EveStar(Length, oMorningStar, oEveningStar)
Returns (Integer)
Each pattern is represented by an output parameter (oMorningStar or oEveningStar) that returns a positive one (1) when the matching candlestick pattern is found on the current bar or returns a zero (0) if the pattern is not found. The C_MornStar_EveStar function itself returns a value of 1.
Parameters
| Name | Type | Description |
| Length | Numeric | Length used to calculate the average body. |
| oMorningStar | Numeric | Output variable returns a 1 if the Morning Star candlestick pattern exists on the current bar, or 0 if the pattern does not exist. |
| oEveningStar | Numeric | Output variable returns a 1 if the Evening Star candlestick pattern exists on the current bar, or 0 if the pattern does not exist. |
Example
Plots a ShowMe on the High of the current bar when a Morning Star candlestick pattern is found on the current bar based on a Length of 14:
Value1 = C_MornStar_EveStar(14, oMorningStar, oEveningStar)
if oMorningStar = 1 then
Plot1(Low, "MorningStar");