Join today
Strategies / Mean reversion / Candle Body Sum Intraday

Candle Body Sum: Fading Extreme Body Momentum

The system adds up candle body changes over 978 bars and trades against extremes: it buys when a negative sum makes a new low and sells when a sum above 51 pips makes a new high. Positions only close when the opposite signal flips them.

Mean reversionLong & shortIntradayS&P 50030 min
2.86Profit factor
6,859Net profit EUR
60.48%Win rate
124Trades
-1,368Max drawdown
55.32Avg trade

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

Entry rules, long

  1. Members only
  2. The long direction stays until the short condition appears

Entry rules, short

  1. Members only
  2. The short direction stays until the long condition appears

Exit rules

  1. Members only

Test conditions

PeriodUp to 2026-09-25
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-25

Parameters

positionSize
Contracts per trade
1
sumPeriod
Bars summed
978
upperFilter
Sum must exceed this many pips to count as positive
51
lowerFilter
Sum must be below minus this many pips to count as negative
0
invertSignal
1 = as tested, -1 flips every signal
1

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
S&P 500Best run30 min2.86 12460.486,859 EUR-1,368
S&P 5001 hour1.88 22658.856,349 EUR-1,457
GoldDaily1.77 11063.643,481 EUR-893
S&P 5004 hours1.62 40657.646,775 EUR-1,337
Silver1 hourn/a 1,24255.561,147,598 USD-570,335
USD/JPY30 minn/a 67454.75579,880 JPY-299,590
USD/JPY4 hoursn/a 2,17655.70508,890 JPY-483,600
USD/JPY1 hourn/a 1,54854.07449,840 JPY-431,210
USD/JPY10 minn/a 25653.91347,360 JPY-282,470
EUR/USD10 minn/a 9652.08308,238 USD-82,119
USD/JPY15 minn/a 33052.73275,920 JPY-267,040
EUR/USD5 minn/a 9648.96220,522 USD-153,172
EUR/USDDailyn/a 2,33258.58130,587 USD-56,759
Dow JonesDailyn/a 2,06960.2744,774 EUR-16,838
Silver15 minn/a 1,38055.7237,932 USD-29,790
Nasdaq 100Dailyn/a 1,13758.6625,832 EUR-6,474
US Crude OilDailyn/a 1,99458.5823,394 EUR-12,345
DAX 40Dailyn/a 1,80856.5321,517 EUR-6,042
SilverDailyn/a 62355.2221,449 USD-16,797
GBP/USDDailyn/a 2,84158.0813,163 USD-10,446
FTSE 100Dailyn/a 1,48457.3510,604 EUR-4,572
FTSE 1001 hourn/a 1,31255.039,034 EUR-3,297
S&P 500Dailyn/a 29957.536,078 EUR-1,700
S&P 50015 minn/a 9063.334,871 EUR-1,267
Gold1 hourn/a 10256.863,958 EUR-1,769
FTSE 10010 minn/a 7857.693,708 EUR-1,320
Gold4 hoursn/a 11558.263,586 EUR-1,649
Gold30 minn/a 6454.693,426 EUR-1,549
Gold15 minn/a 7652.633,319 EUR-1,511
FTSE 10015 minn/a 28252.483,034 EUR-2,986
S&P 50010 minn/a 4852.082,560 EUR-1,692
Gold10 minn/a 4641.302,158 EUR-2,068
Gold5 minn/a 3847.372,143 EUR-2,008
Gold3 minn/a 2846.432,116 EUR-1,489
FTSE 1005 minn/a 2853.572,022 EUR-1,301
S&P 5005 minn/a 2669.232,010 EUR-1,332
FTSE 1003 minn/a 3063.331,410 EUR-1,348

Charts

Results by run

Profit factor by run

Above 1.0 made money, below 1.0 lost money.

0.01.32.53.85.01.0 = break-evenS&P 500 · 30 min2.86S&P 500 · 1 hour1.88Gold · Daily1.77S&P 500 · 4 hours1.62

Net profit against max drawdown

Net profitMax drawdown
0-1.0M-500K1.0M2.0MSilver · 1 hourUSD/JPY · 30 minUSD/JPY · 4 hoursUSD/JPY · 1 hourUSD/JPY · 10 minEUR/USD · 10 minUSD/JPY · 15 minEUR/USD · 5 minEUR/USD · DailyDow Jones · DailySilver · 15 minNasdaq 100 · DailyUS Crude Oil · DailyDAX 40 · DailySilver · DailyGBP/USD · Daily

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 Sum Intraday
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Mean reversion
// Direction: Long & short
// Timeframe tested: 30 minutes
// ============================================================

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

// --- Parameters ---
positionSize = 1          // contracts per trade
sumPeriod = 978           // bars summed
upperFilter = 51          // sum must exceed this many pips to count as positive
lowerFilter = 0           // sum must be below minus this many pips to count as negative
invertSignal = 1          // 1 = as tested, -1 flips every signal

// --- Indicators ---
candleBody = close - open
bodyChange = candleBody - candleBody[1]
bodySum = Summation[sumPeriod](bodyChange)

// Last sum reading on each side of the filters, held until the next one
IF bodySum > upperFilter * PipSize THEN
  positiveSum = bodySum
ENDIF
IF bodySum < (0 - lowerFilter) * PipSize THEN
  negativeSum = bodySum
ENDIF

negativeFalling = negativeSum < negativeSum[1]
positiveRising = positiveSum > positiveSum[1]

20 more lines: the entry and exit rules.

Read this first

Known weaknesses

  • There is no stop loss or target, so a trade stays open until the reverse signal, however far price runs.
  • Silver 1 hour shows USD 1,147,598.00 profit with a USD 570,335.00 drawdown, and USD/JPY runs have similar swings, so size risk carefully.
  • Many intraday runs have few trades, such as S&P 500 5 minutes with 26 and Gold 3 minutes with 28.
  • Most runs only have sweep data with no profit factor recorded.

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 it run in ProOrder?

Yes, it always holds 1 contract long or short and switches on each reverse signal. The rewritten code has not been compile checked.

Where was it tested?

Indices, gold, silver, oil and currency pairs from 3 minutes to daily, and every run was profitable. S&P 500 1 hour had a profit factor of 1.88 and Gold Daily 1.77.

How big was the drawdown at 1 contract?

On S&P 500 30 minutes the maximum drawdown was EUR 1,368.31 against EUR 6,859.16 net profit.

Why a 978-bar window on 30 minute bars?

The long window turns the body sum into a slow gauge of stretched momentum. On 30 minute bars it covers several weeks.

Related

Strategies like this one

One Notch Long

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

2.38 PF · 161 trades

Repulse DPO

A similar profit factor.

2.87 PF · 104 trades

Monday Dip Buy

Also a mean reversion strategy.

n/a PF · 146 trades

Contrarian ideas interest you? Join the ProRealAlgos community waitlist.

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