Join waitlist
Strategies / Pattern / SMA Spread Elephant Candle

SMA Spread Elephant Candle

Buys after a tight 20 and 200 period SMA spread and a bullish elephant candle near the 200 SMA. Sells short when the SMAs spread apart with a topping tail candle, and each trade targets 3 times its risk.

PatternLong & shortSwingUS Crude Oil1 hour
n/aProfit factor
2,371Net profit EUR
22.70%Win rate
947Trades
-1,655Max drawdown
2.50Avg trade

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

Entry rules, long

  1. The 20 and 200 period SMAs are within 0.5% of each other.
  2. The close is within one 14 period ATR of the 200 period SMA.

Entry rules, short

  1. The 20 and 200 period SMAs are at least 2 times the 0.5% threshold apart.
  2. The close is over 1.5 ATR(14) above the 20 SMA, and the 20 SMA is over 1.5 ATR(14) above the 200 SMA.

Exit rules

  1. An opposite signal closes the trade and reverses it.

Test conditions

PeriodUp to 2026-10-07
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-07

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
US Crude OilBest run1 hourn/a 94722.702,371 EUR-1,655
DAX 40Dailyn/a 15320.262,249 EUR-1,728

Charts

Results by run

Net profitMax drawdown

The code

ProBuilder code, as tested

// ==============================================================
// SMA Spread Elephant Candle
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Pattern
// Direction: Long & short
// Timeframe tested: 1 hour
// ==============================================================

DEFPARAM CumulateOrders = false

mafast = Average[20](close)
maslow = Average[200](close)
myAtr = AverageTrueRange[14](close)
body = abs(close - open)
avgbody = Average[20](body)

32 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

SMAATR
Read this firstKnown weaknesses2 points
  • No profit factor is available, because only sweep results exist for this strategy.
  • The maximum drawdown of 1,655 EUR is large next to the net profit of 2,371 EUR.

Questions

About this strategy

Can I run SMA Spread Elephant Candle 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 2 market and timeframe combinations. The best run by trade count was US Crude Oil, 1 hour, with 947 trades.

How large was the drawdown?

The best run had a maximum drawdown of 1,655 EUR at the tested position size, against a net result of 2,371 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

Breakout Reversal

Also a pattern strategy.

n/a PF · 459 trades

See how ProRealAlgos combines strategies like this into one automated portfolio.

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