TL;DR. A pennant is a sharp move, the pole, followed by a short pause whose highs come down and whose lows come up, then a close through the pause in the pole's direction. It is a flag whose range has to narrow. The Pennant node finds bull and bear pennants, fires once on the breakout bar, and hands you the breakout level, a measured-move target and a stop. One Sensitivity setting decides how strict the shape must be.
What it measures
- A continuation that coils. After a strong push, price pauses and the swings get smaller. A close through the narrowed pause says the push is resuming.
- Both directions in one node. A bull pennant breaks up; a bear pennant is the same shape upside down and breaks down. The node's breakout reads +1 for a bull pennant and -1 for a bear pennant.
- Once per pennant. The breakout fires on one bar and the pattern ends. Another breakout needs a new pole.
Formula
Inputs in AlgoLift
| Setting | Default | Range | Notes |
|---|---|---|---|
| Sensitivity | 5 | 1 to 10 | How strict the shape is. 1 finds only the cleanest pennants, 10 the loosest; 5 is the textbook shape. Every setting below moves with it. |
| Longest pennant | 20 | 3 to 200 bars | The most bars the pause may last. |
| Target (% of height) | 100 | 10 to 500 | The target's distance past the breakout, in percent of the pole. 100 is the classic measured move. |
| Settings | From Sensitivity | From Sensitivity, Custom | Custom unlocks the seven settings below and reads them as you set them. |
| Pole at least | 1.8 ATR | 0.1 to 20 | The pole's least height. Step 1: 3.0, step 10: 1.0. |
| Pole within | 8 bars | 1 to 200 | The most bars the pole may take. Step 1: 5, step 10: 14. |
| Gives back at most | 50% | 1 to 100 | The deepest the pennant may retrace. Step 1: 30%, step 10: 68%. |
| Pennant at most | 1.6 ATR wide | 0.1 to 20 | The pennant's widest range. Step 1: 1.0, step 10: 2.6. |
| Later half at most | 75% of the earlier | 1 to 100 | How much the pennant must narrow. Step 1: 55%, step 10: 95%. |
| Pennant at least | 4 bars | 2 to 200 | The fewest pennant bars before a break counts. Step 1: 6, step 10: 3. |
| Breaks by | 0.05 ATR | 0 to 5 | How far past the pennant a close must be. Step 1: 0.15, steps 7 to 10: 0. |
Outputs in AlgoLift
| Handle | Type | Plotted | Notes |
|---|---|---|---|
| Breakout | Numeric | Always | +1 on a bull pennant's breakout bar, -1 on a bear pennant's, 0 elsewhere. Wire it into a Comparison (greater than 0 for longs, less than 0 for shorts). |
| Bull pennant breakout, Bear pennant breakout | Numeric | On select | 1 on that side's breakout bar, else 0. |
| Stage | Numeric | On select | The pennant forming now: 0 none, 1 forming, 2 armed (narrowed, and a close beyond the level would break out). Positive for a bull pennant, negative for a bear pennant. |
| Breakout level | Numeric | Always | The armed pennant's later half's high (or low, for a bear pennant). |
| Pattern high, Pattern low | Numeric | On select | The forming pennant's whole range. |
| Target, Stop | Numeric | On select | The last breakout's measured move and its later half's far side, held until the next breakout. |
| Bars forming | Numeric | On select | Bars since the pole's top. |
How to read it
- Stage 2: a pennant has narrowed and its level is drawn. A close beyond it is the signal.
- Stage 1: a pole has formed and the pause has started, but it is too short or has not narrowed yet.
- A level that comes and goes: the pause narrowed, then widened again. It arms again if it narrows before it ends.
- Few signals: raise Sensitivity one step at a time and watch the count. Pennants are rarer than flags, because every pennant is also a flag that narrowed.
Best in, worst in
Best in trending sessions with impulsive legs, where the pause after a push contracts before the next leg.
Worst in slow, ranging markets: the pole rule finds few real impulses, and a loose Sensitivity starts calling ordinary wiggles pennants. Pair it with a trend filter.
Three setups
1. Pennant with a trend filter
Wire Breakout into a Comparison (greater than 0) and AND it with an EMA trend filter (EMA 20 above EMA 50) into a long Entry. Mirror it with less than 0 and EMA 20 below EMA 50 for shorts.
2. Measured-move exits
Set a Bracket Order with its target at the node's Target and its stop at the node's Stop, so every trade's exits come from its own pennant.
3. Trend strength confirmation
Require the ADX/DMI above 20 at the breakout, so pennants in a directionless market are skipped.
Common mistakes
- Building the pennant by hand. A pennant needs memory (a pole, then a narrowing pause, then a break). The node holds that memory and has been tested against an independent implementation.
- Loosening several rules at once. Move Sensitivity one step, not seven separate settings. If you need one rule different, switch Settings to Custom and change only that one.
- Choosing Sensitivity on the backtest you report. Pick it on one window and check it on another (overfitting in trading).
The Pennant node finds a pole, a pause that narrows and the close through it, in both directions, once per pennant. Sensitivity sets how strict the whole shape is with one number.