Best Candle Patterns Indicator: Engulfing and Pin Bars

Written by Dominic Walsh · Published · Last updated

The best candle patterns indicator watches two candlestick shapes and marks each one. It looks for engulfing bars and pin bars on the chart you attach it to. Only arrows print, so the price action behind them stays visible.

This build ships as a compiled .ex4 for MT4 and .ex5 for MT5; the screenshots below come from EURUSD H1.

Platforms MT4 (.ex4) + MT5 (.ex5)
Chart window Main price chart
Plots 2: Buy, Sell
Alerts popup, push notification, email, sound
Inputs 7

Everything visible

Buy and Sell hold the only two plots. Buy places a lime arrow under the low of a bullish bar. Sell places a red arrow above the high of a bearish one.

ArrowOffsetPoints controls the gap and defaults to 30 points. That keeps both markers off the wick on a normal forex chart. Width 3 makes them readable when you zoom out.

No text label names the shape that fired. You read the candle itself to see whether an engulfing bar or a pin bar triggered the mark.

  • Buy: arrow, lime, width 3, arrow code 233
  • Sell: arrow, red, width 3, arrow code 234
The best candle patterns indicator marking an engulfing bar with a lime Buy arrow on EURUSD H1.
The best candle patterns indicator marking an engulfing bar with a lime Buy arrow on EURUSD H1.

What happens on each bar

The engulfing test

The check compares the current bar with the one before it. A bullish case needs an up bar after a down bar. Its close has to finish above the earlier open, and its open has to sit below the earlier close. The current body also has to exceed the previous body. A bearish engulfing pattern runs the same test with the colours swapped.

Pin bar rules

A pin reading weighs wick length against body size. Its lower wick has to run more than twice the body. Price then has to close in the upper 40 percent of the bar range. An upper wick and a low close give the bearish version. Either test on its own draws the marker.

Placing the marker

Bars with zero range drop out before any test runs. A qualifying bullish bar sends its low minus the offset into Buy. A qualifying bearish bar sends its high plus the offset into Sell. Both shapes can appear on one candle, in which case both markers print.

Turning output into a view

Location beats shape. An engulfing bar in the middle of a range tells you little. The same bar at a prior swing low carries far more weight.

A lime Buy marks the close of the trigger candle. The earliest entry therefore sits at the open of the next one. Many traders place the stop beyond the pin wick and measure the target from there.

Clusters matter more than singles. Two or three marks in one zone across a session usually point at a level the market keeps respecting.

Alert channels in this build: popup, push notification, email and sound, one message per closed bar.

EnableAlerts arrives switched on and so does EnablePopup. EnablePushNotify, EnableEmail and EnableSound all start off. SoundFile names alert.wav for anyone who turns the sound channel on, and the code sends at most one message per closed bar.

Every Best Candle Patterns Indicator input

Display settings

Setting What it does Default
ArrowOffsetPoints Distance in points between the candle and its marker; 30 fits forex, and gold wants a larger figure. 30

Alert settings

Setting What it does Default
EnableAlerts (see inputs panel) on
EnablePopup (see inputs panel) on
EnablePushNotify (see inputs panel) off
EnableEmail (see inputs panel) off
EnableSound (see inputs panel) off
SoundFile (see inputs panel) alert.wav
best candle patterns indicator: Inputs panel with ArrowOffsetPoints above the EnableAlerts and SoundFile switches.
Inputs panel with ArrowOffsetPoints above the EnableAlerts and SoundFile switches.

Matching chart to settings

Candle shapes need honest candles. The EURUSD H1 chart in the screenshot carries enough range per bar for a body-versus-wick test to mean something. On M1 the spread eats most bodies, so pin readings turn random. H4 and daily charts give the cleanest marks, though far fewer of them.

When it is unreliable

Two shapes cover a small slice of price action. Long trends can run for days without a single engulfing bar, and the tool stays silent through all of it.

The rules carry no trend filter. A bullish engulfing inside a strong downtrend prints exactly like one at a major low. The marker alone cannot tell you which you are looking at.

Wick tests depend on your broker feed. Symbols with wide spreads or synthetic ticks stretch wicks, and the pin rule then fires on bars that another feed would not call a pin.

Copy the compiled Best Candle Patterns Indicator file into your MQL4/Indicators folder, and the MT5 build into MQL5/Indicators, then restart the terminal and drag it onto a chart. The step-by-step guide with screenshots is at how to install MT4 and MT5 indicators.

Download the Best Candle Patterns Indicator for MT4 and MT5

The zip holds the compiled Best Candle Patterns Indicator build for MT4 and MT5, plus a short README. Compiled files only, no source. Enter your email below and the download link arrives in your inbox.

Download this indicator free

Enter your email and the file is yours. You also get the full MT4 and MT5 library.

  • 1,380+ indicators
  • MT4 and MT5 files
  • No spam, unsubscribe any time

FAQ

Which candlestick shapes does the tool actually mark?

Two families. Engulfing bars, where the current body swallows the previous one and runs the other way, and pin bars, where one wick stretches past twice the body with the close near the far end. Everything else on the chart, including dojis and inside bars, passes without a mark.

How does ArrowOffsetPoints affect marker placement?

It shifts each marker away from the candle by a fixed number of points. The shipped value sits comfortably on a five-digit forex chart. On gold, indices or any symbol with a larger point value, raise it so the marker does not overlap the wick it refers to.

Why did an obvious hammer print no Buy arrow?

The wick rule is strict. A lower wick has to exceed twice the body, and the close has to land in the top 40 percent of the bar range. A hammer with a chunky body or a mid-range close misses both halves of that test, so the bar passes without a mark.

Does EURUSD H1 give enough marks to be useful?

It gives a handful each week rather than a stream. Engulfing bars and pins both need a decisive close, and H1 majors produce those a few times per session at best. Drop to M15 for more marks and weaker bodies, or move up to H4 for fewer and firmer ones.

Are results guaranteed?

No. Trading involves risk. Results are not guaranteed; past performance is not indicative of future results. Use the Best Candle Patterns Indicator as one input. Always backtest before trading live.

Category: this is part of our Candle Sticks collection. Then, still, plainly, browse more Candle Sticks for MetaTrader, or explore every MT4 indicator and MT5 indicator on the site.

External references

Dominic Walsh - Forex trader and MT4/MT5 developer

About the author

Written by Dominic Walsh, a Forex trader and MT4/MT5 indicator, Expert Advisor and script developer. Every tool on forexmt4systems.com is tested on live charts before release and ships with ready-to-use compiled MT4 (.ex4) and MT5 (.ex5) files. Learn more about the trader and developer behind this site.

How we build, test and correct every tool: Editorial & Testing Policy. Trading carries risk; see the disclaimer.

Leave a Comment