- 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
- 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.
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
| Parameter | Default | Description |
|---|---|---|
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
- Unzip the download. It contains an
MQL4orMQL5folder. - In MetaTrader choose File › Open Data Folder.
- Copy the folder’s contents into the folder of the same name there.
- Restart the terminal, or right-click in Navigator and choose Refresh. MetaTrader compiles the source on its own.
- Drag PinbarDetector from Indicators in Navigator onto a chart.
- For email or mobile alerts, first fill in Email and Notifications under Tools › Options.
Changelog
-
v1.03 MT4 New November 30, 2026
- Published on TradeKit
-
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 reviewFAQ
Do the marks repaint?
Why do MT4 and MT5 show slightly different counts?
Can I trade from this indicator alone?
Which timeframe suits it?
Related products
More Indicators and tools from the same family
Risk warning