Join today
Strategies / Momentum / Candle Body Momentum

Candle Body Momentum

The signal is an 878-bar running sum of bar-to-bar changes in candle body size. As configured it is contrarian: it buys when that sum sets a new low below 0 and shorts when it sets a new high above 41 pips. Every opposite signal reverses the position, so it is always in the market.

MomentumLong & shortIntradayS&P 50030 min
2.03Profit factor
6,910Net profit EUR
61.90%Win rate
294Trades
-1,336Max drawdown
23.50Avg trade

Best run of 29. S&P 500, 30 min, spread 1, from run pf:2026-09-24-USA500-30m.tsv:1.

Entry rules, long

  1. Members only

Entry rules, short

  1. Members only

Exit rules

  1. No stop or target
  2. Members only

Test conditions

PeriodUp to 2026-09-24
InstrumentS&P 500, 30 minutes
Spread1 points
Contracts1
Starting capital1,000,000
CostsSpread only. Commissions and overnight financing are not included.
BarsUp to 200,000 bars, fewer where the instrument has less history
Last tested2026-09-24

Parameters

positionSize
Contracts per trade
1
sumPeriod
Bars summed for the body-change total
878
invertSignal
1 trades as written, -1 flips every signal
1
upperFilterPips
Total must exceed this many pips to count as a positive reading
41
lowerFilterPips
Total must be below minus this many pips to count as a negative reading
0

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
S&P 500Best run30 min2.03 29461.906,910 EUR-1,336
S&P 50015 min1.87 20257.435,222 EUR-1,215
USD/JPY30 minn/a 1,33453.37583,360 JPY-311,340
USD/JPY15 minn/a 68053.68390,690 JPY-260,480
USD/JPY10 minn/a 47053.40356,070 JPY-299,470
EUR/USD5 minn/a 12450.00226,540 USD-178,822
EUR/USD10 minn/a 15053.33206,625 USD-82,297
USD/JPY2 minn/a 4850.00106,210 JPY-94,070
EUR/USD30 minn/a 1,13452.38101,930 USD-82,289
Nikkei 225Dailyn/a 1,29959.2865,932 USD-17,149
SilverDailyn/a 84957.8336,872 USD-16,947
Dow JonesDailyn/a 2,11856.9421,680 EUR-18,902
DAX 40Dailyn/a 1,96859.1020,493 EUR-6,430
Nasdaq 100Dailyn/a 1,35158.1817,701 EUR-11,124
FTSE 1001 hourn/a 2,53753.727,365 EUR-2,920
US Crude OilDailyn/a 1,18356.976,255 EUR-5,266
S&P 5004 hoursn/a 56656.896,141 EUR-1,923
S&P 500Dailyn/a 44453.835,968 EUR-2,189
S&P 5001 hourn/a 46054.575,400 EUR-1,509
Gold30 minn/a 15060.004,171 EUR-1,172
Gold4 hoursn/a 18055.003,655 EUR-2,304
FTSE 10010 minn/a 18260.443,625 EUR-1,305
Gold1 hourn/a 17653.413,384 EUR-2,098
S&P 50010 minn/a 9451.063,049 EUR-1,455
Gold15 minn/a 12052.502,806 EUR-1,935
GoldDailyn/a 19457.222,643 EUR-1,484
S&P 5005 minn/a 4456.822,266 EUR-1,426
FTSE 1005 minn/a 7256.942,035 EUR-1,593
S&P 5002 minn/a 1266.67840 EUR-833

Charts

Results by run

Profit factor by run

Above 1.0 made money, below 1.0 lost money.

0.00.61.31.92.51.0 = break-evenS&P 500 · 30 min2.03S&P 500 · 15 min1.87

Net profit against max drawdown

Net profitMax drawdown
0-500K-250K500K1.0MUSD/JPY · 30 minUSD/JPY · 15 minUSD/JPY · 10 minEUR/USD · 5 minEUR/USD · 10 minUSD/JPY · 2 minEUR/USD · 30 minNikkei 225 · DailySilver · DailyDow Jones · DailyDAX 40 · DailyNasdaq 100 · DailyFTSE 100 · 1 hourS&P 500 · 30 minUS Crude Oil · DailyS&P 500 · 4 hours

