What it does
FXP Candlestick Patterns scans closed candles for seven classic patterns and marks them on the chart. Bullish patterns get a blue arrow below the candle, bearish patterns a red arrow above it, and neutral patterns (doji and inside bar) a small gold dot. Short names such as "Engulf", "Pin", "Star", "MStar", "EStar", "Doji" and "Inside" can be printed next to the marks.
Each pattern has its own on/off switch, so you can keep only the ones you actually trade.
How it works
Definitions (body = distance between open and close, range = high minus low):
- Bullish engulfing: previous candle bearish, current candle bullish, current open at or below previous close, current close at or above previous open, and a larger body. Bearish engulfing is the mirror.
- Bullish pin bar: lower wick at least N times the body (default 2), lower wick at least 60% of the range and upper wick at most 25% of the range.
- Shooting star: the same test using the upper wick.
- Morning star: a large bearish candle (body at least 60% of the 10-bar average range), then a small candle (body at most 30% of the first), then a bullish candle closing above the midpoint of the first body. Evening star is the mirror.
- Doji: body at most 10% of the range.
- Inside bar: high below the previous high and low above the previous low.
The prior-move filter requires the close before a bullish reversal pattern to be lower than the close N bars earlier, and the reverse for bearish patterns. The forming candle is never marked, and only new bars are calculated.
How to use it
Copy the .ex5 file into MQL5/Indicators and attach it to a chart.
Patterns matter most at locations that already matter: a bullish pin bar at support, or a bearish engulfing at a prior high after an extended rise. On their own, in the middle of a range, most patterns are noise. Our lesson on candlestick patterns covers how to read them in context.
H1, H4 and D1 candles carry more information than M1 or M5 candles, which are dominated by short-term noise. If you see too many marks, raise the wick ratio, lower the doji percentage, or disable the neutral patterns.
Settings
| Input | Default | What it changes |
|---|---|---|
| Pattern toggles | all on | Engulfing, pin bar, shooting star, doji, stars, inside bar. |
| Pin/star: long wick at least N x body | 2.0 | Stricter values find cleaner pins. |
| Doji: body at most % of range | 10.0 | Smaller values find fewer, cleaner dojis. |
| Prior-move filter bars | 5 | 0 disables the trend context check. |
| History bars to analyse | 2000 | Look-back for marks. |
| Show pattern names | true | Text labels next to marks. |
| Name color / font size | silver / 7 | Label styling. |
| Alert on new pattern | false | One alert per closed candle. |
| Also send push notification | false | Sends alerts to the mobile app. |
Limitations
- Pattern rules are simplified, mechanical versions of patterns that discretionary traders judge by eye. Some textbook examples will be missed and some marginal ones included.
- Candle shapes depend on your broker's server time; a daily candle at a GMT+2 broker differs from one at a GMT+0 broker.
- A pattern is confirmed only when the candle closes, so marks appear one bar after the move started.
- No pattern predicts direction reliably. Use a stop-loss and size every trade with care. Trading involves substantial risk of loss.

