C_3WhSolds_3BlkCrows (Function)
The C_3WhSolds_3BlkCrows function identifies occurrences of two Japanese candlestick patterns; Three Advancing White Soldiers and Three Black Crows.
Three Advancing White Soldiers is defined as:
-
Three advancing consecutive green candles
-
The three lines should close at, or near, their highs.
-
Opening of the second and third candle should be inside the body of the previous candle.
Three Black Crows is defined as:
-
Three declining consecutive red candles
-
The three lines should close at, or near, their lows.
-
Opening of the second and third candle should be inside the body of the previous candle.
Syntax
C_3WhSolds_3BlkCrows(Length, Percent, o3WhiteSoldiers, o3BlackCrows)
Returns (Integer)
Each pattern is represented by an output parameter (o3WhiteSoldiers or o3BlackCrows) 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_3WhSolds_3BlkCrows function itself returns a value of 1.
Parameters
Name | Type | Description |
Length | Numeric | Length used to calculate the average body. |
Percent | Numeric | Threshold proximity percent of the close to the high or low. |
o3WhiteSoldiers | Numeric | Output variable returns a 1 if the Three Advancing White Soldiers candlestick pattern exists on the current bar, or 0 if the pattern does not exist. |
o3BlackCrows | Numeric | Output variable returns a 1 if the Three Black Crows 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 Three Advancing White Soldiers candlestick pattern is found on the current bar based on a Length of 14 and a Percent of 5:
Value1 = C_3WhSolds_3BlkCrows(14, 5, o3WhiteSoldiers, o3BlackCrows)
if o3WhiteSoldiers = 1 then
Plot1(Low, "3WhiteSoldiers");