Longer history

Re-run on up to 1,000,000 bars

The S&P 500 15 minute rerun had 456,000 bars and made EUR 6,660.97 against EUR 5,222.27 in the standard run, so the older data alone added EUR 1,438.70.

S&P 500 · 15 min

Bars available456,000
Net, standard 200,000-bar run5,222.27 EUR
Net, long run6,660.97 EUR
Net on the older data alone1,438.70 EUR

The code

ProBuilder, rewritten to house standard

Every file in the library uses the same header, the same section order and the same variable names. The numbers above were produced by the original version before the rewrite, and the rewrite has not yet been compiled in ProRealTime.

// ============================================================
// Candle Body Momentum
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Momentum
// Direction: Long & short
// Timeframe tested: 30 minutes
// ============================================================

// --- Settings ---
DEFPARAM CumulateOrders = false

// --- Parameters ---
positionSize = 1       // contracts per trade
sumPeriod = 878        // bars summed for the body-change total
invertSignal = 1       // 1 = trade as written, -1 = flip every signal
upperFilterPips = 41   // total must exceed this many pips to count as positive
lowerFilterPips = 0    // total must be below minus this many pips to count as negative

ONCE lastPositiveSum = 0
ONCE lastNegativeSum = 0
ONCE tradeDirection = 0

// --- Indicators ---
bodySize = close - open
bodyChange = bodySize - bodySize[1]
bodyChangeSum = Summation[sumPeriod](bodyChange)

// Remember the latest positive and negative readings; each holds until replaced.
IF bodyChangeSum > upperFilterPips * PipSize THEN
  lastPositiveSum = bodyChangeSum
ENDIF
IF bodyChangeSum < (0 - lowerFilterPips) * PipSize THEN
  lastNegativeSum = bodyChangeSum
ENDIF

negativeSumFalling = lastNegativeSum < lastNegativeSum[1]
positiveSumRising = lastPositiveSum > lastPositiveSum[1]

20 more lines: the entry and exit rules.

Read this first

Known weaknesses

  • There is no stop or target, and the position stays open until the opposite signal.
  • It needs 878 bars of history before the first trade, so short data sets give few signals, for example S&P 500 2 minutes with 12 trades.
  • USD/JPY sweeps show large drawdowns, such as JPY 311,340 on 30 minutes.

How to load it

  1. Copy the code with the copy button above the code block.
  2. In ProRealTime, open a chart of the instrument and timeframe you want to test, then open ProOrder > New trading system and choose "Create with programming".
  3. Paste the code, give the system a name and save it.
  4. Click "Backtest", set your own spread and position size, and run it before you consider trading it live.

Questions

About this strategy

Can Candle Body Momentum run in ProOrder?

Yes, but make sure enough history loads for the 878-bar sum. The rewritten code was not compile-checked, so test it in ProBacktest first.

Which markets were tested?

Indices, currency pairs, metals and oil, and every listed run was positive. S&P 500 15 minutes recorded a profit factor of 1.87 over 202 trades.

What drawdown came with 1 contract?

The S&P 500 30 minute best run had a max drawdown of EUR 1,335.84 against EUR 6,909.96 net profit.

Why 30 minutes?

It gave the best recorded run, and it keeps the 878-bar window to a manageable span of history.

Related

Strategies like this one

Candle Body Sum Intraday

Best run on the same market, S&P 500.

2.86 PF · 124 trades

Candle Body Sum Daily

A similar profit factor.

2.05 PF · 168 trades

Twelve Minus Two Momentum

Also a momentum strategy.

12.00 PF · 52 trades

Always-in systems work better alongside others. Join the ProRealAlgos waitlist to see how we pair them.

Copy trading on US indices is available to ProRealAlgos members as spots open.

Past backtest results do not guarantee future results. This is not financial advice. Curated and maintained by ProRealAlgos. ProRealTime™ is a trademark of ProRealTime SAS. prorealalgos.comStatsDocs