Loading…

Pin Bar Marker

Most pin bar scripts check one ratio: is the long wick at least N times the body? That alone lets through ordinary trend bars that happen to have a small body relative to a long wick but no real rejection character. This indicator adds two more checks that a genuine pin bar also has to pass: the body has to be small relative to the WHOLE range, not just relative to the wick, and the OPPOSITE wick has to stay short too. A bar that fails either of those is not a rejection candle no matter how long its dominant wick is. The three thresholds are independent inputs so you can tune them separately for what a "clean" pin bar looks like on your instrument and timeframe rather than fighting one combined ratio that cannot represent all three ideas at once. Notes and limitations - Confirmation happens on the bar's close - nothing is plotted on the forming bar, so this indicator does not repaint. - A zero-body bar (a doji-shaped pin bar) is allowed through as long as the dominant wick itself is a material size; the body-multiplier test is skipped only in that specific zero case to avoid a divide-by-zero, not relaxed generally. - No trend or location filter is applied - this marks the candle shape only. Whether the level it appears at is meaningful (support, resistance, a moving average) is left to the trader reading the chart.

Indicator · MT5 · v1.0 · Free

About Pin Bar Marker

Pin Bar Marker is an indicator for MetaTrader 5. 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 4 settings, such as Wick multiplier, Max body ratio and Max opp wick ratio. MQL source code included.

Files in the download: PinBarMarker.ex5, PinBarMarker.mq5, PinBarMarker.txt.

Settings

SettingDefaultWhat it does
Wick multiplier2.5Dominant wick must be at least this many times the body
Max body ratio0.35Body as a fraction of the full range, maximum
Max opp wick ratio0.25Opposite wick as a fraction of the full range, maximum
AlertstrueAlert once per closed bar on a new pin bar

How to install

  1. Download the ZIP from your PolyMaria library and unzip it.
  2. In MetaTrader 5 open File → Open Data Folder, then go to MQL5 → Indicators.
  3. Copy the .mq5 file(s) there. Put any .mqh files in MQL5 → Include.
  4. Open the .mq5 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
  5. Drag the indicator from the Navigator onto a chart and adjust the settings.

Download the PDF guide

Tags: Candlestick Patterns · Trend · Buy/Sell Arrows · Alerts · MT5 Indicator · MQL5 Source Code

MetaTrader 4 & 5 indicators · PolyMaria