Join waitlist
Strategies / Momentum / CCI MACD Swing Risk Reward

CCI MACD Swing Risk Reward

Buys when the MACD histogram is positive and CCI(14) crosses above -100, and sells short when the histogram is negative and CCI crosses below 100. Stops sit at the 10-bar low or high, with a target 1.5 times the stop distance.

MomentumLong & shortSwingUS Crude Oil1 hour
n/aProfit factor
5,626Net profit EUR
41.06%Win rate
1,415Trades
-2,767Max drawdown
3.98Avg trade

Best run of 5. US Crude Oil, 1 hour, spread 3, from run sweeps:2026-10-11-CRUDE-1h-opt.tsv:3.

Entry rules, long

  1. The MACD histogram (12, 26, 9) is above 0.

Entry rules, short

  1. The MACD histogram (12, 26, 9) is below 0.

Exit rules

  1. For shorts, the stop is the highest high of the last 10 bars minus the close, measured from entry.
  2. The target is 1.5 times the stop distance from entry.

Test conditions

PeriodUp to 2026-10-11
InstrumentUS Crude Oil, 1 hour
Spread3 points
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-10-11

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
US Crude OilBest run1 hourn/a 1,41541.065,626 EUR-2,767
SilverDailyn/a 12444.3520,053 USD-14,281
Silver4 hoursn/a 43936.2215,433 USD-11,710
US Crude OilDailyn/a 15050.002,652 EUR-2,075
GoldDailyn/a 13238.64332 EUR-236

Charts

Results by run

Net profitMax drawdown

The code

ProBuilder code, as tested

// ==============================================================
// CCI MACD Swing Risk Reward
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Momentum
// Direction: Long & short
// Timeframe tested: 1 hour
// ==============================================================

DEFPARAM CumulateOrders = false

ONCE myCci = 0

tp = TypicalPrice
tpma = Average[14](tp)
myMd = 0
FOR myI = 0 TO 13 DO
    myMd = myMd + ABS(tp[myI] - tpma)
NEXT
myMd = myMd / 14

24 more lines: the entry and exit rules.

Setup

How to load it

  1. Copy the code with the copy button on 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.

Indicators used

CCIEMAMACDSMA
Read this firstKnown weaknesses2 points
  • No profit factor is available, because only sweep results exist for this strategy.
  • Results include the spread only. Commissions and overnight financing are not included.

Questions

About this strategy

Can I run CCI MACD Swing Risk Reward in ProOrder?

Yes. The code is ProBuilder and runs as an automated ProOrder system. Backtest it on your own account with your own spread and position size before trading it live.

Which markets was it tested on?

It was tested on 5 market and timeframe combinations. The best run by trade count was US Crude Oil, 1 hour, with 1,415 trades.

How large was the drawdown?

The best run had a maximum drawdown of 2,767 EUR at the tested position size, against a net result of 5,626 EUR.

Does it trade long, short or both?

It trades both long and short.

Related

Strategies like this one

Trend Surfer

Uses the same indicator.

1.04 PF · 10,813 trades

Short Term RSI Pullback Long Short

Best run on the same market, US Crude Oil.

1.33 PF · 493 trades

ATR Momentum

Also a momentum strategy.

n/a PF · 15,021 trades

Want strategies that are already part of a live portfolio? Join the ProRealAlgos waitlist.

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