Categories

Pin Bar Indicator MT4
Most pin bar scripts you'll find online run on default settings you can never actually see. This one has none to hide — every threshold that defines a valid pin bar is fixed directly in the source code, and every signal it plots is checked against a closed candle before it ever appears. Download the…
Download the Pin Bar Indicator MT4Most pin bar scripts you’ll find online run on default settings you can never actually see. This one has none to hide — every threshold that defines a valid pin bar is fixed directly in the source code, and every signal it plots is checked against a closed candle before it ever appears. Download the Pin Bar Indicator for MT4 free below and see precisely how a “pin bar” is defined here.
What Is the Pin Bar Indicator?
This is a chart-overlay indicator that scans your price history for pin bar reversal candles and marks them with an arrow. A bullish pin bar gets a blue up arrow plotted just below the bar’s low; a bearish pin bar gets a red down arrow plotted just above the bar’s high. It runs its scan once per new bar, never on the still-forming current candle, so a signal you see has already been confirmed on closed price data.
The pattern logic is specific. A bullish pin bar requires: the candle’s open and close both sitting in the upper 40% of its own high-low range; the candle’s total range being at least half the average range of the last four candles; the candle’s low extending at least 25% of its own range below the prior candle’s low (the “nose” or wick that defines a pin bar); and the candle’s low being lower than the low of the three candles before it. The bearish setup mirrors this on the upside — open/close in the lower 40% of the range, a nose extending above the prior candle’s high, and a high that beats the three candles before it.
The “average range” used as the minimum-size filter isn’t a simple lookback — it’s built from the last four candles, skipping any that fall on a Sunday, so the size filter isn’t skewed by the typically thin weekend-adjacent candle on higher timeframes.
Key Features
- Confirms bullish and bearish pin bars only on fully closed candles — the indicator explicitly skips recalculating until a new bar opens.
- Plots directional arrows directly on the price chart at the pin bar’s wick extreme.
- Fires an on-chart Alert() popup and plays alert2.wav automatically the moment a new pin bar is confirmed — this is hardcoded on in the current build, with no input to disable it.
- Uses a rolling four-candle average range (skipping Sunday bars in the calculation) as its minimum-size filter, so it won’t flag tiny, insignificant candles as pin bars.
- Requires the pin bar’s wick to break beyond the extremes of the three candles before it, filtering out pin-shaped candles that aren’t actually standing out from recent price action.
- No extern/input parameters are exposed — every threshold (the 40% body-position zone, the 25% nose requirement, the 3-bar dominance check) is fixed in the code rather than user-adjustable.
How to Use It
Drop the .mq4 file into your MQL4/Indicators folder, restart or refresh MT4’s Navigator, and drag it onto a chart — it attaches directly to the price window, no separate settings dialog to configure since there are no adjustable inputs.
When a blue arrow prints below a candle, that candle closed as a confirmed bullish pin bar; a red arrow above a candle marks a confirmed bearish pin bar. Because the scan only runs once a new bar has opened and always evaluates the candle that just closed, you won’t see arrows appear and then vanish — what you see is what was detected on finished price action. Many traders treat the pin bar’s nose (the long wick) as a natural stop-loss reference and look for confluence with a nearby support/resistance level or moving average before treating the signal as a trade setup.
Since the alert is hardcoded on, expect a popup and sound the instant a qualifying candle closes on any chart you have this indicator attached to — if you run it on several charts at once, be ready for multiple alerts firing independently as each symbol’s candles close.
Best Timeframes / Best Use Cases
The pattern logic is purely geometric — open, close, high, low, and the recent average range — so it works on any timeframe MT4 supports. It tends to produce cleaner, less noisy signals on H1 and above, since pin bars on very low timeframes (M1–M5) are more prone to being random noise rather than genuine rejection candles. It’s built for reversal and price-action traders who want a confirmed, closed-candle signal rather than a predictive one, and works equally well as a standalone scanner or as a confirmation layer alongside support/resistance or trend analysis.
Final Thoughts
This is a no-frills, closed-candle pin bar detector with fixed, transparent thresholds and an always-on alert. There’s nothing to configure and nothing hidden — the logic that decides what counts as a pin bar is right there in the code, and it never touches the live, still-forming bar to make that decision. Download it free below and add it to your price-action toolkit.
This indicator has no user-configurable input parameters verified in its source — it runs with fixed internal logic. Chart display properties (colors, line styles) can still be changed via MetaTrader’s indicator properties window.
FAQs About the MT4 Pin Bar Indicator MT4
Does this pin bar indicator repaint?
No. It only recalculates once per new bar and always tests the previous, fully closed candle against older closed candles — it never uses the live, still-forming candle to decide whether a pin bar occurred.
Can I turn off the sound alert?
Not through an input. The alert flag is hardcoded true inside the indicator’s code, so every confirmed pin bar triggers an on-chart Alert() popup and plays alert2.wav — there is no setting to disable it.
Are there any adjustable settings?
No. The indicator has no extern or input parameters. Every threshold — the 40% open/close position zone, the minimum range requirement, the 25% nose extension, and the 3-bar dominance check — is fixed directly in the code.
What exactly counts as a pin bar in this indicator?
A candle whose open and close sit in the outer 40% of its range (opposite the wick), whose total range is at least half the recent 4-candle average, and whose wick extends at least 25% of its own range beyond the prior candle’s high or low while also breaking the extreme of the 3 candles before it.
Does it work on all symbols and timeframes?
Yes. The pattern logic is based purely on relative candle geometry (open, close, high, low, and recent average range), so it isn’t tied to a specific symbol or timeframe.
Where are the arrows plotted?
Directly on the price chart — a blue arrow below the low of a confirmed bullish pin bar, and a red arrow above the high of a confirmed bearish pin bar.
