Strategy family · Price action

Wedge pattern

A wedge strategy trades a break out of a range bounded by two converging trend lines that slope the same way. Wedges are easy to see in hindsight and hard to define in advance, so a test needs explicit rules for anchoring the lines, the number of touches, the minimum length and what counts as a break. Without them, it cannot be backtested.

What is the idea?

A rising wedge has both lines sloping up with the lower one steeper, and a falling wedge the reverse. The narrowing range shows swings getting smaller, and a break through one of the lines is used as the trigger, often with the expectation that the break goes against the slope.

The difficulty is that a wedge is a drawing, and drawings are subjective. Where the lines are anchored, how many touches are required, how steep they must be and how close to the apex a break still counts all change what the pattern is. Two people looking at the same chart draw different wedges, and either can be justified afterwards.

That makes it a hard pattern to test honestly. The test is only meaningful if a program can find the wedge from the data alone, using rules fixed in advance, so that the result is not the product of someone choosing which wedges to count.

The rules, in order

  1. Identify swing highs and swing lows with one fixed definition.
  2. Fit an upper line through at least a minimum number of swing highs and a lower line through swing lows, using a fixed fitting method.
  3. Require that the two lines converge and slope the same way, within set limits.
  4. Require a minimum length in candles and a minimum number of touches on each line.
  5. Signal on a close beyond one of the lines by a minimum margin, before the apex.
  6. Enter with a stop inside the pattern and a target based on the pattern's height.

The settings the rules hide

Every setting below is a choice, and each one changes which trades the strategy takes. They have to be fixed before a test, and the more of them there are, the more room there is to fit the past.

Settings, what each controls, and what to watch for.
SettingWhat it controlsNote
Swing definitionWhat counts as a swing pointThe foundation of everything else, and the most sensitive choice.
Number of touchesHow many points define each lineMore touches mean fewer, cleaner patterns.
Fitting methodHow a line is drawn through the pointsDifferent methods draw different lines through the same data.
Convergence limitsHow steep and how convergentLoose limits find wedges in everything.
Break marginHow far beyond a line countsA larger margin avoids marginal breaks but enters late.
Target ruleWhere the trade is taken offPattern height is common. Test alternatives.

What AKQX provides for this

AKQX does not currently list a wedge as a ready-made template. A wedge is hard to define precisely enough for a program to find, which is the main obstacle to testing it.

Check the Strategy Builder in the app for what it currently supports. Backtests apply estimated fees and slippage and report expectancy, profit factor, drawdown and trade count.

How to backtest it honestly

  1. Write the swing definition, the fitting method, the touch count and the convergence limits in numbers before any test.
  2. Make the detection causal. A wedge can only be recognised using candles up to the moment of the signal, not after the break is known.
  3. Count how many wedges the rule finds. If the count is small, the sample is too small to conclude anything.
  4. Compare breaks in each direction, instead of only the ones that followed the expected direction.
  5. Nudge the thresholds and check the result degrades gradually, then test on unseen data.
  6. Include costs, then paper trade, where the break is judged on a candle that has not yet closed.

The full method is in how to backtest a crypto strategy, and the way results are scored is on the methodology page.

A worked example, with made-up numbers

Illustrative only: successive swing highs at 110, 108 and 106.5 and swing lows at 102, 101 and 100.5 give two downward-sloping lines that converge, which is a falling wedge. The rule requires three touches on each line, a length of at least 30 candles and a close beyond a line by 0.3 before the apex. With the upper line projected at 106.4 on a given candle, a close at 106.9 is 0.5 above it and triggers a buy. On a long history the test reports how many such patterns the rule found and how the breaks resolved in both directions.

Where it goes wrong

  • Drawing the lines after the move, so every chart contains a wedge.
  • Choosing which wedges to count by looking at which ones worked.
  • Counting only the breaks that went the expected way.
  • Leaving the fitting method unstated, so the same data gives different wedges.

Educational only. AKQX is software only. It is not a SEBI-registered Investment Adviser or Research Analyst and gives no investment advice or recommendations. Backtest and paper-trading results are simulated and do not guarantee future results. Crypto products are unregulated and can be highly risky, and there may be no regulatory recourse for any loss.

Questions about wedge pattern

What is a wedge pattern?

A range bounded by two trend lines that converge and slope the same way. A rising wedge slopes up, with the lower line steeper, and a falling wedge slopes down.

Can wedges be backtested?

Only if the pattern is defined precisely enough for a program to find it from the data using fixed rules. A wedge picked out by eye cannot be tested, only remembered selectively.

Do wedges predict reversals?

That is an empirical question, and nobody can answer it in general. This page does not claim they do. A rule defined in advance and tested in both directions is the way to find out.

Does AKQX have a wedge strategy?

Not as a ready-made template at the moment. Check the Strategy Builder in the app for what it supports. AKQX gives no advice and makes no claim that any pattern is profitable.

Keep reading

Test it instead of taking it on trust

A free account includes 10 backtests a month and 1 paper algo, with no card and no broker connection.