Home › Guides › Inverse Head and Shoulders Pattern

WHY BOTS FAILFREENO ACCOUNTAUTOMATED TRADE BOTSInverse Head andShoulders PatternThe arithmetic of how bots failEDUCATION ONLY | NO SIGNALSEXAMPLE NUMBERS ARE LABELLEDAUTOMATED TRADE BOTSautomatedtradebots.com
A free page on inverse head and shoulders pattern. Education only, with example numbers labelled.
WHY BOTS FAIL

Inverse Head and Shoulders Pattern

Short answer

The inverse head and shoulders is three swing lows in a row. The middle low (the head) is lower than the two outer lows (the shoulders). A line through the two rallies between them is the neckline.

Three lows, the middle one deepest, and a line across the two rallies. The target arithmetic is short. The code definition is where the work is.

The page explains the idea in plain words, works through the arithmetic with a table, and shows how it hits grid, martingale and DCA bots, then tells you what to check before you run one.

  • A worked example with real arithmetic
  • How it hits grid, martingale and DCA bots
  • How to check for it before you run a bot
  • No advice, no signals, no profit promises

Last reviewed 28 October 2026. Education only, not advice.

Free, no account Runs in your browser Worked numbers shown Not advice Examples labelled

Ready to go further

Next: size a trade before testing a rule

Whatever pattern a bot trades, the loss on a failed trade is set by position size. The calculator works it out from the stop distance.

Reading time8 minutes
Worked exampleExact arithmetic
Tools linked3 on this page
Reviewed28 Oct 2026

What is included

  • What it is, in plain words
  • The formula or mechanism, with exact arithmetic
  • How it hits grid, martingale and DCA bots
  • A check you can run before you switch a bot on

Who it is for

  • People who run or plan to run a trading bot
  • Anyone reading a backtest or a bot sales page
  • Readers who want the numbers, not the pitch
  • Not advice, and not a signal service
Made-up inverse head and shoulders with its neckline90100110181624left shoulderheadright shoulderBar numberMade-up prices. Dashed line: neckline through the two rallies. Calculated by us on 31 Oct 2026, exact.
The picture for this page. Example numbers are made up unless the page says they were calculated.

Key facts

  • The inverse head and shoulders is three swing lows in a row. The middle low (the head) is lower than the two outer lows (the shoulders). A line through the two rallies between them is the neckline.
  • It is the upside-down version of the head and shoulders. The usual measured-move rule takes the depth from the head up to the neckline and projects it upward from the break.
  • In the made-up example below the head depth is 13.00 points and the target is 111.25 (calculated by us on 31 Oct 2026, exact).
  • It has three lows, where a double bottom has two. That changes what a bot must test for.
  • This page does not say how often the pattern is followed by a rise. That is a number to measure on your own data, with costs.

What the pattern is

A swing low is a bar whose low is under the bars on either side. The inverse head and shoulders is a run of three swing lows. The first is the left shoulder. The second is lower, and it is the head. The third is the right shoulder, and it sits above the head, usually near the height of the left one.

Between the lows, price rallies twice. Those two peaks lie on the neckline. It can be flat or slope in either direction. A close above it is the break that is said to complete the pattern. Until then the shape is only a shape.

The story told about it is that sellers pushed to a new low at the head, then failed to repeat the effort at the right shoulder. That describes how a chart looks. It is not a law of markets, and nothing here says it holds more often than not. For the family this belongs to, see chart patterns. The top-side original is covered at length on head and shoulders, so this page only goes through what changes when you flip it.

The neckline and the measured move

The common rule has three steps. Measure the depth from the neckline, taken at the head, down to the head low. Find the price on the neckline at the bar of the break. Add the depth to that price to get a target.

target = neckline at the break + (neckline at the head - head low)

It is a rule of thumb for where a move could reach, not a forecast. Price can stop short, run past it or turn around at once. Many people also mark the right shoulder low as the point where the shape has failed, since a close under it breaks the story. Where a stop goes, and whether to use one, is a choice for whoever writes the rules. See stop loss calculator and risk-reward calculator.

A worked example with made-up numbers

Take a made-up chart of 27 bars. The left shoulder low is 96.00 on bar 5, the head is 88.00 on bar 12, and the right shoulder is 95.00 on bar 20. The rallies peak at 102.00 on bar 8 and 100.00 on bar 16. Because the second peak is lower, the neckline slopes down by 0.25 points a bar. The first close above the line is on bar 23, at 99.50. Every figure is made up.

PointBarPriceNote
Left shoulder (low)596.00First swing low
Left rally (peak)8102.00First neckline point
Head (low)1288.00Lowest low
Right rally (peak)16100.00Second neckline point
Right shoulder (low)2095.00Higher than the head
Neckline at the head12101.00Line between the peaks
Head depth-13.00101.00 minus 88.00
Neckline at the break2398.25The line slopes down
Break: first close above2399.50Closes over the line
Measured target-111.2598.25 plus 13.00

The neckline at the head is 101.00, so the head sits 13.00 points below it. By bar 23 the falling line has reached 98.25, and the close of 99.50 is above it. The target is 98.25 plus 13.00, which is 111.25. From the break close that is 11.75 points. The right shoulder low is 4.50 points under the break close, so the distance to the target is 2.6 times the distance to the shoulder. All of it was calculated by us on 31 Oct 2026, exact. Costs such as spread and slippage are left out to keep the count clear, and they would reduce any real result.

