← All ideas
#009BreakoutPosition

Continuous breakout: position size from where price sits in the range

A position builds as soon as price is above the middle of the N-day range and doubles at its edge. Rob Carver trades futures this way without stop-losses: on a pullback the forecast falls and the position shrinks by itself.

The Algorithmic Advantage · Rob Carver · Watch video

Markets

Futures, Indices, Commodities, Forex, Bonds

Timeframe

D1

Data

OHLC

Rules

Partly formalised

Difficulty

Medium

Status

Untested

Some rules were added by us and are marked in the text.

TradingView has pitfalls
EasyLanguage has pitfalls
MetaTrader 5 has pitfalls

Idea in brief

A classic breakout is binary. While price is inside the channel, there is no position. When price touches the edge, the full size is opened. When price comes back, the stop closes the whole position. Rob Carver, who once headed a unit at Man AHL, trades the breakout differently. Carver converts where price sits in the range into a number from −20 to +20 and holds a position proportional to that number.

Price in the middle of the range gives 0, no position. Halfway from the middle to the high the forecast is +10, which is the average position. At the high itself it is +20, a position twice the average, and it does not grow further. On a pullback the forecast declines and the position shrinks gradually, and below the middle it turns into a short. There is no stop-loss, the forecast itself plays that role.

The rule is part of the author's current set: in an episode of the Odds on Open podcast (the video was published as a post on X), Carver describes it the same way: the position grows as price nears the edge of the range.

Why it might work

A breakout bets that the market has shifted and will keep moving. Carver puts it in the same group as momentum and estimates its correlation with momentum rules at about 80%. The author's complaint about the classic version is that until the edge of the range the system has no opinion at all, and at the edge its opinion is instantly at maximum. A continuous scale gives a position proportional to the strength of the signal, and entries and exits become gradual.

The advantages the author names: a smoother risk profile and ultimately a higher return, and for a large account also lower costs. A fund does not have to buy hundreds of contracts at once and then sell them all at once on a stop. The author gives no figures for this rule. Carver describes the profits overall as a risk premium available to everyone, not as an inefficiency Carver has discovered.

For a small account there is a caveat that the author also raises. When the average position is a couple of contracts, small changes in the forecast do not change the number of contracts, and continuous trading partly turns into binary trading.

Rules

Forecast from the position in the range

// daily bars, calculated once a day after the close
N   = 80                                    // Finetiq: the author did not name the window length
Hi  = Highest(High, N)                      // Finetiq: including the current bar, so that Close lies inside the range
Lo  = Lowest(Low, N)
P   = (Close - Lo) / (Hi - Lo)              // 0 at the low, 0.5 in the middle, 1 at the high

RawF = 40 * (P - 0.5)
// author: middle 0, halfway to the high +10, high +20.
// Finetiq: between these points we use a straight line
F    = max(-20, min(+20, RawF))             // author: cap ±20 (with this calculation it holds automatically)

// Finetiq, optional: smooth the forecast so the position does not twitch every day
// F = EMA(F, N / 4)                        // there is no smoothing in the interview

Position from the forecast

// author: +10 is the average position, +20 is double, the position is proportional to the forecast
AvgPos = Equity * 0.5% / (ATR(25) * PointValue)    // Finetiq: average position via risk
Target = round(F / 10 * AvgPos)                    // whole contracts or lot step

// Finetiq: no-trade zone, so as not to churn ±1 contract every day
Buffer = max(1, 0.1 * AvgPos)
IF |Target - Position| >= Buffer
    trade the difference AT NEXT BAR OPEN

// no stop-loss (author): on a pullback F falls and the position shrinks,
// below the middle of the range F < 0, and the position turns into a short.
// there is no position when Target rounds to zero (author)

Variant B. Discrete trading on the same forecast

Carver says in the same episode that the forecast can be traded in a binary way: by its sign or only after a 5–10 threshold. This is simpler with a small account, and it gives a direct comparison with the continuous version.

Size = AvgPos                                                       // Finetiq: fixed size
IF Position <= 0 AND F >= +10   BUY Size AT NEXT BAR OPEN          // author: threshold 5 or 10
IF Position >= 0 AND F <= -10   SELL SHORT Size AT NEXT BAR OPEN
// Finetiq: from a short, BUY is a reversal: the short is closed and a long of Size is opened.
// SELL SHORT from a long works the same way. Where an opposite order only closes the position, double the order size
IF Position > 0  AND F <= 0     EXIT AT NEXT BAR OPEN              // Finetiq: exit at the middle of the range
IF Position < 0  AND F >= 0     EXIT AT NEXT BAR OPEN              // Finetiq
// a +20 threshold means a close at the high of the window: almost a classic channel breakout

Parameters

