Pin Bar Rejection Scanner
- Индикаторы
- Версия: 1.0
- Активации: 5
# Pin Bar Rejection Scanner - Rejection where it matters
*Category: Pattern Recognition | Difficulty: intermediate | Window: chart window (overlaid on price) | Markets: Universal (Forex, indices, commodities, crypto, stocks) | Suggested timeframes: M15, M30, H1, H4, D1*
## Short description
> Recognises bars with a dominant wick but flags them only when they are significant in absolute terms and occur at a recent extreme.
## Full description
### Overview
A bar with a very long wick tells that price pushed in one direction and was rejected before the bar ended. It is an effective pattern, but only under two conditions the classic definition does not require. The first is that the bar be significant in absolute terms: a tiny bar with a long wick rejected nothing, it simply moved little, and the proportions of a small bar carry no information. The second is that the rejection happen at a relevant point: a long wick in the middle of a range is noise, the same wick at a recent extreme is information, because it means price explored new territory and was immediately rejected. This indicator checks both conditions and flags only rejections meeting them.
### How the calculation works
1. First condition: the bar range must exceed InpMinRangeAtr times the ATR, excluding insignificant bars.
2. Second condition: one wick must reach InpMinWickShare of the range and the opposite one stay below InpMaxOppWick.
3. The opposite wick limit is automatically corrected if inconsistent with that of the dominant wick.
4. Third condition: the bar low must have exceeded the low of the previous InpExtremeBars bars, for a bullish rejection.
5. This third condition is what separates a meaningful rejection from a merely volatile bar in the middle of the range.
6. The dominant wick share stays readable in the data window even when no arrow appears.
### How to use it
- The extreme of the rejection bar is the natural stop reference: the point at which the rejection would be disproven.
- Wait for confirmation from the next bar: a valid rejection is followed by a move opposite to the wick.
- A rejection that also occurs at a known level is worth far more than an isolated one: the two readings reinforce each other.
- Raise InpMinWickShare to select only the clearest rejections, sharply reducing the number of signals.
- Lower InpExtremeBars on low timeframes, where extremes form and are exceeded more quickly.
### Who it is for and on which timeframes
It targets price action traders who have noticed long wicked bars work in some places and not others. It works from M15 to D1. The three conditions correspond to what an experienced trader assesses implicitly before trading a rejection, and making them explicit serves both to filter signals and to clarify one own method. It also suits less experienced traders, because the filter prevents trading rejections without context.
### Practical example of reading a signal
On XAUUSD H1 four bars with a lower wick above sixty per cent form over two sessions. The indicator flags only one. Of the three discarded, two had a range below one ATR and were therefore insignificant, while the third had the right proportions but sat in the middle of the last twelve bars range, having explored no new territory. The flagged bar instead had a range of one and a half ATR and its low had exceeded the low of the preceding twelve bars: price pushed into new territory and was rejected. The subsequent bounce lasts nine bars.
## Input parameters
| Parameter | Default | Description |
|---|---|---|
| `InpAtrPeriod` | 30 | Reference ATR period for measuring bar size and placing the arrows. |
| `InpMinRangeAtr` | 1.00 | Minimum bar range in ATR. It is the condition excluding bars too small to have rejected anything. |
| `InpMinWickShare` | 60.0 | Minimum wick share of the range, as a percentage. It defines how much the wick must dominate. |
| `InpMaxOppWick` | 20.0 | Maximum opposite wick share. It is automatically corrected if inconsistent with the previous threshold. |
| `InpExtremeBars` | 12 | Bars over which the rejection is checked to occur at an extreme. It is the most important context condition. |
| `InpArrowShift` | 0.70 | Distance of the arrows from price, in ATR. Purely cosmetic. |
## Advantages / strengths
- The extreme context filter eliminates most meaningless rejections.
- The absolute size filter excludes small bars, whose proportions describe nothing.
- The opposite wick constraint is automatically corrected if set inconsistently.
- No repaint: the arrow appears on bar close and is never removed.
## Limitations and warnings
- In a very strong trend counter rejections repeat and fail one after another.
- The extreme condition can exclude valid rejections occurring at a known level but not at a recent extreme.
- The pattern remains single bar and does not consider what happened before.
- The wick thresholds are conventions: different values produce very different signal sets.
**No repaint:** values printed on a closed bar are never modified afterwards.
**Disclaimer.** This product is a technical analysis tool, not an automated trading system, and it offers no profit guarantee whatsoever. Financial markets carry the risk of total loss of the invested capital. Past performance is not indicative of future results. Every signal must be confirmed with your own analysis, a money management plan and prior testing on a demo account. The author is not responsible for trading decisions taken on the basis of this indicator.
## Suggested tags / keywords for MQL5
`pin bar`, `rejection`, `candlestick`, `price action`, `pattern`, `reversal`, `no repaint`, `context filter`
