Engulfing Marker
Engulfing is a BODY test: this bar's open and close must fully cover the previous bar's open and close, and the two bars must be opposite colours. Wicks are ignored entirely, which is the standard textbook definition but also the reason engulfing and "outside bar" (a range test - see Outside Bar Marker elsewhere in this catalogue) are different signals that will disagree on some bars. InpMinBodyRatio exists because a body that merely edges out the previous one by a fraction of a point technically satisfies the textbook definition but rarely trades like a real engulfing bar. Raising it above 1.0 demands the new body be meaningfully larger, not just marginally larger, before the signal fires. Notes and limitations - Confirmation happens on the bar's close - the forming bar's body is not final, so it is never evaluated and this does not repaint. - A previous bar with a zero-size body (a doji) cannot be engulfed under this definition, since the ratio test divides by that body's size; such bars are skipped rather than treated as an automatic match. - No trend or location filter is applied - this marks the candle shape only, at any point on the chart. - Candle Patterns, elsewhere in this catalogue, includes its own engulfing test as part of a broader scanner with a fixed InpMinBodyRatio of effectively 1.0 (any strictly larger body) - this standalone version exists for traders who want the adjustable threshold and no other pattern noise on the chart.
Indicator · MT4 · v1.0 · Free
About Engulfing Marker
Engulfing Marker is an indicator for MetaTrader 4. It draws buy and sell arrows on the chart, can alert you with a pop-up, sound, email or push message and marks candlestick patterns. It has 2 settings, such as Min body ratio and Alerts. MQL source code included.
Files in the download: EngulfingMarker.ex4, EngulfingMarker.mq4, EngulfingMarker.txt.
Settings
| Setting | Default | What it does |
|---|---|---|
| Min body ratio | 1.0 | Signal body must be at least this many times the prior body |
| Alerts | true | Alert once per closed bar on a new engulfing candle |
How to install
- Download the ZIP from your PolyMaria library and unzip it.
- In MetaTrader 4 open File → Open Data Folder, then go to MQL4 → Indicators.
- Copy the .mq4 file(s) there. Put any .mqh files in MQL4 → Include.
- Open the .mq4 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
- Drag the indicator from the Navigator onto a chart and adjust the settings.
Tags: Candlestick Patterns · Buy/Sell Arrows · Alerts · MT4 Indicator · MQL4 Source Code