Parameter Value Source
Timeframe daily bars, recalculated once a day author
Forecast scale 0 in the middle, +10 halfway to the high, +20 at the high author
Forecast cap ±20 author
Stop-loss none, exit through the forecast author
Range window N 80 days, test 20–320 Finetiq
Shape between the author's points straight line Finetiq
Forecast smoothing none or EMA N/4 Finetiq
Average position 0.5% of capital per ATR(25) Finetiq
No-trade zone 10% of the average position, minimum 1 contract Finetiq
B: entry threshold +5 or +10, for a short −5 or −10 author
B: exit forecast back to zero Finetiq

What to test

  1. Continuous versus discrete. One window N, three modes: continuous position, variant B with a threshold of 10, and a classic breakout (threshold 20). Compare return per unit of risk, drawdown and turnover.
  2. Your own account size. Run the test with rounding to whole contracts at your real capital. If the average position is 1–2 contracts, count on how many days the position actually changed. With fractional contracts the test will show a smoothness that the account cannot achieve.
  3. Window N. 20, 40, 80, 160, 320 days. Neighboring windows should give similar results. The author trades several variations of each rule and averages the forecasts: compare a single window with the average forecast of three windows.
  4. Costs. The position changes almost every day. Count the number of trades per year and apply slippage to every change. Compare three versions: without a no-trade zone, with the zone, and with EMA N/4 smoothing.
  5. No stop. Look at the worst days, for example a gap against the position when the forecast is +20. Compare with the same rule plus an emergency stop at 3–4 ATR.
  6. Correlation with momentum. The author cites about 80%. Calculate the correlation of daily results with the moving average crossover from the ma-cross-continuous-forecast card. If it is above 0.9, the second rule adds little to the portfolio.
  7. Many markets. For the author the effect comes from a portfolio of 200+ futures. Run the same parameters on 20–30 markets and look at the median.

Platform notes

TradingView (Pine Script)

  • The position in the range needs a range that includes the current bar: ta.highest(high, N) and ta.lowest(low, N) without [1]. Then P lies between 0 and 1, and the forecast does not go beyond ±20 by itself.
  • Adding to a position via strategy.entry is limited by the pyramiding parameter in strategy(), and by default no additional entries are allowed. Without this setting, the growth of the position from +10 to +20 silently does not happen. It is simpler to calculate the target size and send strategy.order for the difference from strategy.position_size, then check the list of trades.
  • Round the size yourself (math.round). Otherwise the test will trade fractional contracts.
  • ta.atr uses Wilder smoothing. The average position will differ from EasyLanguage and MQL5, where ATR is a simple average.

MultiCharts and TradeStation (EasyLanguage)

  • Adding in the same direction is enabled in the strategy properties (multiple entries in the same direction). By default a repeated Buy with an open position is not filled.
  • Partial reduction: Sell N contracts total next bar at market. Sell Short with an open long reverses the whole position at once, so make the gradual transition through zero in two steps: first reduce the long, then enter the short.
  • The position in the range does not depend on the price scale, so it is correct on a back-adjusted continuous future too, even if the series has gone negative. Calculate position size from ATR in points, not as a percentage of price.
  • AvgTrueRange is a simple average of TrueRange.

MetaTrader 5 (MQL5)

  • On a netting account there is one position per symbol: reductions and reversals are done with deals in the opposite direction for the volume difference. On a hedging account every deal opens a separate position, and specific positions have to be closed.
  • Round the volume to SYMBOL_VOLUME_STEP and not below SYMBOL_VOLUME_MIN. At the minimum lot the continuous version turns into a binary one.
  • Average position from risk: SYMBOL_TRADE_TICK_VALUE and SYMBOL_TRADE_TICK_SIZE.
  • CFD daily bars are built on the broker's server time, and Sunday bars distort the range and ATR. A swap is charged every night, and the system holds positions for weeks: include it in the test.

Where the idea can break

  • In the interview the author described the conversion of price into a forecast with a single example. The window length, the shape between the points, the smoothing, the average position size and the no-trade zone were set by us.
  • The author does not show results for this rule. Carver describes the advantage of continuous trading in words.
  • For the author the effect comes from 200+ markets and 80–100 rule permutations combined into one number. A single window on a single market will give a much noisier result.
  • Small accounts. Rounding eats the continuity, and frequent position changes add costs. According to the author, the cost advantage goes mainly to large accounts.
  • There is no stop-loss, and the position reacts only to daily closes. If price moves sharply against the position during the day, the forecast drops only at the next close, and the reduction happens at the open of the following bar. An intraday stop would limit such a loss in a steady move, but it does not protect against a gap through the stop level either.
  • Position size grows in calm periods: with a low ATR the average position is large, and a volatility spike catches the system holding a large position.

Sources

Author's claims

These figures and statements are the author's. We have not verified them.

  • The correlation of this breakout with the author's momentum rules is about 80%: the rules are similar but not identical.
  • The author trades more than 200 futures markets. All of the author's rules with their variations, 80–100 permutations, are combined into one number per instrument. There are no stop-losses in the futures portfolio.

Related ideas

Updated: 2026-09-10