Inverse Head and Shoulders
Category: Chart patterns · Updated November 2026
The TAAPI.IO Inverse Head and Shoulders API finds the bullish Inverse Head and Shoulders: three troughs with the middle one lowest, under a ceiling called the neckline. When price closes above the neckline, the downtrend that built the troughs is considered over. It works on crypto pairs and US stocks. Send an exchange, symbol and timeframe, with no candles to download and no pattern logic to maintain.
What one request returns
- The shape: the left shoulder, head and right shoulder (
l1_*,l2_*,l3_*) and the two peaks between them (h1_*,h2_*), so you can draw the pattern. - The neckline: a sloped line through the two peaks, given as two points (
neckline_left_*,neckline_right_*), plus its value above the head. - The breakout and target: the candle that closed above the neckline, its close, the neckline at that candle, and
projection_price, one pattern height above. - The status:
forming,confirmedorinvalidated, with astatus_reasonthat says why.
The default returns the most recent pattern. Add results=max to get every pattern found in the candles, oldest first. The mirror image, a bearish top, is the Head and Shoulders. Note the naming: in this pattern the l points are the shoulders and head, and the h points are the neckline.
Example: NVDA, March to April 2025
Request: NVDA on daily US stock candles with the default settings. This is the pattern it returned on 12 November 2026.
| Point | Price | Date | What it is |
|---|---|---|---|
| Left shoulder | 104.40 | 10 Mar 2025 | A new swing low in the downtrend |
| First peak | 123.70 | 17 Mar | The bounce after it: left end of the neckline |
| Head | 83.66 | 7 Apr | A lower low, 20.74 below the left shoulder |
| Second peak | 115.44 | 14 Apr | The bounce after the head: right end of the neckline |
| Right shoulder | 95.04 | 21 Apr | A higher low, 9.36 below the left shoulder |
| Neckline at breakout | 110.90 | 30 Apr | The line through both peaks, extended to the breakout candle |
| Breakout | 112.97 | 30 Apr | First daily close above the neckline |
| Target | 144.74 | — | Neckline at breakout + (neckline above the head − head) = 110.90 + 33.85 |
How to interpret this: NVDA had been falling since January. It made a low of 104.40 in March, bounced to 123.70, and then fell much harder in the April tariff sell-off, to 83.66. That is the head. The next drop, after a bounce to 115.44, stopped at 95.04: well above the head, so sellers could no longer push to new lows. The neckline through the two bounce highs slopes down, from 123.70 to 115.44. On 30 April the stock closed at 112.97, above where the neckline had reached, and the API marked the pattern confirmed. The measured move adds the depth of the head below the neckline, 33.85, to the neckline at the breakout, which gives 144.74. The next day price dipped to 108.92, back under the neckline during the session, but it never got near the right shoulder, and it reached the target on 9 June.
The right shoulder is only known 5 candles after it prints (with the default depth of 10), so this pattern first appeared on 28 April, two days before the breakout. Price reaching the target here does not mean it always will; see a pattern that failed. Example for illustration only, not financial advice.
| Spec | Value |
|---|---|
| Endpoint | GET https://v2.taapi.io/indicator/inverseheadandshoulders |
| Outputs | l1_price, l2_price, l3_price, h1_price, h2_price, the neckline points, breakout_price, projection_price, status, status_reason and more |
| Markets | Binance, Binance Futures, Bybit, Gate.io, Kraken and US stocks |
| Timeframes | 1m to 1w |
| Delivery | REST, bulk and WebSocket |
Get Inverse Head and Shoulders with one API call
This request returns Inverse Head and Shoulders for BTCUSDT on 1-hour Binance candles. Add your API key to run it here.
curl -G https://v2.taapi.io/indicator/inverseheadandshoulders \ -H "Authorization: Bearer YOUR_API_KEY" \ --data-urlencode "exchange=binance" \ --data-urlencode "symbol=BTCUSDT" \ --data-urlencode "timeframe=1h"
import requests
resp = requests.get(
'https://v2.taapi.io/indicator/inverseheadandshoulders',
headers={'Authorization': 'Bearer YOUR_API_KEY'},
params={'exchange': 'binance', 'symbol': 'BTCUSDT', 'timeframe': '1h'},
)
print(resp.json())const params = new URLSearchParams({"exchange": "binance", "symbol": "BTCUSDT", "timeframe": "1h"});
const res = await fetch(`https://v2.taapi.io/indicator/inverseheadandshoulders?${params}`, {
headers: { Authorization: 'Bearer YOUR_API_KEY' },
});
console.log(await res.json());Inverse Head and Shoulders API response
Example for NVDA on daily US stock candles: the pattern charted above, from a results=max request on 12 November 2026. It was the only pattern in the candles.
{
"l1_timestamp": [1741564800],
"l1_price": [104.4],
"h1_timestamp": [1742169600],
"h1_price": [123.7],
"l2_timestamp": [1743984000],
"l2_price": [83.66],
"h2_timestamp": [1744588800],
"h2_price": [115.44],
"l3_timestamp": [1745193600],
"l3_price": [95.04],
"neckline_left_timestamp": [1742169600],
"neckline_left_price": [123.7],
"neckline_right_timestamp": [1745971200],
"neckline_right_price": [110.89699999999999],
"neckline_at_l2": [117.505],
"breakout_occurred": [true],
"is_confirmed": [true],
"breakout_timestamp": [1745971200],
"breakout_price": [112.97],
"breakout_neckline_price": [110.89699999999999],
"projection_price": [144.742],
"direction": ["bullish"],
"status": ["confirmed"],
"status_reason": ["breakout_above_neckline"],
"pattern_index": [1],
"timestamp": [1794441600]
}Reading this response
- The neckline starts at the first peak (
neckline_left_price123.70 =h1_price) and passes through the second peak at 115.44. That is a drop of 8.26 over 20 trading days, about 0.41 per day. - Above the head, 15 trading days after the left anchor, the neckline is at
neckline_at_l2117.505. The pattern height isneckline_at_l2−l2_price= 117.505 − 83.66 = 33.845. - The breakout candle is 31 trading days after the left anchor, where the neckline is at 110.897 (
breakout_neckline_price). Its close, 112.97, is above that, sostatusisconfirmed. projection_price= 110.897 + 33.845 = 144.742.- Because the pattern is confirmed,
neckline_right_*is the breakout candle. To get the neckline at any other time, extend the line through the two neckline points. For stocks, the line is straight in candle count, so measure in trading days, not calendar time, if you extend it by hand.
| Field | Type | Description |
|---|---|---|
l1_timestamp, l1_price | integer[], number[] | Left shoulder: Unix time in seconds, and the swing low |
h1_timestamp, h1_price | integer[], number[] | First peak, between the left shoulder and the head |
l2_timestamp, l2_price | integer[], number[] | Head: the lowest of the three troughs |
h2_timestamp, h2_price | integer[], number[] | Second peak, between the head and the right shoulder |
l3_timestamp, l3_price | integer[], number[] | Right shoulder. A price below it before the breakout invalidates the pattern |
neckline_left_timestamp, neckline_left_price | integer[], number[] | Left end of the neckline: the first peak |
neckline_right_timestamp, neckline_right_price | integer[], number[] | Right end of the neckline when drawing: the breakout candle if confirmed, the candle that invalidated it, or 20 candles after the right shoulder |
neckline_at_l2 | number[] | The neckline directly above the head. This minus l2_price is the pattern height |
breakout_occurred, is_confirmed | boolean[] | true once a candle closed above the neckline |
breakout_timestamp | (integer or null)[] | Unix time of that candle |
breakout_price | (number or null)[] | Its close |
breakout_neckline_price | (number or null)[] | The neckline at the breakout candle. breakout_price is always above it |
projection_price | (number or null)[] | Target: breakout_neckline_price + (neckline_at_l2 − l2_price). Set only when confirmed |
direction | string[] | Always bullish |
status | string[] | forming, confirmed or invalidated |
status_reason | string[] | Why the pattern has that status; see the table below |
pattern_index | integer[] | Position of the pattern in the full list, oldest first |
timestamp | integer[] | Unix time of the latest candle used |
Prices are swing highs and lows on candle wicks. With source=body they are candle bodies instead (the lower of open and close for troughs, the higher for peaks), and the neckline goes through the peak bodies.
Status and status_reason
| status | status_reason | Meaning |
|---|---|---|
forming | awaiting_breakout | The right shoulder is in place and price has not closed above the neckline yet |
confirmed | breakout_above_neckline | A candle closed above the neckline within 20 candles of the right shoulder. Confirmation is permanent: what price does afterwards does not change it |
invalidated | bearish_structure_resumed | Before any breakout, price went below the right shoulder. Sellers are still in charge; a later break of the neckline is ignored |
invalidated | breakout_timeout | 20 candles after the right shoulder and still no close above the neckline |
The API checks each candle after the right shoulder in order, and the first event decides: a low below the right shoulder, or a close above the neckline. Once decided, the status stays the same as new candles arrive. The default results=1 returns only the last pattern, which can be invalidated. Add results=max to get every pattern and filter on status. The response is empty when no pattern is found in the candles, so handle that case in your code. To get only valid patterns merged with other bullish patterns, use Advanced Bullish Patterns, which leaves invalidated ones out.
Inverse Head and Shoulders API parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
exchange | string | Yes | — | binance, binancefutures, bybit, gateio, kraken or stocks |
symbol | string | Yes | — | Pair or ticker, e.g. BTCUSDT or AAPL |
timeframe | string | Yes | — | 1m 5m 15m 1h 4h 1d 1w |
depth | integer | No | 10 | Width of the window that confirms a swing: half the candles before it, half after. With 10, a swing low must be the lowest of 5 candles on each side, and appears 5 candles late. Raise it for larger, slower patterns |
deviationATR | number | No | 1 | Minimum move between two swings, in multiples of ATR (or percent with deviationType=percent). Smaller swings are merged |
deviationType | string | No | atr | atr or percent, the unit of deviationATR |
source | string | No | wick | wick uses highs and lows for the swings and the neckline; body uses open and close |
heikinashi | boolean | No | false | Detect the pattern on smoothed Heikin-Ashi candles instead of real candles. Fewer small swings, but breakouts confirm later and may not match a normal chart |
atrPeriod | integer | No | 14 | Period of the ATR that all the thresholds below are measured in |
headProminenceATR | number | No | 1.2 | How far, in ATR, the head must fall below each shoulder |
shoulderToleranceATR | number | No | 1.5 | Largest allowed difference between the two shoulders, in ATR |
minDepthATR | number | No | 1 | Minimum rise, in ATR, from the left shoulder to the first peak and from the head to the second |
symmetryMin | number | No | 0.5 | Minimum ratio of candles from left shoulder to head, over candles from head to right shoulder |
symmetryMax | number | No | 3.5 | Maximum of that ratio |
breakoutLookahead | integer | No | 20 | Candles after the right shoulder to wait for a close above the neckline |
necklineBuffer | number | No | 0.2 | How far, in ATR, a candle may close above the neckline between the first peak and the right shoulder before the pattern is rejected |
results | integer | No | 1 | Number of patterns to return, or max |
backtrack | integer | No | 0 | Candles to skip from the most recent |
What is the Inverse Head and Shoulders?
The Inverse Head and Shoulders is a bullish reversal pattern that forms at the end of a downtrend. Price makes a low (the left shoulder), bounces, makes a lower low (the head), bounces again, and then dips once more but stops above the head (the right shoulder). The two bounces mark a ceiling, the neckline. As long as price stays below it, the downtrend is only pausing. A close above it says the sellers who capped the bounces twice have given up.
How traders use it
Most traders wait for the close above the neckline rather than buying the right shoulder, because many right shoulders turn into new lows. On the break they buy, put a stop below the right shoulder, and aim for the measured move: the distance from the head up to the neckline, projected up from the breakout. Some wait for price to come back down and retest the neckline from above, as NVDA did the day after its breakout, and use that for a better entry. The pattern is a reversal signal only when there was a trend to reverse; three troughs in a sideways range mean much less.
How the API finds it
| Part | Rule |
|---|---|
| Swings | Swing highs and lows confirmed by depth, kept only if they move at least deviationATR × ATR from the previous swing |
| Sequence | Five swings in a row: a lower low (left shoulder), a lower high, a lower low (head), any high, and a higher low (right shoulder) |
| Downtrend | At least one earlier lower low and one earlier lower high in the candles |
| Head | At least 1.2 ATR below each shoulder |
| Shoulders | Within 1.5 ATR of each other |
| Peaks | Each at least 1 ATR above the trough before it |
| Timing | Left shoulder to head takes between 0.5 and 3.5 times as many candles as head to right shoulder |
| Right shoulder | The drop into it is smaller than the drop into the head |
| Neckline | A straight line through the two peaks. No candle between the first peak and the right shoulder closes more than 0.2 ATR above it |
| Breakout | The first close above the neckline within 20 candles of the right shoulder, as long as no candle went below the right shoulder first |
| Target | Neckline at the breakout + (neckline above the head − head) |
The ATR is measured at the swing being tested, so the same defaults work on a 1-minute chart and a weekly one. The numbers in the table are the defaults; each has a parameter above.
How to read Inverse Head and Shoulders in your code
| Signal | Meaning | Condition |
|---|---|---|
| Breakout | Price closed above the neckline | status is confirmed |
| Fresh signal | Breakout on the latest candles | breakout_timestamp is close to timestamp |
| Setup to watch | Three troughs in place, waiting for the break | status is forming; watch for a close above the neckline |
| Target | Measured move | projection_price |
| Stop | Where the pattern is clearly wrong | Below l3_price, the right shoulder |
| Failed setup | Pattern no longer valid | status is invalidated; see status_reason |
Act on a fresh Inverse Head and Shoulders breakout with Python
This reads the latest pattern as of the last closed daily candle (backtrack=1) and only acts on a breakout from the last few days. It uses projection_price as the target, the right shoulder as the stop, and the sloped neckline as an early warning.
curl -G https://v2.taapi.io/indicator/inverseheadandshoulders \ -H "Authorization: Bearer YOUR_API_KEY" \ --data-urlencode "exchange=stocks" \ --data-urlencode "symbol=NVDA" \ --data-urlencode "timeframe=1d" \ --data-urlencode "backtrack=1"
import requests
API = 'https://v2.taapi.io'
HEADERS = {'Authorization': 'Bearer YOUR_API_KEY'}
market = {'exchange': 'stocks', 'symbol': 'NVDA', 'timeframe': '1d', 'backtrack': 1}
CANDLE = 24 * 3600 # seconds per candle for this timeframe
FRESH = 3 # only act on breakouts from the last 3 closed candles
p = requests.get(f'{API}/indicator/inverseheadandshoulders', headers=HEADERS, params=market).json()
def neckline_at(t):
"""The sloped neckline at Unix time t."""
t0, y0 = p['neckline_left_timestamp'][0], p['neckline_left_price'][0]
t1, y1 = p['neckline_right_timestamp'][0], p['neckline_right_price'][0]
return y0 + (y1 - y0) * (t - t0) / (t1 - t0)
if not p or not p.get('status'):
print('No inverse head and shoulders in the candles')
elif p['status'][0] != 'confirmed':
print('Latest pattern:', p['status'][0], p['status_reason'][0])
else:
now = p['timestamp'][0] # the last closed candle
age = (now - p['breakout_timestamp'][0]) // CANDLE # calendar days for stocks
if age > FRESH:
print(f'Breakout is {age} days old, too late to act on')
else:
print(f"Long signal, breakout {age} days ago at {p['breakout_price'][0]:,.2f}")
print(f"Target: {p['projection_price'][0]:,.2f}")
print(f"Stop: below the right shoulder, {p['l3_price'][0]:,.2f}")
print(f"Neckline: {neckline_at(now):,.2f} now; a close back below it is a warning")Why the age check: the right shoulder is only known depth/2 candles after it prints, so a fast breakout can already be a few candles old the first time you see the pattern. Decide how late is too late for your strategy.
A pattern that worked and one that failed
Two confirmed patterns from the default settings, both clean on a chart.
| NVDA 1d, March–April 2025 | ETHUSDT 1h, 8–11 November 2026 | |
|---|---|---|
| Shoulders / head | 104.40 / 83.66 / 95.04 | 2,060.00 / 2,006.00 / 2,044.40 |
| Neckline | Falling, 123.70 → 115.44 | Falling steeply, 2,151.90 → 2,073.41 |
| Breakout close vs neckline | 112.97 vs 110.90 (30 Apr) | 2,075.31 vs 2,052.75 (11 Nov 15:00) |
| Target | 144.74 | 2,149.08 |
| What followed | Dipped to 108.92 the next day, then target reached 9 Jun | High of 2,103.78 two hours later; below the right shoulder at 23:00 the same day; 2,008.53 on 12 Nov |
NVDA came out of a capitulation low: the head was a market-wide panic, and the right shoulder showed that the panic was not repeated. The breakout came seven trading days after the right shoulder, with room to spare above a falling neckline. ETH was a small pattern on hourly candles, 96 from head to neckline, and its neckline fell so steeply that the breakout close, 2,075.31, was barely above the second peak and 77 below the first. Nothing much had been repaired. The right shoulder was only confirmed at 19:00, four hours after the breakout, and four hours after that ETH was below it. A stop under 2,044.40 cut the loss at about 1.5%; anyone waiting for the target is still waiting.
A third kind of outcome: on MSFT daily candles in spring 2026 the right shoulder printed on 30 April, the day after a sharp high, and price did not close above the steeply rising neckline. After 20 candles the API marked it invalidated with breakout_timeout.
How often the target is reached: across BTC, ETH and SOL at 1h, 4h and 1d, and AAPL, MSFT, NVDA, TSLA and SPY at 1h and 1d (500 candles each, default settings), the API confirmed 7 patterns, bearish and inverse together. 3 reached their target before price got back past the right shoulder; 4 did not. That is far too few to measure an edge. Treat the target as a reference level, not a promise.
Examples for illustration only, not financial advice.
Limitations:
- Swings need
depth/2 candles to confirm, so the right shoulder, and sometimes the breakout, appear with a delay. - The rules are strict. The left shoulder must be a new low, so a bottom whose left shoulder sits above an earlier low is not found. Loosen
headProminenceATRandshoulderToleranceATRto find more, less clean patterns. - A long wick on one of the peaks tilts the neckline. Use
source=bodyif you draw necklines through candle bodies. - Rarely, a swing that forms after a breakout redraws the right shoulder and the pattern is no longer returned. Store confirmed patterns on your side if you need a permanent record.
- Patterns run on real candles; add
heikinashi=truefor smoothed candles, which find fewer small swings but confirm breakouts later. - A confirmed pattern is not a guaranteed move. Nothing on this page is financial advice.
Get historical Inverse Head and Shoulders values
Add results to return a series for backtesting or charting. The last element is the most recent candle.
curl -G https://v2.taapi.io/indicator/inverseheadandshoulders \ -H "Authorization: Bearer YOUR_API_KEY" \ --data-urlencode "exchange=binance" \ --data-urlencode "symbol=BTCUSDT" \ --data-urlencode "timeframe=1h" \ --data-urlencode "results=100"
Get Inverse Head and Shoulders for multiple symbols
Combine Inverse Head and Shoulders with other indicators in one request. Each exchange, symbol and timeframe combination is one construct: Basic allows 1 per request, Pro 3 and Expert 10.
curl -X POST https://v2.taapi.io/bulk \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"constructs": [
{
"id": "btc_1h",
"exchange": "binance",
"symbol": "BTCUSDT",
"timeframe": "1h",
"indicators": [
{
"id": "inverseheadandshoulders",
"indicator": "inverseheadandshoulders"
},
{
"id": "rsi",
"indicator": "rsi"
}
]
}
]
}'Stream Inverse Head and Shoulders in real time
Subscribe over WebSocket to receive new values every 5 seconds while the candle is forming. Streaming supports 1m, 5m, 15m and 1h, and uses interval where REST uses timeframe.
{
"type": "subscribe",
"id": "inverseheadandshoulders",
"exchange": "binance",
"symbol": "BTCUSDT",
"interval": "1m",
"indicator": "inverseheadandshoulders"
}Inverse Head and Shoulders API FAQ
What does the Inverse Head and Shoulders API return?
For each pattern: the three troughs and two peaks, the neckline as two points and above the head, the breakout candle and close, the target, and the status with its reason. The default returns the most recent pattern; results=max returns all of them. Results are JSON.
When is a pattern confirmed?
When a candle closes above the neckline within 20 candles of the right shoulder, before any candle has gone below the right shoulder. A wick above is not enough. Once confirmed, the status does not change. Add backtrack=1 to ignore the candle that is still forming.
How is the target calculated?
Take the depth of the head below the neckline (neckline_at_l2 − l2_price) and add it to the neckline at the breakout candle (breakout_neckline_price). The result is projection_price.
Why are the shoulders called l1 and l3?
The fields follow the swings: l for lows, h for highs. In an inverse pattern the shoulders and head are lows (l1, l2, l3) and the neckline runs through the highs (h1, h2). In the bearish Head and Shoulders it is the other way round.
Why did I get no pattern?
Clean patterns are rare at the default settings: in 18 test data sets of 500 candles, the API found 6 inverse ones. Try a higher timeframe, results=max, or smaller headProminenceATR and larger shoulderToleranceATR values.
Can I get Inverse Head and Shoulders for US stocks?
Yes. Use exchange=stocks with a ticker such as AAPL. US stocks are included on the Pro plan and above.
Related indicators
- Head and Shoulders: the bearish mirror
- Double Bottom: two troughs instead of three
- Advanced Bullish Patterns: all bullish chart patterns in one call
See the full list of indicators, or start for free.