C_Doji (Function)
The C_Doji function identifies the occurrence of a Doji Japanese candlestick pattern.
Doji is defined as:
-
The body of the candle is very small; the close is equal or almost equal to the open by some percent of the range of the bar. Seen as a cross on the chart.
Syntax
C_Doji(Percent)
Returns (Integer)
The function 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.
Parameters
Name | Type | Description |
Percent | Numeric | Doji threshold for the (open - close) as a percent of the range of the bar. |
Example
Plots a ShowMe on the Close of the current bar when a Doji candlestick pattern is found on the current bar based on a Percent of 5:
if C_Doji(5) = 1 then
Plot1(Close, "Doji");