Outside Bar Marker
An outside bar is a RANGE test: high[i] above the previous bar's high and low[i] below the previous bar's low. That is a deliberately different question from a candlestick "engulfing" pattern, which only compares open/close bodies and ignores wicks entirely. A bar can engulf the previous body while one of its wicks still sits inside the previous bar's range - that counts as an engulfing candle but not as an outside bar. The reverse also happens: a bar can exceed the previous high and low on both wicks while its body stays small and does not engulf the previous body at all. Engulfing Marker, elsewhere in this catalogue, covers the body-based version. The two indicators are meant to be used side by side when the distinction matters, and they will disagree on some bars by design - that disagreement is exactly the information a price-action trader is usually looking for. Notes and limitations - Confirmation happens on the bar's close - the forming bar's range can still expand further, so it is never evaluated and this does not repaint. - Direction (bullish/bearish) is read purely from close versus open on the outside bar itself; it says nothing about where the outside bar sits relative to a trend, support or resistance. - No range-size filter is applied - a marginal outside bar (exceeding the previous range by a single point on each side) counts the same as a dramatic expansion. Combine with an ATR-based filter if only large expansions matter for your use case.
Indicator · MT5 · v1.0 · Free
About Outside Bar Marker
Outside Bar Marker is an indicator for MetaTrader 5. It draws buy and sell arrows on the chart and can alert you with a pop-up, sound, email or push message. It has 1 setting, such as Alerts. MQL source code included.
Files in the download: OutsideBarMarker.ex5, OutsideBarMarker.mq5, OutsideBarMarker.txt.
Settings
| Setting | Default | What it does |
|---|---|---|
| Alerts | true | Alert once per closed bar on a new outside bar |
How to install
- Download the ZIP from your PolyMaria library and unzip it.
- In MetaTrader 5 open File → Open Data Folder, then go to MQL5 → Indicators.
- Copy the .mq5 file(s) there. Put any .mqh files in MQL5 → Include.
- Open the .mq5 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 · MT5 Indicator · MQL5 Source Code