Made-up example: head depth, distance to target, distance to shoulder13.00Neckline to headpoints11.75Break to targetpoints4.50Break to shoulder lowpointsMade-up numbers from the table on this page. Calculated by us on 31 Oct 2026, exact.
The three distances from the table, in points. Made-up numbers.

How it differs from a double bottom

A double bottom has two lows at about the same level and one peak between them. The inverse head and shoulders has three lows and the middle one is clearly deeper. A bot can tell them apart only if the rule says how much deeper.

Take the head low of 88.00 from the example and imagine a second low at 88.50, with a peak of 100.00 between them. That is a double bottom with a depth of 12.00 and a measured target of 112.00. The same measuring idea gives a different line and a different number, because the shape chose a different peak to measure from. Details are on double bottom.

One practical point: a chart can look like a double bottom at bar 16 and turn into an inverse head and shoulders later, or the other way. The label depends on which bars you let the rule see.

How to define it in code

A bot needs a rule that gives the same answer on the same data every run. Every judgement becomes a number. One way to set it out:

  • Swing length. A swing low is the lowest low over N bars either side. Say N is 3. A larger N finds fewer, bigger swings.
  • Order. Find three swing lows in a row, with the middle one lower than both outer lows.
  • Head depth. Measure each shoulder's depth below the neckline at its own bar. In the example the left shoulder is 6.75 deep, the right is 4.00 and the head is 13.00. Require the head to be at least a set multiple of each shoulder, for instance 1.5 times. Here that gives 1.93 and 3.25, so it passes.
  • Shoulder tolerance. Require the two shoulder lows to be within a set share of the head depth. The example gap is 1.00 point, which is 7.7 percent of 13.00. A limit of 25 percent passes it. A limit of 5 percent would not.
  • Neckline slope. Cap how steep the line may be, in points a bar or as a share of the head depth. A very steep line is a different shape.
  • Time limit. Require all of it within a set number of bars, here at most 30.
  • Break rule. A close above the neckline value on that bar, not a touch. Optionally wait for a retest.

These numbers are examples of how to write the rule, not recommended settings. The right values depend on the market, the time frame and the data, and picking them by fitting to the past is the trap described on overfitting.

Timing matters too. With N at 3, a swing low is only confirmed three bars after it forms. The right shoulder at bar 20 is not known until bar 23. A test that marks it on bar 20 has used information it did not yet have. That is look-ahead bias, and it is the commonest way pattern tests look better than they were.

Failure cases

A pattern rule has to say what happens when the shape does not complete. Cases a bot meets:

  • The right shoulder goes too deep. If price falls under the head instead of stopping above it, the head was not the head. The rule must cancel the pattern and look again.
  • The break fails. Price closes above the neckline and drops back under it a few bars later. This is the case on false breakout. A rule with no way out will hold through it.
  • The break comes on a wick. A bar can poke above the line and close below it. A touch rule counts it, a close rule does not, and the trade counts differ.
  • The neckline is drawn differently. Through wicks or through closes. In the example a flat line at 100.00 would give a depth of 12.00 and a target of 112.00, against 111.25 for the sloping line.
  • Too few matches. A strict definition may find only a handful of patterns in years of data. A loose one finds many that no person would call the pattern.

How to check a rule built on it

  • Write the definition down before testing, with every number above.
  • Confirm each swing only when it is confirmed, not on the bar it occurred. See how to backtest.
  • Count every match, including the failures, and record each result after costs. See expectancy.
  • Test the inverse pattern on its own. Do not assume it behaves as a mirror of the top-side one.
  • Keep a final stretch of data untouched, and work out the loss on a failed trade with the position size calculator.

What this does not tell you

It does not say how often an inverse head and shoulders is followed by a rise, whether the target is reached, or whether any rule built on it makes money. The example is one made-up chart. Real charts are messier, and a real answer needs many matches, real costs and data the rule has not seen. This page is education only.

FAQ

Frequently Asked Questions

What is an inverse head and shoulders?

Three swing lows where the middle one is the lowest, with a neckline through the two rallies between them. A close above the neckline is usually treated as the break that completes it.

How do you work out the target?

Measure the depth from the neckline to the head low at the head, then add it to the neckline price at the break. It is a rule of thumb, and price may stop short or run past it.

How is it different from a double bottom?

A double bottom has two lows at about the same level. The inverse head and shoulders has three, with the middle one clearly deeper. A rule must say how much deeper.

How do you code it in a bot?

Turn each judgement into a number: swing length, head depth against the shoulders, shoulder tolerance, neckline slope, a time limit and a break rule. Confirm swings only after they form.

What makes the pattern fail?

The right shoulder may fall under the head, the break may reverse, or the neckline may be drawn another way. A rule needs a plan for each case.

Are the numbers on this page real?

Example numbers are made up to show how the maths works, and the page says so. A figure only counts as exact when the page says it was calculated on a stated date. Nothing you enter in a calculator leaves your browser.

Can I use this to decide whether to run a bot?

It can show whether a bot's numbers hold together and how much an account can lose. It cannot say what the market will do, and it is not advice. Use it to ask better questions, then read the terms of your own broker or exchange.

Is this financial advice?

No. It is general education. The prices are made up and it does not consider your situation or give any signal.

Know the Risk Before You Run It

Free calculators and guides, added every week. Leave your details and we will email you when new ones go up.

Trading carries a risk of loss