Join waitlist
Strategies / Trend / Price Crosses 15-Period SMA

Price Crosses 15-Period SMA

The strategy buys when the close crosses above its 15-period simple moving average and sells the long when the close crosses back below it. It trades 1 contract at a time and uses no stop or target.

TrendLong onlySwingGold4 hours
n/aProfit factor
1,560Net profit EUR
26.72%Win rate
2,077Trades
-1,476Max drawdown
0.75Avg trade

Best run of 10. Gold, 4 hours, spread 0.6, from run sweeps:2026-10-04-GOLD-4h-opt.tsv:85.

Entry rules, long

  1. No long position is currently open

Exit rules

  1. The long closes at market on this signal, with no stop or target set

Test conditions

PeriodUp to 2026-10-04
InstrumentGold, 4 hours
Spread0.6 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-04

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
GoldBest run4 hoursn/a 2,07726.721,560 EUR-1,476
Nikkei 225Dailyn/a 79429.8535,671 USD-15,855
Dow JonesDailyn/a 98430.5922,045 EUR-6,312
DAX 404 hoursn/a 1,99030.1011,147 EUR-3,852
Dow Jones4 hoursn/a 67629.889,503 EUR-6,090
Nasdaq 100Dailyn/a 74930.979,489 EUR-4,627
Nasdaq 1004 hoursn/a 1,97830.849,100 EUR-4,703
DAX 40Dailyn/a 1,02031.377,504 EUR-3,827
GoldDailyn/a 92627.432,218 EUR-1,773
S&P 500Dailyn/a 1,02430.371,950 EUR-1,345

Charts

Results by run

Net profitMax drawdown

The code

ProBuilder code, as tested

// ==============================================================
// Price Crosses 15-Period SMA
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Trend
// Direction: Long only
// Timeframe tested: 4 hours
// ==============================================================

DEFPARAM CumulateOrders = false

sma = Average[15](close)

9 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

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

Questions

About this strategy

Can I run Price Crosses 15-Period SMA 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 10 market and timeframe combinations. The best run by trade count was Gold, 4 hours, with 2,077 trades.

How large was the drawdown?

The best run had a maximum drawdown of 1,476 EUR at the tested position size, against a net result of 1,560 EUR.

Does it trade long, short or both?

It only takes long trades.

Related

Strategies like this one

Trend Surfer

Uses the same indicator.

1.04 PF · 10,813 trades

CCI Breakout

Best run on the same market, Gold.

1.08 PF · 6,065 trades

ADX Filtered EMA Cross

Also a trend strategy.

1.15 PF · 607 trades

Get the full rules, the complete code and the ProRealAlgos portfolio as a member.

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