CandlestickFinderMaster
- インディケータ
- バージョン: 1.1
## What it does
BCPF is an MT4 on-chart indicator that scans price history for **18 active
candlestick patterns** and labels detected formations directly on the chart.
A compact checklist panel lets you enable or disable each bullish and bearish
pattern independently.
The 18 available patterns are:
- **Bullish:** Hammer, Inverse Hammer, Bullish Engulfing, Morning Star,
3 White Soldiers, Dragonfly Doji, Bullish Marubozu, Bullish Harami,
Piercing Line.
- **Bearish:** Hanging Man, Shooting Star, Bearish Engulfing, Evening Star,
3 Black Crows, Gravestone Doji, Bearish Marubozu, Bearish Harami,
Dark Cloud Cover.
A separate trend panel shows the current readings of the three trend methods
used by the indicator — MA alignment, ADX directional bias and adaptive
moving-average slope — together with their combined majority vote.
## A practical note on pattern selection
Although BCPF provides all 18 formations, there is no requirement to use all
of them at the same time. The checklist is there precisely because the useful
subset can vary with the instrument, timeframe and trading style.
As a purely informal example, after observing **several dozen XAUUSD
sessions**, the following eight patterns appeared particularly useful to the
author:
- Inverse Hammer
- Morning Star
- Dragonfly Doji
- Bullish Marubozu
- Hanging Man
- Shooting Star
- Evening Star
- Gravestone Doji
This is **not a trading recommendation, a preset claimed to be optimal, or a
universal rule**. It is only a loose practical observation from a limited
sample of sessions. Other instruments, timeframes and market regimes can
naturally favour a different selection.
## How it works
- **Mixed pattern geometry.** BCPF does not use one universal candle formula.
Depending on the formation, detection uses a combination of ATR-relative
body/wick thresholds, ratios relative to the candle's own High–Low range,
and direct OHLC relationships between neighbouring candles. This allows the
rules to scale across different symbols and timeframes without relying on
fixed pip-sized candle definitions.
- **ATR-relative body classification.** `ATRPeriod` provides the volatility
reference for small, large, star and doji body classifications, as well as
the Marubozu and Doji wick tests.
- **Range-relative wick patterns.** Hammer, Inverse Hammer, Hanging Man and
Shooting Star use wick and body proportions relative to the candle's own
total range. The relevant thresholds are `WickMinRatio`,
`WickMaxBodyRatio` and `WickMaxOppositeRatio`.
- **Trend-context filter.** With `UseTrendFilter = true`, reversal formations
are checked against the price action that occurred **before** the pattern.
BCPF uses two different context mechanisms depending on the type of
formation.
- **Local context for single-candle reversals.** Hammer, Inverse Hammer,
Hanging Man, Shooting Star, Dragonfly Doji and Gravestone Doji use a short
local directional move measured over `SwingBars`. The net close-to-close
movement must exceed `SwingATRFactor × ATR` to be classified as a clear
local upswing or downswing.
Hammer/Hanging Man and Inverse Hammer/Shooting Star share the same basic
candle geometry, so the local move is also used to decide which member of
each pair is more appropriate. When the local move is ambiguous, candle
direction is used as a tie-breaker.
- **Broader context for multi-candle reversals.** Engulfing, Morning/Evening
Star, 3 White Soldiers/Black Crows, Harami, Piercing Line and Dark Cloud
Cover use the selected trend method across the bars immediately preceding
the complete pattern.
`TrendMethod` can be:
- `0` — three-MA alignment,
- `1` — ADX directional bias,
- `2` — adaptive MA / KAMA slope,
- `3` — majority vote requiring agreement from at least two of the three.
The prior-context scan uses `PriorTrendBars`. A clear opposite prior trend
rejects the formation. If the context is flat or ambiguous, the indicator
deliberately remains permissive and allows the candle pattern itself to be
shown.
- **Three-MA trend method.** Bullish trend requires Fast MA > Mid MA > Slow
MA; bearish trend requires the reverse ordering.
- **ADX trend method.** Direction is taken from +DI versus -DI only when ADX
reaches `ADX_Threshold`. Below that threshold the ADX method returns a flat
reading.
- **Adaptive MA method.** BCPF computes a native Kaufman-style adaptive moving
average and evaluates its slope over `AMA_Slope` bars. A small ATR-based
noise filter prevents tiny fluctuations from being classified as trend.
- **Trend panel.** If `ShowTrendPanel` is enabled, four live readings are
displayed: `MA3`, `ADX`, `AMA` and `VOTE`, each shown as `UP`, `DOWN` or
`FLAT`. The panel also identifies which method is currently selected for
the multi-candle trend filter.
- **Interactive checklist.** Each of the 9 bullish and 9 bearish formations
can be toggled independently from the on-chart panel. Pattern choices are
stored in MT4 terminal global variables and restored between sessions.
- **Stable chart labels.** Detected formations are labeled on their candle
using the candle timestamp as part of the object identity, so labels remain
attached to the correct candle as bar indexes shift with new data.
- **Confirmed or live detection.** With `ShowOnlyConfirmed = true`, BCPF scans
only closed candles. If a valid formation is present, it is identified and
labeled as soon as the indicator processes the newly closed candle — in
normal MT4 operation, on the first tick/calculation of the new bar. There is
therefore no additional confirmation delay beyond the candle close itself.
When `ShowOnlyConfirmed` is disabled, the current forming candle is evaluated
as well; such a provisional pattern can therefore appear before close and
disappear again if the candle's shape changes.
- **Alerts and push notifications.** `ShowAlerts` and `SendPushNotif` can
announce a pattern on the currently monitored candle. Each pattern is
de-duplicated by candle timestamp so the same formation is not repeatedly
announced on every tick.
## What you can configure
| Group | Parameters |
|---|---|
| Shape thresholds | `ATRPeriod`, `SmallBodyFactor`, `LargeBodyFactor`, `StarBodyFactor`, `DojiBodyFactor`, `MarubozuWickFactor`, `WickMinRatio`, `WickMaxBodyRatio`, `WickMaxOppositeRatio`, `SoldierCrowWickFactor` |
| Detection behaviour | `ShowOnlyConfirmed`, `MaxBarsBack` |
| Notifications | `ShowAlerts`, `SendPushNotif` |
| Visuals | `BullishColor`, `BearishColor`, `LabelFontSize`, `LabelOffsetPips`, `PanelX`, `PanelY` |
| Trend filter | `UseTrendFilter`, `ShowTrendPanel`, `TrendMethod`, `PriorTrendBars`, `SwingBars`, `SwingATRFactor` |
| Moving averages | `MA_Fast`, `MA_Mid`, `MA_Slow`, `MA_Type`, `MA_Price` |
| ADX | `ADX_Period`, `ADX_Threshold` |
| Adaptive MA (KAMA) | `AMA_Period`, `AMA_FastEMA`, `AMA_SlowEMA`, `AMA_Slope` |
## Default settings
- `ATRPeriod = 14`
- Body factors:
- `SmallBodyFactor = 0.30`
- `LargeBodyFactor = 0.70`
- `StarBodyFactor = 0.30`
- `DojiBodyFactor = 0.10`
- `MarubozuWickFactor = 0.10`
- Wick/range thresholds:
- `WickMinRatio = 0.55`
- `WickMaxBodyRatio = 0.30`
- `WickMaxOppositeRatio = 0.15`
- `SoldierCrowWickFactor = 0.30`
- `ShowOnlyConfirmed = true`
- `ShowAlerts = false`
- `SendPushNotif = false`
- Bullish color: **Lime**
- Bearish color: **Red**
- `LabelFontSize = 8`
- `LabelOffsetPips = 5`
- `MaxBarsBack = 500`
- Panel position: `X = 10`, `Y = 20`
- `UseTrendFilter = true`
- `ShowTrendPanel = true`
- `TrendMethod = 3` — majority vote (2 of 3)
- `PriorTrendBars = 30`
- `SwingBars = 8`
- `SwingATRFactor = 0.5`
- Moving averages:
- Fast = **20**
- Mid = **50**
- Slow = **200**
- type = **EMA**
- applied price = **Close**
- ADX:
- period = **14**
- threshold = **20.0**
- Adaptive MA / KAMA:
- efficiency-ratio period = **10**
- fast EMA = **2**
- slow EMA = **30**
- slope lookback = **3**
## Interpretation
BCPF is a **pattern-identification and context tool**, not a standalone trading
system.
A candlestick formation is a description of recent price geometry, not a
guarantee of what price will do next. The optional context filters are intended
to reduce obvious mismatches between a reversal pattern and the price action
that preceded it, but they do not turn a candlestick pattern into a certainty.
The checklist is therefore intentionally flexible: the user can decide which
formations are useful for a particular market and ignore the rest.
