Join today
Strategies / Momentum / Universal X-Body

Universal X-Body Strategy

The system adds up candle body changes over 578 bars. A long starts when a negative reading turns up, and a short when a reading above 46 pips turns down. It trades Monday to Thursday and simply reverses on the next opposite signal.

MomentumLong & shortSwingGBP/USDDaily
n/aProfit factor
22,664Net profit USD
55.82%Win rate
2,768Trades
-6,961Max drawdown
8.19Avg trade

Best run of 30. GBP/USD, Daily, spread 1.5, from run sweeps:2026-09-24-GBPUSD-D-opt.tsv:12.

Entry rules, long

  1. Members only
  2. Entry day is Monday to Thursday

Entry rules, short

  1. Members only
  2. Entry day is Monday to Thursday

Exit rules

  1. Members only

Test conditions

PeriodUp to 2026-09-24
InstrumentGBP/USD, Daily
Spread1.5 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
578
signalDirection
1 follows the signal, -1 trades it the other way
1
upperThreshold
Body total must exceed this many pips to count as positive
46
lowerThreshold
Body total must be below minus this many pips to count as negative
1
fridayNumber
Entries only on days before this day of the week
5

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
GBP/USDBest runDailyn/a 2,76855.8222,664 USD-6,961
USD/JPY30 minn/a 81652.45580,770 JPY-287,110
USD/JPY10 minn/a 27054.07443,400 JPY-272,930
USD/JPY15 minn/a 40852.94415,510 JPY-260,690
EUR/USD5 minn/a 8446.43219,192 USD-127,561
EUR/USD15 minn/a 11453.51156,188 USD-76,477
Silver30 minn/a 1,35854.2761,180 USD-19,736
Dow JonesDailyn/a 1,91754.5116,250 EUR-10,331
Nasdaq 1004 hoursn/a 2,44556.0715,520 EUR-12,122
Nasdaq 100Dailyn/a 1,17155.3412,555 EUR-11,248
S&P 50030 minn/a 19853.036,623 EUR-1,732
S&P 5001 hourn/a 27050.005,583 EUR-1,459
S&P 50015 minn/a 12256.564,779 EUR-1,353
Gold30 minn/a 8853.414,656 EUR-1,236
GoldDailyn/a 13855.804,444 EUR-1,652
S&P 500Dailyn/a 34353.063,968 EUR-1,261
FTSE 10010 minn/a 9256.523,938 EUR-1,349
FTSE 1005 minn/a 4663.043,780 EUR-1,400
Gold4 hoursn/a 12055.003,726 EUR-1,626
Gold1 hourn/a 12258.203,550 EUR-2,028
S&P 5004 hoursn/a 43253.703,414 EUR-2,021
S&P 50010 minn/a 4647.832,710 EUR-1,562
S&P 5005 minn/a 3452.942,439 EUR-1,459
Gold15 minn/a 7237.502,438 EUR-2,106
Gold10 minn/a 5050.002,332 EUR-1,599
Gold5 minn/a 4837.502,067 EUR-1,687
S&P 5003 minn/a 3256.251,913 EUR-1,323
Gold3 minn/a 2853.571,803 EUR-1,562
FTSE 1003 minn/a 3857.891,755 EUR-1,372
S&P 5001 minn/a 450.00734 EUR-587

Charts

Results by run

Net profit against max drawdown

Net profitMax drawdown
0-500K-250K500K1.0MUSD/JPY · 30 minUSD/JPY · 10 minUSD/JPY · 15 minEUR/USD · 5 minEUR/USD · 15 minSilver · 30 minGBP/USD · DailyDow Jones · DailyNasdaq 100 · 4 hoursNasdaq 100 · DailyS&P 500 · 30 minS&P 500 · 1 hourS&P 500 · 15 minGold · 30 minGold · DailyS&P 500 · 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.

// ============================================================
// Universal X-Body
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Momentum
// Direction: Long & short
// Timeframe tested: Daily
// ============================================================

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

// --- Parameters ---
positionSize = 1          // contracts per trade
sumPeriod = 578           // bars summed for the body-change total
signalDirection = 1       // 1 follows the signal, -1 trades it the other way
upperThreshold = 46       // body total must exceed this many pips to count as positive
lowerThreshold = 1        // body total must be below minus this many pips to count as negative
fridayNumber = 5          // entries only on days before this day of the week

// --- Indicators ---
// Running total of how much each candle body changed versus the previous one.
bodySize = close - open
bodyChange = bodySize - bodySize[1]
bodySum = Summation[sumPeriod](bodyChange)

// Last clearly positive and last clearly negative reading; both hold until updated.
IF bodySum > upperThreshold * PipSize THEN
  positiveSum = bodySum
ENDIF
IF bodySum < (0 - lowerThreshold) * PipSize THEN
  negativeSum = bodySum
ENDIF

negativeFading = negativeSum > negativeSum[1]
positiveFading = positiveSum < positiveSum[1]

// Trade bias holds until the opposite condition appears.
IF negativeFading THEN
  tradeBias = 1 * signalDirection
ELSIF positiveFading THEN
  tradeBias = (0 - 1) * signalDirection
ENDIF

13 more lines: the entry and exit rules.

Read this first

Known weaknesses

  • There is no stop loss or target, and the position is almost always open, so every adverse move is taken in full until a reversal.
  • USD/JPY runs show drawdowns around half of profit, such as JPY 287,110.00 on JPY 580,770.00 for 30 minutes.
  • Several runs have tiny samples, such as S&P 500 1 minute with 4 trades and Gold 3 minutes with 28.
  • Profit factor was not recorded, because the results come from sweep data only.

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

Does it work as an automated system?

Yes. It runs in ProOrder at 1 contract and needs no stop or target settings.

Which markets were tested?

GBP/USD daily is the headline run at USD 22,663.70 over 2,768 trades. Every tested run was profitable, across forex, indices, gold and silver.

What drawdown should I expect?

GBP/USD daily had a max drawdown of USD 6,961.20 at 1 contract.

Why daily bars?

A 578-bar sum on daily data reflects long-term body momentum. On faster charts the same setting covers only days, and results varied more.

Related

Strategies like this one

SuperTrend CCI

Best run on the same market, GBP/USD.

1.72 PF · 561 trades

Twelve Minus Two Momentum

Also a momentum strategy.

12.00 PF · 52 trades

Repulse DPO

Also a momentum strategy.

2.87 PF · 104 trades

Always-in systems need the right partners. Join the ProRealAlgos waitlist to learn more.

The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.

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