C_PierceLine_DkCloud (Function)
The C_PierceLine_DkCloud function identifies occurrences of two Japanese candlestick patterns; Piercing Line and Dark Cloud.
Piercing Line is defined as:
-
A big green candle which opens below the low of the previous red candle and closes above half the previous bars real body
-
The price trend is declining
Dark Cloud is defined as:
-
A big red candle which opens above the high of the previous green candle and closes below half the previous bars real body
-
The price trend is advancing
Syntax
C_PierceLine_DkCloud(Length, oPiercingLine, oDarkCloud)
Returns (Integer)
Each pattern is represented by an output parameter (oPiercingLine or oDarkCloud) 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_PierceLine_DkCloud function itself returns a value of 1.
Parameters
Name |
Type |
Description |
Length |
Numeric |
Length used to calculate the average body. |
oPiercingLine |
Numeric |
Output variable returns a 1 if the Piercing Line candlestick pattern exists on the current bar, or 0 if the pattern does not exist. |
oDarkCloud |
Numeric |
Output variable returns a 1 if the Dark Cloud candlestick pattern exists on the current bar, or 0 if the pattern does not exist. |
Example
Plots a ShowMe on the Low of the current bar when a Dark Cloud candlestick pattern is found on the current bar based on a Length of 14:
Value1 = C_PierceLine_DkCloud(14, oPiercingLine, oDarkCloud)
if oDarkCloud = 1 then
Plot1(Low, "DarkCloud");