Skip to main content
Cart Log in Sign up
Indicator

Pinbar Detector: pin bars marked on your chart

An MT4 and MT5 indicator that marks bullish and bearish pin bars on closed candles and can alert you when a new one forms.

Platform

License

Price

≈

Version

You own this product. Go to My products
Get the demo

  • Automatic, instant delivery once payment confirms
  • Free updates for every future version
  • 12 months of technical support
  • Refunds under a transparent policy
  • Pay with USDT, BTC, ETH and more
  • Free: no payment, download it right now

Risk warning: Trading financial markets carries a risk of losing capital, and past performance does not guarantee future results. Terms & conditions

Product type
Indicator
Platforms
MT4 · MT5
Market / symbol
Gold, FX majors, FX minors
Experience level
Beginner
Delivery
File download from your dashboard
Last update
November 30, 2026
Broker
Any broker

Overview

Pinbar Detector walks through the chart candle by candle and puts a mark next to every pin bar that fits its definition: green below the candle for a bullish pin bar, red above it for a bearish one.

Only closed candles are checked, so a mark that appears on the chart does not move or vanish later, and alerts are sent only for the most recently closed candle.

The pattern definition is not fixed. If the default does not match how you read pin bars, you can set the body ratio, the required protrusion and the rules for the previous candle yourself.

  • Marks bullish and bearish pin bars on any symbol and timeframe
  • Pop-up, email and mobile push alerts
  • Adjustable pattern definition through eleven parameters
  • For price-action traders who do not want to scan several charts by hand

The tool does not open trades and does not give a ready-made signal. A pin bar is one clue, to be read together with levels, trend and your own risk rules.

Source and licence

This tool is the open-source project Pinbar Detector by EarnForex.com, released under the Apache 2.0 licence. The source code is included in the download unchanged, with the licence text next to it. TradeKit provides the description, install guide and support. Original repository: github.com/EarnForex/Pinbar-Detector

Strategy logic

Two candles, one pattern

Each closed candle is treated as the “Nose” and the candle before it as the “Left Eye”. A candle counts as a pin bar only if all of the conditions below hold.

Bearish pin bar with default settings

  • The high exceeds the previous candle’s high by at least half of the candle’s own range.
  • The body is no more than 33% of the range.
  • The body sits in the lower part of the candle, meaning the upper wick takes more than 60% of the range.
  • The previous candle is bullish and its body is at least 10% of its range.
  • The pin bar’s body lies inside the previous candle’s high–low range and is not larger than the previous body.
  • The pin bar’s low sits a set distance above the previous low (by default 20% of the previous range in MT4, 10% in MT5).

A bullish pin bar is checked with the mirror image of these rules.

Custom definition

With UseCustomSettings = true the Custom parameters replace the defaults. One exception: in the current code CustomNoseBodyInsideLeftEyeBody is never read, so changing it has no effect.

Alerts

An alert fires only for the candle that has just closed. The text states the direction, symbol and timeframe.

Specifications

Requirements

  • MetaTrader 4 or MetaTrader 5
  • Works on any symbol and timeframe
  • Email and push alerts need the matching terminal settings to be configured
Platforms
MT4MT5
Delivery
Use case
Swing
Market
Gold، FX majors، FX minors
Experience level
Beginner

Compatible brokers

Which brokers this product works with, and which it works best with.

Works with every broker

No broker restriction: it works with any broker that offers the product's platform.

The broker choice is yours; TradeKit is not a broker. Check account terms before depositing. All brokers

Input parameters

Input parameters
ParameterDefaultDescription
CountBarsHow many bars to scan; 0 scans the whole chart history 0 How many bars to scan; 0 scans the whole chart history
DisplayDistanceDistance between the mark and the candle, in points 5 Distance between the mark and the candle, in points
UseAlertsPop-up and sound alert when a new pin bar closes true Pop-up and sound alert when a new pin bar closes
UseEmailAlertsSend the alert by email (email must be set up in the terminal options) false Send the alert by email (email must be set up in the terminal options)
UseNotificationAlertsSend a push notification to the MetaTrader mobile app false Send a push notification to the MetaTrader mobile app
UseCustomSettingsWhen true, the Custom parameters below replace the built-in definition false When true, the Custom parameters below replace the built-in definition
CustomMaxNoseBodySizeMaximum body-to-range ratio of the pin bar (nose) candle 0.33 Maximum body-to-range ratio of the pin bar (nose) candle
CustomNoseBodyPositionHow close to the end of the candle the body must sit (0.4 = top or bottom 40%) 0.4 How close to the end of the candle the body must sit (0.4 = top or bottom 40%)
CustomNoseProtrudingMinimum protrusion beyond the previous candle, as a share of the pin bar range 0.5 Minimum protrusion beyond the previous candle, as a share of the pin bar range
CustomLeftEyeOppositeDirectionPrevious candle must point against the pattern (bearish before a bullish pin bar) true Previous candle must point against the pattern (bearish before a bullish pin bar)
CustomNoseSameDirectionThe pin bar itself must close in the direction of the pattern false The pin bar itself must close in the direction of the pattern
CustomMinimumNoseLengthMinimum pin bar range in points 1 Minimum pin bar range in points

Install guide

  1. Unzip the download. It contains an MQL4 or MQL5 folder.
  2. In MetaTrader choose File › Open Data Folder.
  3. Copy the folder’s contents into the folder of the same name there.
  4. Restart the terminal, or right-click in Navigator and choose Refresh. MetaTrader compiles the source on its own.
  5. Drag PinbarDetector from Indicators in Navigator onto a chart.
  6. For email or mobile alerts, first fill in Email and Notifications under Tools › Options.

Changelog

  1. v1.03 MT4 New November 30, 2026
    • Published on TradeKit
  2. v1.03 MT5 November 30, 2026
    • Published on TradeKit

Buyer reviews

No reviews yet.

Only verified buyers can review. Reviews are moderated before publishing.

Only verified buyers can review. Reviews are moderated before publishing.

Sign in to write a review

FAQ

Do the marks repaint?
No. The indicator only evaluates closed candles and draws nothing for the candle that is still forming.
Why do MT4 and MT5 show slightly different counts?
One default condition (how far the pin bar’s back end sits from the previous candle’s end) is 0.2 in MT4 and 0.1 in MT5. Turn on UseCustomSettings and enter your own values to make both identical.
Can I trade from this indicator alone?
It only shows the pattern. Entry, stop and whether the pin bar formed at a meaningful place on the chart remain your call.
Which timeframe suits it?
The code has no restriction. On low timeframes you get many marks and most carry little weight; pin bars are usually read on H1 and above.

Related products

More Indicators and tools from the same family

Compare Compare now