Double Top and Bottom

The M and the W as one node: two swings at one price, a neckline between them, a close through it. Sensitivity sets how strict the shape is.

IndicatorBy AlgoLiftUpdated 5 min read
On this page 11What it measuresFormulaInputs in AlgoLiftOutputs in AlgoLiftHow to read itBest in, worst inThree setups1. Neckline break with a momentum check2. Measured-move exits3. Only patterns with a clear swingCommon mistakes

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

SettingDefaultRangeNotes
Sensitivity51 to 10How 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 pattern8010 to 500 barsThe most bars from the first bottom (or top) to the breakout.
Target (% of height)10010 to 500The target's distance past the neckline, in percent of the pattern's height. 100 is the classic measured move.
SettingsFrom SensitivityFrom Sensitivity, CustomCustom unlocks the four settings below and reads them as you set them.
Swings of4 bars each side1 to 50Swing strength. Step 1: 5, steps 6 to 10: 3.
Bottoms within0.6 ATR0 to 20How far apart the two bottoms (or tops) may be. Step 1: 0.25, step 10: 1.5.
Neckline at least1.6 ATR high0 to 50The neckline's least distance from the lower bottom. Step 1: 3.0, step 10: 0.6.
Breaks by0.05 ATR0 to 5How 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

HandleTypePlottedNotes
BreakoutNumericAlways+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 breakoutNumericOn select1 on that side's breakout bar, else 0.
StageNumericOn select0 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 levelNumericAlwaysThe armed pattern's neckline.
Pattern high, Pattern lowNumericOn selectThe pattern's range since the first bottom.
Target, StopNumericOn selectThe last breakout's measured move and its lower bottom (or higher top), held until the next breakout.
Bars formingNumericOn selectBars 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.
Common Misconception
Myth
Two equal lows are a double bottom.
Reality
Two equal lows are only a retest until price closes through the neckline. Many retests break the low instead, which is why the node waits for the breakout and ends the pattern on a close below the bottoms.

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).
Key Takeaway

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.