TL;DR. A wedge is a move that loses steam: price keeps drifting one way, but each swing travels less, so two trendlines that slope the same way narrow toward each other. A falling wedge usually breaks up and a rising wedge down. The Wedge node finds both, fires once on the breakout bar, and hands you the breakout line, a measured-move target and a stop. One Sensitivity setting decides how strict the shape must be.
What it measures
- A tiring drift. In a falling wedge both lines fall, but the top line falls faster, so the lows are getting shallower relative to the highs. Sellers are still pushing, with less and less effect. A rising wedge is the same with buyers.
- Both directions in one node. A falling wedge breaks up through its top line; a rising wedge is the same shape upside down and breaks down through its bottom line. The node's breakout reads +1 for a falling wedge and -1 for a rising one.
- Once per wedge. The breakout fires on one bar and the pattern ends. Another breakout needs a new swing.
Formula
Inputs in AlgoLift
| Setting | Default | Range | Notes |
|---|---|---|---|
| Sensitivity | 5 | 1 to 10 | How strict the shape is. 1 finds only the cleanest wedges, 10 the loosest; 5 is the textbook shape. Every setting below moves with it. |
| Longest wedge | 60 | 10 to 300 bars | The most bars a wedge may take, from its first swing. |
| Target (% of height) | 100 | 10 to 500 | The target's distance past the breakout, in percent of the wedge's starting height. |
| Settings | From Sensitivity | From Sensitivity, Custom | Custom unlocks the six settings below and reads them as you set them. |
| Swings of | 3 bars each side | 1 to 50 | How far a swing must stand out. Step 1: 4, steps 8 to 10: 2. |
| Slopes at least | 0.01 ATR a bar | 0 to 1 | How steeply both lines must slope. Step 1: 0.03, step 10: 0 (any slope in the wedge's direction). |
| Narrows at least | 30% | 1 to 99 | How much narrower the wedge must be at its last swing. Step 1: 50%, step 10: 5%. |
| At least | 1.6 ATR tall | 0.1 to 50 | The wedge's least height at its first swing. Step 1: 3.0, step 10: 0.6. |
| Forms over at least | 12 bars | 1 to 500 | The fewest bars from the first swing before a break counts. Step 1: 20, step 10: 6. |
| Breaks by | 0.05 ATR | 0 to 5 | How far past the line 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 falling wedge's breakout bar, -1 on a rising wedge's, 0 elsewhere. Wire it into a Comparison (greater than 0 for longs, less than 0 for shorts). |
| Falling wedge breakout, Rising wedge breakout | Numeric | On select | 1 on that side's breakout bar, else 0. |
| Stage | Numeric | On select | The wedge forming now: 0 none, 1 forming, 2 armed (a close beyond the line would break out). Positive for a falling wedge, negative for a rising one. |
| Breakout level | Numeric | Always | The armed wedge's breakout line on this bar (the top line, or the bottom line for a rising wedge). It slopes with the line. |
| Pattern high, Pattern low | Numeric | On select | The forming wedge's highest high and lowest low since its first swing. |
| Target, Stop | Numeric | On select | The last breakout's measured move and the far line on its breakout bar, held until the next breakout. |
| Bars forming | Numeric | On select | Bars since the wedge's first swing. |
How to read it
- Stage 2: a wedge is armed and its breakout line is drawn. A close beyond it is the signal.
- Stage 1: the lines have formed, but fewer than Forms over at least bars have passed since the first swing.
- A line that disappears without a marker: price closed through the other line (the drift resumed), the lines met, the wedge ran too long, or a new swing changed the shape.
- The delay: the last swing is only confirmed Swings of bars after it happened, so a wedge appears that many bars late. That is what keeps it from repainting.
Best in, worst in
Best in the late stage of a pullback or a tired trend, where a falling wedge inside an uptrend (or a rising wedge inside a downtrend) marks the end of the counter-move.
Worst in strong, steady trends: a rising market makes rising wedges all the way up, and fading each one fights the trend. Pair it with a trend filter that agrees with the break.
Three setups
1. Falling wedge in an uptrend
Wire Breakout into a Comparison (greater than 0) and AND it with an EMA trend filter (price above EMA 100) into a long Entry, so only pullbacks inside the trend are bought.
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 wedge.
3. Momentum fading into the break
Require the RSI to have made a higher low while price made a lower low inside the falling wedge, a classic confirmation that the selling is tiring.
Common mistakes
- Trading every rising wedge short in a bull market. The pattern leans toward the break, but the trend usually wins. Filter by the larger trend.
- Loosening several rules at once. Move Sensitivity one step, not six 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 Wedge node finds two converging lines that slope the same way and the close against their slope, once per wedge, in both directions. Sensitivity sets how strict the whole shape is with one number.