TL;DR. A double bottom is two lows at nearly the same price with a rally between them; its neckline is the rally's high, and a close above it completes the W. A double top is the same shape upside down, the M, completed by a close below its neckline. The Double Top and Bottom node finds both, fires once on the breakout bar, and hands you the neckline, a measured-move target and a stop. One Sensitivity setting decides how strict the shape must be.
What it measures
- A failed retest. At a low, price bounces, comes back to the same low and holds it. A close above the bounce's high says the second test failed for the sellers.
- Both directions in one node. The double bottom breaks up; the double top breaks down. The node's breakout reads +1 for a double bottom and -1 for a double top.
- Once per pattern. The breakout fires on one bar and the pattern ends. Another breakout needs a new second bottom (or top).
Formula
Inputs in AlgoLift
| Setting | Default | Range | Notes |
|---|---|---|---|
| Sensitivity | 5 | 1 to 10 | How strict the shape is. 1 finds only the cleanest patterns, 10 the loosest; 5 is the textbook shape. Every setting below moves with it. |
| Longest pattern | 80 | 10 to 500 bars | The most bars from the first bottom (or top) to the breakout. |
| Target (% of height) | 100 | 10 to 500 | The target's distance past the neckline, in percent of the pattern's height. 100 is the classic measured move. |
| Settings | From Sensitivity | From Sensitivity, Custom | Custom unlocks the four settings below and reads them as you set them. |
| Swings of | 4 bars each side | 1 to 50 | Swing strength. Step 1: 5, steps 6 to 10: 3. |
| Bottoms within | 0.6 ATR | 0 to 20 | How far apart the two bottoms (or tops) may be. Step 1: 0.25, step 10: 1.5. |
| Neckline at least | 1.6 ATR high | 0 to 50 | The neckline's least distance from the lower bottom. Step 1: 3.0, step 10: 0.6. |
| Breaks by | 0.05 ATR | 0 to 5 | How far past the neckline a close must be. Step 1: 0.15, steps 7 to 10: 0. |
A chart study added before the node existed kept its own settings (bars before and after a swing, and a tolerance). It now reads as Custom: the longer of its two swing sides, its tolerance, no height or margin floor, and the longest pattern of 500 bars.
Outputs in AlgoLift
| Handle | Type | Plotted | Notes |
|---|---|---|---|
| Breakout | Numeric | Always | +1 on a double bottom's breakout bar, -1 on a double top's, 0 elsewhere. Wire it into a Comparison (greater than 0 for longs, less than 0 for shorts). |
| Double bottom breakout, Double top breakout | Numeric | On select | 1 on that side's breakout bar, else 0. |
| Stage | Numeric | On select | 0 none, 1 a first bottom with its rally, 2 armed (the second bottom is confirmed and a close through the neckline would break out). Positive for a double bottom, negative for a double top. |
| Breakout level | Numeric | Always | The armed pattern's neckline. |
| Pattern high, Pattern low | Numeric | On select | The pattern's range since the first bottom. |
| Target, Stop | Numeric | On select | The last breakout's measured move and its lower bottom (or higher top), held until the next breakout. |
| Bars forming | Numeric | On select | Bars since the first bottom. |
How to read it
- Stage 2: the second bottom is confirmed and the neckline is drawn. A close through it is the signal.
- Stage 1: a low has rallied far enough to be a first bottom, and the node is waiting for the retest.
- A neckline that disappears without a marker: a new swing formed, price closed through the bottoms, or the pattern ran longer than its limit.
- Few signals: raise Sensitivity one step at a time and watch the count. Each step loosens every rule together, so the shape stays coherent.
Best in, worst in
Best in markets that have moved a long way and start to stall at a level, where the second test shows the move running out.
Worst in tight ranges, where equal highs and lows appear on almost every swing and the neckline is crossed back and forth.
Three setups
1. Neckline break with a momentum check
Wire Breakout into a Comparison (greater than 0) and require the RSI above 50 into a long Entry. Mirror it with less than 0 and RSI below 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 pattern.
3. Only patterns with a clear swing
Raise Sensitivity's strictness one step (Sensitivity 4) so each bottom needs a stronger swing and a taller neckline, then compare the trade count with step 5.
Common mistakes
- Expecting the signal at the second bottom. The node waits for the bottom to be confirmed (Swings of bars later) and then for a close through the neckline. Buying the retest itself is a different, earlier trade.
- Loosening several rules at once. Move Sensitivity one step, not four 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 Double Top and Bottom node finds two swings at one price, draws the neckline between them, and fires once when a close breaks it, in both directions. Sensitivity sets how strict the whole shape is with one number.