Pin Bar Price Action¶
v.3.1.0.0 Built on Strategy Core

Overview¶
Trades the Pin Bar - a candle whose long tail shows a move the market pushed and then rejected - in the direction of the trend.
How it trades¶
- A pin: the body at most Max body % of the range, a long tail on one side (colour by Body color).
- Optional filters: the bar's size, the tail beyond the recent extreme, the trend (EMA).
- Optional confirmation within Confirm within bars; the stop can sit beyond the tail.
Parameters¶
| Parameter | Default | What it does |
|---|---|---|
| Signal bar offset (bars) | 0 | Which bar is judged as the pin: 0 = the last closed bar; 2 = the one two bars before it, so the entry comes two bars after the pin. With Confirmation = Break the waiting for the break starts from here. |
| Max body (% of range) | 15 | The largest body a pin may have, as a share of the bar's high-low range. 25 = a quarter. |
| Min tail (% of range) | 0 | The shortest tail a pin may have, as a share of the range - the tail is the long wick away from the body. 0 = any tail. |
| Nose tolerance (ticks) | 0 | How far the body may sit from the bar's end opposite the tail - the nose. 0 = the bar opens (or closes) exactly at its high for a long pin and its low for a short one; a few ticks find more pins. |
| Body color | Any | Strict: a long pin must be a bearish bar and a short pin a bullish one. Any: the body's color does not matter. |
| Bar size filter | Off | Judge the pin's high-low range: in ticks, or in ATRs of the bars before it. Off: any size. |
| Min bar size | 0 | The smallest range a pin may have, in the unit of Bar size filter. 0 = no minimum. |
| Max bar size | 0 | The largest range a pin may have, in the unit of Bar size filter. 0 = no maximum. |
| Size ATR period (bars) | 14 | The ATR the bar size is measured in, taken on the bar before the pin. |
| Tail beyond extreme (bars) | 0 | The tail must go past the lowest low (a long pin) or the highest high (a short pin) of this many bars before it - the rejection of a level rather than of a bar inside a range. 0 = off. |
| Trend filter | With trend | The pin's close against an EMA. With trend: long pins above it, short pins below. Reversal: long pins below it, short pins above - the pin as the turn of a move. Off: no filter. |
| Trend EMA period | 50 | The period of the EMA the trend filter reads. |
| Confirmation | None | None: the entry is asked for as soon as the pin is found. Break: only once a later bar closes beyond the pin's nose - above its high for a long, below its low for a short. |
| Confirm within (bars) | 3 | How many closed bars after the pin the break may take. A pin not broken by then is dropped. |
| Strategy price | Nose | The level of the pin the entry is placed from when the Orders group's Entry price is Strategy. Nose: its high for a long, its low for a short - with a stop entry, a break of the pin. Mid: the middle of the bar - with a limit, a pullback into it. Tail: the tip of the tail. |
| Stop beyond tail (ticks) | 2 | With the Stop loss group's Mode = Strategy: the stop goes this many ticks beyond the tip of the pin's tail. |
Core settings¶
Order handling, position size, stops and targets, trade management, trading hours, account limits and the ML Engine are core settings - the same in every strategy. Hover a group or a core term for a short explanation.
Strategy Core General & Orders Quantity & Scaling Stop loss & Profit target Trade management Sessions & time Money & News ML Engine Log & Report
Core defaults¶
This strategy starts with these core settings; change any of them in its settings.
| Group | Setting | Default |
|---|---|---|
| NinjaTrader | Calculate | On bar close |
| Quantity | Quantity | 1 |
| Stop loss | Mode | Ticks |
| Stop loss | Ticks | 40 |
| Profit target | Mode | Ticks |
| Profit target | Ticks | 200 |
| Money management (off) | Daily loss | 500 |
| Money management (off) | Daily profit | 500 |
| Subsessions (off) | S1 Start | 09:30 |
| Subsessions (off) | S1 End | 12:00 |
| Subsessions (off) | S2 Start | 09:30 |
| Subsessions (off) | S2 End | 12:00 |
| Subsessions (off) | S3 Start | 13:00 |
| Subsessions (off) | S3 End | 14:00 |
| NinjaTrader | Exit on session close | On |
| NinjaTrader | Exit on session close (s) | 720 |
Version history¶
v.3.1.0.0 - October 2026
- Changed: the signal follows NinjaTrader's Calculate setting - On bar close by default; On each tick reads the forming bar.
Earlier versions
v.3.0.0.0 - October 2026
- Rebuilt on the Strategy Core: orders, sizing, stops and targets, trade management, sessions, limits and the ML Engine are core settings.
- Added: Tail, nose, size and trend filters; confirmation; a stop beyond the tail.
v.2.1.0.0 - May 25, 2026
- Direction forecast: added COT (Commitment of Traders) features.
- Added contract quantity forecast module.
v.2.0.0.0 - Mar 9, 2026
- ML Engine filter feature added.
v.1.1.0.1 - Oct 26, 2025
- Trading hours and days logic updated — if all sessions are disabled, the strategy now runs without time restrictions instead of stopping trading.
v.1.1.0.0 - May 27, 2025
- Added ROI function for trade exit.
- Added session end position closing function.
- Added descriptive names to exit orders for better understanding of position closure conditions.
- Added bar offset for entry signal.
- Sorted properties.
v.1.0.0.8 - July 29, 2024
- Improved functions to raise position after connection loss.
v.1.0.0.7 - Mar 14, 2024
- Improved conditions for closing a position when the daily loss or profit is reached.
- Changed parameter determining the priority of strategy position or account position.
- Fixed the problem of strategy transition to the next state while placing an entry order.
v.1.0.0.6 - Dec 24, 2023
- Improved conditions for partial fulfillment of orders.
- Improved the function of raising the position after connection loss.
v.1.0.0.5 - Dec 1, 2023
- Improved conditions for partial fulfillment of orders.
- Improved the function of raising the position after connection loss.
- Added functions for order execution log.
v.1.0.0.4 - Nov 12, 2023
- Improved trading session time.
- Improved the function of raising the position after connection loss.
v.1.0.0.3 - Sep 30, 2023
- Improved the function of raising the position after connection loss.
v.1.0.0.2 - Sep 5, 2023
- Added additional setting for specifying the trading session.
- Added function of raising the position after connection loss.
- Daily profit and drawdown functions can be used in backtest.